{"id":22468118,"url":"https://github.com/patternslib/pat-shopping-cart","last_synced_at":"2025-06-11T21:34:16.404Z","repository":{"id":37867960,"uuid":"112753836","full_name":"Patternslib/pat-shopping-cart","owner":"Patternslib","description":"Move from gitlab","archived":false,"fork":false,"pushed_at":"2023-03-03T00:48:56.000Z","size":3842,"stargazers_count":0,"open_issues_count":18,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-01T19:28:15.895Z","etag":null,"topics":["hacktoberfest","javascript","patternslib","ui-components"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Patternslib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-01T15:14:29.000Z","updated_at":"2022-10-16T15:29:40.000Z","dependencies_parsed_at":"2023-02-18T16:45:37.133Z","dependency_job_id":null,"html_url":"https://github.com/Patternslib/pat-shopping-cart","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-shopping-cart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-shopping-cart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-shopping-cart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-shopping-cart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Patternslib","download_url":"https://codeload.github.com/Patternslib/pat-shopping-cart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245873815,"owners_count":20686655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","javascript","patternslib","ui-components"],"created_at":"2024-12-06T11:15:15.618Z","updated_at":"2025-03-27T15:43:34.906Z","avatar_url":"https://github.com/Patternslib.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pat-shopping-cart\n\nAdd a value to a \"shopping cart\" and process this \"shopping cart\".\n\nThis can be used to implement a bulk download feature e.g.\n\n    \u003ca class=\"pat-shopping-cart\" data-pat-shopping-cart=\"id: 0d599f0ec05c3bda8c3b8a68c32a1b47\"\u003e\n      Add this item for download\n    \u003c/a\u003e\n\nWhen an item is added to the cart, the element is given the .in-cart css class.\n\nA .pat-shopping-cart element is also used for processing the cart.\nA list of the id values is submitted to the action URL using the POST method as a comma separated string.\n\n    \u003ca class=\"pat-shopping-cart\" data-pat-shopping-cart=\"action: /download-as-zip\"\u003e\n      Download the items\n    \u003c/a\u003e\n\nThe shopping cart action element gets the .has-items css class when there are items in the cart, and .is-empty otherwise.\n\nTo add a button to empty the cart use \"action: empty\":\n\n    \u003ca class=\"pat-shopping-cart\" data-pat-shopping-cart=\"action: empty\"\u003e\n      Empty your shopping cart\n    \u003c/a\u003e\n\nTo use an action without clearing the cart use \"contents: keep\":\n\n    \u003ca class=\"pat-shopping-cart\" data-pat-shopping-cart=\"action: delete-confirmation; contents: keep\"\u003e\n      Delete the selected items\n    \u003c/a\u003e\n\nYou can pass on other patterns to the action \"patterns: pat-modal\":\n\n    \u003ca class=\"pat-shopping-cart\" data-pat-shopping-cart=\"action: delete-confirmation; patterns: pat-modal\"\u003e\n      Delete the selected items\n    \u003c/a\u003e\n\n\nYou can configure patterns passed on to the action by prepending data-pat-shopping-cart to the pattern:\n\n    \u003ca class=\"pat-shopping-cart\" data-pat-shopping-cart=\"action: delete-confirmation; patterns: pat-inject\" data-pat-shopping-cart-inject=\"source: #main-content; target: #footer\"\u003e\n      Delete the selected items\n    \u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternslib%2Fpat-shopping-cart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatternslib%2Fpat-shopping-cart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternslib%2Fpat-shopping-cart/lists"}