@hortonstudio/main 1.2.11 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +23 -10
- package/package.json +17 -6
- package/.claude/settings.local.json +0 -21
- package/animations/hero.js +0 -599
- package/animations/text.js +0 -369
- package/animations/transition.js +0 -57
- package/attributes-master/.changeset/README.md +0 -8
- package/attributes-master/.changeset/config.json +0 -11
- package/attributes-master/.gitattributes +0 -2
- package/attributes-master/.github/ISSUE_TEMPLATE/bug_report.md +0 -42
- package/attributes-master/.github/ISSUE_TEMPLATE/feature_request.md +0 -22
- package/attributes-master/.github/workflows/ci.yml +0 -66
- package/attributes-master/.github/workflows/release.yml +0 -40
- package/attributes-master/.prettierignore +0 -3
- package/attributes-master/.prettierrc +0 -8
- package/attributes-master/.vscode/extensions.json +0 -3
- package/attributes-master/.vscode/settings.json +0 -7
- package/attributes-master/CONTRIBUTING.md +0 -72
- package/attributes-master/LICENSE.md +0 -201
- package/attributes-master/README.md +0 -31
- package/attributes-master/eslint.config.js +0 -3
- package/attributes-master/package.json +0 -34
- package/attributes-master/packages/accordion/CHANGELOG.md +0 -89
- package/attributes-master/packages/accordion/README.md +0 -31
- package/attributes-master/packages/accordion/package.json +0 -25
- package/attributes-master/packages/accordion/src/actions/a11y.ts +0 -39
- package/attributes-master/packages/accordion/src/actions/classes.ts +0 -27
- package/attributes-master/packages/accordion/src/actions/content.ts +0 -42
- package/attributes-master/packages/accordion/src/actions/list.ts +0 -36
- package/attributes-master/packages/accordion/src/actions/query.ts +0 -27
- package/attributes-master/packages/accordion/src/actions/settings.ts +0 -61
- package/attributes-master/packages/accordion/src/factory.ts +0 -145
- package/attributes-master/packages/accordion/src/index.ts +0 -3
- package/attributes-master/packages/accordion/src/init.ts +0 -37
- package/attributes-master/packages/accordion/src/utils/constants.ts +0 -62
- package/attributes-master/packages/accordion/src/utils/helpers.ts +0 -5
- package/attributes-master/packages/accordion/src/utils/selectors.ts +0 -12
- package/attributes-master/packages/accordion/src/utils/types.ts +0 -23
- package/attributes-master/packages/accordion/tsconfig.json +0 -3
- package/attributes-master/packages/attributes/CHANGELOG.md +0 -564
- package/attributes-master/packages/attributes/README.md +0 -66
- package/attributes-master/packages/attributes/bin/build.ts +0 -107
- package/attributes-master/packages/attributes/bin/live-reload.js +0 -1
- package/attributes-master/packages/attributes/package.json +0 -77
- package/attributes-master/packages/attributes/playwright.config.ts +0 -89
- package/attributes-master/packages/attributes/src/attributes.ts +0 -153
- package/attributes-master/packages/attributes/src/load.ts +0 -125
- package/attributes-master/packages/attributes/tests/accordion.spec.ts +0 -137
- package/attributes-master/packages/attributes/tests/codehighlight.spec.ts +0 -23
- package/attributes-master/packages/attributes/tests/combobox.spec.ts +0 -321
- package/attributes-master/packages/attributes/tests/copyclip.spec.ts +0 -19
- package/attributes-master/packages/attributes/tests/displayvalues.spec.ts +0 -48
- package/attributes-master/packages/attributes/tests/favcustom.spec.ts +0 -23
- package/attributes-master/packages/attributes/tests/inject.spec.ts +0 -40
- package/attributes-master/packages/attributes/tests/inputactive.spec.ts +0 -77
- package/attributes-master/packages/attributes/tests/inputcounter.spec.ts +0 -83
- package/attributes-master/packages/attributes/tests/list.spec.ts +0 -800
- package/attributes-master/packages/attributes/tests/mirrorclick.spec.ts +0 -22
- package/attributes-master/packages/attributes/tests/mirrorinput.spec.ts +0 -37
- package/attributes-master/packages/attributes/tests/modal.spec.ts +0 -34
- package/attributes-master/packages/attributes/tests/numbercount.spec.ts +0 -40
- package/attributes-master/packages/attributes/tests/readtime.spec.ts +0 -19
- package/attributes-master/packages/attributes/tests/selectcustom.spec.ts +0 -51
- package/attributes-master/packages/attributes/tests/socialshare.spec.ts +0 -54
- package/attributes-master/packages/attributes/tests/starrating.spec.ts +0 -79
- package/attributes-master/packages/attributes/tests/toc.spec.ts +0 -38
- package/attributes-master/packages/attributes/tests/utils/index.ts +0 -16
- package/attributes-master/packages/attributes/tsconfig.json +0 -6
- package/attributes-master/packages/autovideo/CHANGELOG.md +0 -182
- package/attributes-master/packages/autovideo/README.md +0 -31
- package/attributes-master/packages/autovideo/package.json +0 -22
- package/attributes-master/packages/autovideo/src/index.ts +0 -3
- package/attributes-master/packages/autovideo/src/init.ts +0 -52
- package/attributes-master/packages/autovideo/src/types.ts +0 -5
- package/attributes-master/packages/autovideo/src/utils/constants.ts +0 -4
- package/attributes-master/packages/autovideo/tsconfig.json +0 -3
- package/attributes-master/packages/codehighlight/CHANGELOG.md +0 -185
- package/attributes-master/packages/codehighlight/README.md +0 -27
- package/attributes-master/packages/codehighlight/package.json +0 -23
- package/attributes-master/packages/codehighlight/src/actions/import.ts +0 -50
- package/attributes-master/packages/codehighlight/src/index.ts +0 -3
- package/attributes-master/packages/codehighlight/src/init.ts +0 -53
- package/attributes-master/packages/codehighlight/src/utils/constants.ts +0 -24
- package/attributes-master/packages/codehighlight/src/utils/selectors.ts +0 -5
- package/attributes-master/packages/codehighlight/src/utils/themes.ts +0 -202
- package/attributes-master/packages/codehighlight/tsconfig.json +0 -3
- package/attributes-master/packages/combobox/CHANGELOG.md +0 -99
- package/attributes-master/packages/combobox/README.md +0 -27
- package/attributes-master/packages/combobox/package.json +0 -23
- package/attributes-master/packages/combobox/src/actions/a11y.ts +0 -29
- package/attributes-master/packages/combobox/src/actions/body/index.ts +0 -12
- package/attributes-master/packages/combobox/src/actions/clearDropdown/index.ts +0 -37
- package/attributes-master/packages/combobox/src/actions/dropdownList/index.ts +0 -220
- package/attributes-master/packages/combobox/src/actions/dropdownToggle/index.ts +0 -34
- package/attributes-master/packages/combobox/src/actions/events.ts +0 -75
- package/attributes-master/packages/combobox/src/actions/input/index.ts +0 -235
- package/attributes-master/packages/combobox/src/actions/observe.ts +0 -158
- package/attributes-master/packages/combobox/src/actions/populate.ts +0 -97
- package/attributes-master/packages/combobox/src/actions/selectElement/index.ts +0 -23
- package/attributes-master/packages/combobox/src/actions/settings.ts +0 -134
- package/attributes-master/packages/combobox/src/actions/state.ts +0 -34
- package/attributes-master/packages/combobox/src/index.ts +0 -3
- package/attributes-master/packages/combobox/src/init.ts +0 -52
- package/attributes-master/packages/combobox/src/utils/constants.ts +0 -48
- package/attributes-master/packages/combobox/src/utils/dropdowns.ts +0 -120
- package/attributes-master/packages/combobox/src/utils/index.ts +0 -1
- package/attributes-master/packages/combobox/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/combobox/src/utils/types.ts +0 -14
- package/attributes-master/packages/combobox/tsconfig.json +0 -3
- package/attributes-master/packages/copyclip/CHANGELOG.md +0 -213
- package/attributes-master/packages/copyclip/README.md +0 -27
- package/attributes-master/packages/copyclip/package.json +0 -23
- package/attributes-master/packages/copyclip/src/factory.ts +0 -67
- package/attributes-master/packages/copyclip/src/index.ts +0 -3
- package/attributes-master/packages/copyclip/src/init.ts +0 -68
- package/attributes-master/packages/copyclip/src/utils/constants.ts +0 -40
- package/attributes-master/packages/copyclip/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/copyclip/tsconfig.json +0 -3
- package/attributes-master/packages/displayvalues/CHANGELOG.md +0 -164
- package/attributes-master/packages/displayvalues/README.md +0 -27
- package/attributes-master/packages/displayvalues/package.json +0 -22
- package/attributes-master/packages/displayvalues/src/actions/collect.ts +0 -17
- package/attributes-master/packages/displayvalues/src/actions/events.ts +0 -22
- package/attributes-master/packages/displayvalues/src/actions/sync.ts +0 -23
- package/attributes-master/packages/displayvalues/src/index.ts +0 -3
- package/attributes-master/packages/displayvalues/src/init.ts +0 -31
- package/attributes-master/packages/displayvalues/src/utils/constants.ts +0 -20
- package/attributes-master/packages/displayvalues/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/displayvalues/src/utils/stores.ts +0 -3
- package/attributes-master/packages/displayvalues/tsconfig.json +0 -3
- package/attributes-master/packages/docs/CHANGELOG.md +0 -108
- package/attributes-master/packages/docs/README.md +0 -3
- package/attributes-master/packages/docs/bin/build.js +0 -92
- package/attributes-master/packages/docs/bin/live-reload.js +0 -1
- package/attributes-master/packages/docs/package.json +0 -40
- package/attributes-master/packages/docs/src/copy.ts +0 -260
- package/attributes-master/packages/docs/src/x-ray.ts +0 -377
- package/attributes-master/packages/docs/tsconfig.json +0 -3
- package/attributes-master/packages/favcustom/CHANGELOG.md +0 -194
- package/attributes-master/packages/favcustom/README.md +0 -27
- package/attributes-master/packages/favcustom/package.json +0 -22
- package/attributes-master/packages/favcustom/src/index.ts +0 -3
- package/attributes-master/packages/favcustom/src/init.ts +0 -30
- package/attributes-master/packages/favcustom/src/utils/constants.ts +0 -10
- package/attributes-master/packages/favcustom/src/utils/selectors.ts +0 -5
- package/attributes-master/packages/favcustom/tsconfig.json +0 -3
- package/attributes-master/packages/formsubmit/CHANGELOG.md +0 -161
- package/attributes-master/packages/formsubmit/README.md +0 -51
- package/attributes-master/packages/formsubmit/package.json +0 -22
- package/attributes-master/packages/formsubmit/src/actions/redirect.ts +0 -9
- package/attributes-master/packages/formsubmit/src/actions/reset.ts +0 -49
- package/attributes-master/packages/formsubmit/src/actions/submit.ts +0 -34
- package/attributes-master/packages/formsubmit/src/components/Form.ts +0 -231
- package/attributes-master/packages/formsubmit/src/factory.ts +0 -62
- package/attributes-master/packages/formsubmit/src/index.ts +0 -3
- package/attributes-master/packages/formsubmit/src/init.ts +0 -24
- package/attributes-master/packages/formsubmit/src/utils/attributes.ts +0 -19
- package/attributes-master/packages/formsubmit/src/utils/constants.ts +0 -89
- package/attributes-master/packages/formsubmit/src/utils/dom.ts +0 -76
- package/attributes-master/packages/formsubmit/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/formsubmit/src/utils/types.ts +0 -7
- package/attributes-master/packages/formsubmit/tsconfig.json +0 -3
- package/attributes-master/packages/inject/CHANGELOG.md +0 -117
- package/attributes-master/packages/inject/README.md +0 -60
- package/attributes-master/packages/inject/package.json +0 -22
- package/attributes-master/packages/inject/src/actions/collect.ts +0 -125
- package/attributes-master/packages/inject/src/actions/css.ts +0 -27
- package/attributes-master/packages/inject/src/actions/prefetch.ts +0 -44
- package/attributes-master/packages/inject/src/factory.ts +0 -123
- package/attributes-master/packages/inject/src/index.ts +0 -3
- package/attributes-master/packages/inject/src/init.ts +0 -22
- package/attributes-master/packages/inject/src/utils/constants.ts +0 -89
- package/attributes-master/packages/inject/src/utils/helpers.ts +0 -36
- package/attributes-master/packages/inject/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/inject/src/utils/types.ts +0 -16
- package/attributes-master/packages/inject/tsconfig.json +0 -3
- package/attributes-master/packages/inputactive/CHANGELOG.md +0 -58
- package/attributes-master/packages/inputactive/README.md +0 -25
- package/attributes-master/packages/inputactive/package.json +0 -22
- package/attributes-master/packages/inputactive/src/actions/classes.ts +0 -43
- package/attributes-master/packages/inputactive/src/factory.ts +0 -24
- package/attributes-master/packages/inputactive/src/index.ts +0 -3
- package/attributes-master/packages/inputactive/src/init.ts +0 -18
- package/attributes-master/packages/inputactive/src/utils/constants.ts +0 -13
- package/attributes-master/packages/inputactive/src/utils/selectors.ts +0 -5
- package/attributes-master/packages/inputactive/tsconfig.json +0 -3
- package/attributes-master/packages/inputcounter/CHANGELOG.md +0 -110
- package/attributes-master/packages/inputcounter/README.md +0 -25
- package/attributes-master/packages/inputcounter/package.json +0 -22
- package/attributes-master/packages/inputcounter/src/actions/a11y.ts +0 -23
- package/attributes-master/packages/inputcounter/src/actions/buttons.ts +0 -61
- package/attributes-master/packages/inputcounter/src/actions/input.ts +0 -31
- package/attributes-master/packages/inputcounter/src/actions/style.ts +0 -12
- package/attributes-master/packages/inputcounter/src/factory.ts +0 -51
- package/attributes-master/packages/inputcounter/src/index.ts +0 -3
- package/attributes-master/packages/inputcounter/src/init.ts +0 -22
- package/attributes-master/packages/inputcounter/src/utils/constants.ts +0 -59
- package/attributes-master/packages/inputcounter/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/inputcounter/tsconfig.json +0 -3
- package/attributes-master/packages/list/CHANGELOG.md +0 -185
- package/attributes-master/packages/list/README.md +0 -331
- package/attributes-master/packages/list/package.json +0 -37
- package/attributes-master/packages/list/src/combine/index.ts +0 -38
- package/attributes-master/packages/list/src/components/List.ts +0 -861
- package/attributes-master/packages/list/src/components/ListItem.ts +0 -229
- package/attributes-master/packages/list/src/components/index.ts +0 -2
- package/attributes-master/packages/list/src/factory.ts +0 -130
- package/attributes-master/packages/list/src/filter/dynamic/conditions.ts +0 -639
- package/attributes-master/packages/list/src/filter/dynamic/groups.ts +0 -221
- package/attributes-master/packages/list/src/filter/dynamic/index.ts +0 -119
- package/attributes-master/packages/list/src/filter/dynamic/utils.ts +0 -44
- package/attributes-master/packages/list/src/filter/elements.ts +0 -93
- package/attributes-master/packages/list/src/filter/filter.ts +0 -118
- package/attributes-master/packages/list/src/filter/filter.worker.ts +0 -152
- package/attributes-master/packages/list/src/filter/index.ts +0 -94
- package/attributes-master/packages/list/src/filter/standard/conditions.ts +0 -123
- package/attributes-master/packages/list/src/filter/standard/facets.ts +0 -253
- package/attributes-master/packages/list/src/filter/standard/index.ts +0 -176
- package/attributes-master/packages/list/src/filter/standard/query.ts +0 -111
- package/attributes-master/packages/list/src/filter/tags.ts +0 -314
- package/attributes-master/packages/list/src/filter/types.ts +0 -62
- package/attributes-master/packages/list/src/filter/utils.ts +0 -126
- package/attributes-master/packages/list/src/index.ts +0 -4
- package/attributes-master/packages/list/src/init.ts +0 -38
- package/attributes-master/packages/list/src/load/all.ts +0 -27
- package/attributes-master/packages/list/src/load/elements.ts +0 -39
- package/attributes-master/packages/list/src/load/index.ts +0 -63
- package/attributes-master/packages/list/src/load/infinite.ts +0 -79
- package/attributes-master/packages/list/src/load/load.ts +0 -191
- package/attributes-master/packages/list/src/load/more.ts +0 -97
- package/attributes-master/packages/list/src/load/pagination.ts +0 -402
- package/attributes-master/packages/list/src/nest/index.ts +0 -198
- package/attributes-master/packages/list/src/prevnext/index.ts +0 -98
- package/attributes-master/packages/list/src/select/index.ts +0 -56
- package/attributes-master/packages/list/src/slider/index.ts +0 -62
- package/attributes-master/packages/list/src/sort/buttons.ts +0 -96
- package/attributes-master/packages/list/src/sort/dropdown.ts +0 -179
- package/attributes-master/packages/list/src/sort/index.ts +0 -81
- package/attributes-master/packages/list/src/sort/query.ts +0 -63
- package/attributes-master/packages/list/src/sort/select.ts +0 -67
- package/attributes-master/packages/list/src/sort/sort.ts +0 -79
- package/attributes-master/packages/list/src/sort/types.ts +0 -28
- package/attributes-master/packages/list/src/static/index.ts +0 -73
- package/attributes-master/packages/list/src/tabs/index.ts +0 -97
- package/attributes-master/packages/list/src/utils/constants.ts +0 -728
- package/attributes-master/packages/list/src/utils/dom.ts +0 -108
- package/attributes-master/packages/list/src/utils/pagination.ts +0 -14
- package/attributes-master/packages/list/src/utils/selectors.ts +0 -18
- package/attributes-master/packages/list/src/utils/store.ts +0 -5
- package/attributes-master/packages/list/tsconfig.json +0 -3
- package/attributes-master/packages/mirrorclick/CHANGELOG.md +0 -171
- package/attributes-master/packages/mirrorclick/README.md +0 -25
- package/attributes-master/packages/mirrorclick/package.json +0 -22
- package/attributes-master/packages/mirrorclick/src/index.ts +0 -3
- package/attributes-master/packages/mirrorclick/src/init.ts +0 -35
- package/attributes-master/packages/mirrorclick/src/utils/constants.ts +0 -20
- package/attributes-master/packages/mirrorclick/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/mirrorclick/tsconfig.json +0 -3
- package/attributes-master/packages/mirrorinput/CHANGELOG.md +0 -172
- package/attributes-master/packages/mirrorinput/README.md +0 -25
- package/attributes-master/packages/mirrorinput/package.json +0 -22
- package/attributes-master/packages/mirrorinput/src/index.ts +0 -3
- package/attributes-master/packages/mirrorinput/src/init.ts +0 -48
- package/attributes-master/packages/mirrorinput/src/utils/constants.ts +0 -15
- package/attributes-master/packages/mirrorinput/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/mirrorinput/tsconfig.json +0 -3
- package/attributes-master/packages/modal/CHANGELOG.md +0 -94
- package/attributes-master/packages/modal/README.md +0 -29
- package/attributes-master/packages/modal/package.json +0 -23
- package/attributes-master/packages/modal/src/actions/a11y.ts +0 -46
- package/attributes-master/packages/modal/src/actions/modal.ts +0 -164
- package/attributes-master/packages/modal/src/actions/settings.ts +0 -21
- package/attributes-master/packages/modal/src/factory.ts +0 -26
- package/attributes-master/packages/modal/src/index.ts +0 -3
- package/attributes-master/packages/modal/src/init.ts +0 -22
- package/attributes-master/packages/modal/src/utils/constants.ts +0 -54
- package/attributes-master/packages/modal/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/modal/src/utils/types.ts +0 -12
- package/attributes-master/packages/modal/tsconfig.json +0 -3
- package/attributes-master/packages/numbercount/CHANGELOG.md +0 -90
- package/attributes-master/packages/numbercount/README.md +0 -27
- package/attributes-master/packages/numbercount/package.json +0 -23
- package/attributes-master/packages/numbercount/src/actions/a11y.ts +0 -26
- package/attributes-master/packages/numbercount/src/actions/animate.ts +0 -43
- package/attributes-master/packages/numbercount/src/actions/observe.ts +0 -44
- package/attributes-master/packages/numbercount/src/factory.ts +0 -31
- package/attributes-master/packages/numbercount/src/index.ts +0 -3
- package/attributes-master/packages/numbercount/src/init.ts +0 -22
- package/attributes-master/packages/numbercount/src/utils/constants.ts +0 -40
- package/attributes-master/packages/numbercount/src/utils/helpers.ts +0 -31
- package/attributes-master/packages/numbercount/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/numbercount/tsconfig.json +0 -3
- package/attributes-master/packages/queryparam/CHANGELOG.md +0 -118
- package/attributes-master/packages/queryparam/README.md +0 -25
- package/attributes-master/packages/queryparam/package.json +0 -22
- package/attributes-master/packages/queryparam/src/factory.ts +0 -51
- package/attributes-master/packages/queryparam/src/index.ts +0 -3
- package/attributes-master/packages/queryparam/src/init.ts +0 -40
- package/attributes-master/packages/queryparam/src/utils/constants.ts +0 -18
- package/attributes-master/packages/queryparam/src/utils/selectors.ts +0 -5
- package/attributes-master/packages/queryparam/tsconfig.json +0 -3
- package/attributes-master/packages/rangeslider/CHANGELOG.md +0 -236
- package/attributes-master/packages/rangeslider/README.md +0 -95
- package/attributes-master/packages/rangeslider/package.json +0 -23
- package/attributes-master/packages/rangeslider/src/actions/a11y.ts +0 -21
- package/attributes-master/packages/rangeslider/src/actions/events.ts +0 -9
- package/attributes-master/packages/rangeslider/src/actions/settings.ts +0 -97
- package/attributes-master/packages/rangeslider/src/actions/styles.ts +0 -10
- package/attributes-master/packages/rangeslider/src/actions/values.ts +0 -47
- package/attributes-master/packages/rangeslider/src/components/Fill.ts +0 -70
- package/attributes-master/packages/rangeslider/src/components/Handle.ts +0 -281
- package/attributes-master/packages/rangeslider/src/factory.ts +0 -100
- package/attributes-master/packages/rangeslider/src/index.ts +0 -3
- package/attributes-master/packages/rangeslider/src/init.ts +0 -194
- package/attributes-master/packages/rangeslider/src/utils/constants.ts +0 -87
- package/attributes-master/packages/rangeslider/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/rangeslider/src/utils/types.ts +0 -6
- package/attributes-master/packages/rangeslider/tsconfig.json +0 -3
- package/attributes-master/packages/readtime/CHANGELOG.md +0 -108
- package/attributes-master/packages/readtime/README.md +0 -25
- package/attributes-master/packages/readtime/package.json +0 -22
- package/attributes-master/packages/readtime/src/factory.ts +0 -21
- package/attributes-master/packages/readtime/src/index.ts +0 -3
- package/attributes-master/packages/readtime/src/init.ts +0 -19
- package/attributes-master/packages/readtime/src/utils/constants.ts +0 -33
- package/attributes-master/packages/readtime/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/readtime/tsconfig.json +0 -3
- package/attributes-master/packages/removequery/CHANGELOG.md +0 -8
- package/attributes-master/packages/removequery/README.md +0 -25
- package/attributes-master/packages/removequery/package.json +0 -22
- package/attributes-master/packages/removequery/src/index.ts +0 -3
- package/attributes-master/packages/removequery/src/init.ts +0 -18
- package/attributes-master/packages/removequery/src/utils/constants.ts +0 -5
- package/attributes-master/packages/removequery/tsconfig.json +0 -3
- package/attributes-master/packages/scrolldisable/CHANGELOG.md +0 -164
- package/attributes-master/packages/scrolldisable/README.md +0 -29
- package/attributes-master/packages/scrolldisable/package.json +0 -27
- package/attributes-master/packages/scrolldisable/src/click.ts +0 -40
- package/attributes-master/packages/scrolldisable/src/display.ts +0 -117
- package/attributes-master/packages/scrolldisable/src/index.ts +0 -3
- package/attributes-master/packages/scrolldisable/src/init.ts +0 -36
- package/attributes-master/packages/scrolldisable/src/scroll.ts +0 -63
- package/attributes-master/packages/scrolldisable/src/utils/constants.ts +0 -56
- package/attributes-master/packages/scrolldisable/src/utils/selectors.ts +0 -6
- package/attributes-master/packages/scrolldisable/tsconfig.json +0 -3
- package/attributes-master/packages/selectcustom/CHANGELOG.md +0 -242
- package/attributes-master/packages/selectcustom/README.md +0 -25
- package/attributes-master/packages/selectcustom/package.json +0 -23
- package/attributes-master/packages/selectcustom/src/actions/a11y.ts +0 -29
- package/attributes-master/packages/selectcustom/src/actions/events.ts +0 -159
- package/attributes-master/packages/selectcustom/src/actions/observe.ts +0 -83
- package/attributes-master/packages/selectcustom/src/actions/populate.ts +0 -67
- package/attributes-master/packages/selectcustom/src/actions/settings.ts +0 -68
- package/attributes-master/packages/selectcustom/src/actions/state.ts +0 -41
- package/attributes-master/packages/selectcustom/src/index.ts +0 -3
- package/attributes-master/packages/selectcustom/src/init.ts +0 -51
- package/attributes-master/packages/selectcustom/src/utils/constants.ts +0 -34
- package/attributes-master/packages/selectcustom/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/selectcustom/src/utils/types.ts +0 -14
- package/attributes-master/packages/selectcustom/tsconfig.json +0 -3
- package/attributes-master/packages/sliderdots/CHANGELOG.md +0 -220
- package/attributes-master/packages/sliderdots/README.md +0 -27
- package/attributes-master/packages/sliderdots/package.json +0 -22
- package/attributes-master/packages/sliderdots/src/actions/events.ts +0 -26
- package/attributes-master/packages/sliderdots/src/actions/observe.ts +0 -40
- package/attributes-master/packages/sliderdots/src/actions/populate.ts +0 -46
- package/attributes-master/packages/sliderdots/src/actions/sync.ts +0 -28
- package/attributes-master/packages/sliderdots/src/actions/wait.ts +0 -28
- package/attributes-master/packages/sliderdots/src/factory.ts +0 -57
- package/attributes-master/packages/sliderdots/src/index.ts +0 -3
- package/attributes-master/packages/sliderdots/src/init.ts +0 -30
- package/attributes-master/packages/sliderdots/src/utils/constants.ts +0 -33
- package/attributes-master/packages/sliderdots/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/sliderdots/src/utils/types.ts +0 -7
- package/attributes-master/packages/sliderdots/tsconfig.json +0 -3
- package/attributes-master/packages/smartlightbox/CHANGELOG.md +0 -203
- package/attributes-master/packages/smartlightbox/README.md +0 -25
- package/attributes-master/packages/smartlightbox/package.json +0 -22
- package/attributes-master/packages/smartlightbox/src/actions/collect.ts +0 -15
- package/attributes-master/packages/smartlightbox/src/actions/move.ts +0 -25
- package/attributes-master/packages/smartlightbox/src/index.ts +0 -3
- package/attributes-master/packages/smartlightbox/src/init.ts +0 -61
- package/attributes-master/packages/smartlightbox/src/utils/constants.ts +0 -31
- package/attributes-master/packages/smartlightbox/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/smartlightbox/tsconfig.json +0 -3
- package/attributes-master/packages/socialshare/CHANGELOG.md +0 -170
- package/attributes-master/packages/socialshare/README.md +0 -25
- package/attributes-master/packages/socialshare/package.json +0 -25
- package/attributes-master/packages/socialshare/src/actions/collect.ts +0 -93
- package/attributes-master/packages/socialshare/src/actions/share.ts +0 -91
- package/attributes-master/packages/socialshare/src/actions/trigger.ts +0 -46
- package/attributes-master/packages/socialshare/src/factory.ts +0 -149
- package/attributes-master/packages/socialshare/src/index.ts +0 -3
- package/attributes-master/packages/socialshare/src/init.ts +0 -35
- package/attributes-master/packages/socialshare/src/utils/constants.ts +0 -94
- package/attributes-master/packages/socialshare/src/utils/dom.ts +0 -8
- package/attributes-master/packages/socialshare/src/utils/selectors.ts +0 -6
- package/attributes-master/packages/socialshare/src/utils/stores.ts +0 -10
- package/attributes-master/packages/socialshare/src/utils/types.ts +0 -34
- package/attributes-master/packages/socialshare/tsconfig.json +0 -3
- package/attributes-master/packages/starrating/CHANGELOG.md +0 -70
- package/attributes-master/packages/starrating/README.md +0 -25
- package/attributes-master/packages/starrating/package.json +0 -22
- package/attributes-master/packages/starrating/src/actions/classes.ts +0 -41
- package/attributes-master/packages/starrating/src/actions/events.ts +0 -80
- package/attributes-master/packages/starrating/src/factory.ts +0 -24
- package/attributes-master/packages/starrating/src/index.ts +0 -3
- package/attributes-master/packages/starrating/src/init.ts +0 -24
- package/attributes-master/packages/starrating/src/utils/constants.ts +0 -20
- package/attributes-master/packages/starrating/src/utils/helpers.ts +0 -63
- package/attributes-master/packages/starrating/src/utils/selectors.ts +0 -9
- package/attributes-master/packages/starrating/tsconfig.json +0 -3
- package/attributes-master/packages/template/README.md +0 -25
- package/attributes-master/packages/template/package.json +0 -22
- package/attributes-master/packages/template/src/actions/console.ts +0 -4
- package/attributes-master/packages/template/src/index.ts +0 -3
- package/attributes-master/packages/template/src/init.ts +0 -14
- package/attributes-master/packages/template/src/utils/constants.ts +0 -18
- package/attributes-master/packages/template/src/utils/selectors.ts +0 -5
- package/attributes-master/packages/template/tsconfig.json +0 -3
- package/attributes-master/packages/toc/CHANGELOG.md +0 -192
- package/attributes-master/packages/toc/README.md +0 -25
- package/attributes-master/packages/toc/package.json +0 -23
- package/attributes-master/packages/toc/src/actions/collect.ts +0 -136
- package/attributes-master/packages/toc/src/actions/create.ts +0 -44
- package/attributes-master/packages/toc/src/actions/events.ts +0 -29
- package/attributes-master/packages/toc/src/actions/observe.ts +0 -31
- package/attributes-master/packages/toc/src/actions/populate.ts +0 -68
- package/attributes-master/packages/toc/src/actions/prepare.ts +0 -25
- package/attributes-master/packages/toc/src/actions/scroll.ts +0 -33
- package/attributes-master/packages/toc/src/components/TOCItem.ts +0 -88
- package/attributes-master/packages/toc/src/factory.ts +0 -47
- package/attributes-master/packages/toc/src/index.ts +0 -3
- package/attributes-master/packages/toc/src/init.ts +0 -37
- package/attributes-master/packages/toc/src/utils/constants.ts +0 -55
- package/attributes-master/packages/toc/src/utils/helpers.ts +0 -23
- package/attributes-master/packages/toc/src/utils/selectors.ts +0 -6
- package/attributes-master/packages/toc/src/utils/types.ts +0 -21
- package/attributes-master/packages/toc/tsconfig.json +0 -3
- package/attributes-master/packages/utils/CHANGELOG.md +0 -43
- package/attributes-master/packages/utils/package.json +0 -27
- package/attributes-master/packages/utils/src/animations/factory.ts +0 -100
- package/attributes-master/packages/utils/src/animations/index.ts +0 -73
- package/attributes-master/packages/utils/src/animations/types.ts +0 -37
- package/attributes-master/packages/utils/src/components/Interaction.ts +0 -79
- package/attributes-master/packages/utils/src/components/Renderer.ts +0 -59
- package/attributes-master/packages/utils/src/components/index.ts +0 -2
- package/attributes-master/packages/utils/src/constants/a11y.ts +0 -50
- package/attributes-master/packages/utils/src/constants/attributes.ts +0 -57
- package/attributes-master/packages/utils/src/constants/index.ts +0 -5
- package/attributes-master/packages/utils/src/constants/keyboard.ts +0 -10
- package/attributes-master/packages/utils/src/constants/webflow.ts +0 -74
- package/attributes-master/packages/utils/src/helpers/dates.ts +0 -17
- package/attributes-master/packages/utils/src/helpers/dom.ts +0 -82
- package/attributes-master/packages/utils/src/helpers/events.ts +0 -59
- package/attributes-master/packages/utils/src/helpers/fetch.ts +0 -217
- package/attributes-master/packages/utils/src/helpers/forms.ts +0 -238
- package/attributes-master/packages/utils/src/helpers/guards.ts +0 -138
- package/attributes-master/packages/utils/src/helpers/index.ts +0 -11
- package/attributes-master/packages/utils/src/helpers/numbers.ts +0 -86
- package/attributes-master/packages/utils/src/helpers/selectors.ts +0 -249
- package/attributes-master/packages/utils/src/helpers/strings.ts +0 -19
- package/attributes-master/packages/utils/src/helpers/wait.ts +0 -36
- package/attributes-master/packages/utils/src/helpers/webflow.ts +0 -117
- package/attributes-master/packages/utils/src/index.ts +0 -5
- package/attributes-master/packages/utils/src/types/core.ts +0 -100
- package/attributes-master/packages/utils/src/types/dom.ts +0 -31
- package/attributes-master/packages/utils/src/types/index.ts +0 -4
- package/attributes-master/packages/utils/src/types/utils.ts +0 -20
- package/attributes-master/packages/utils/src/types/webflow.ts +0 -147
- package/attributes-master/packages/utils/tsconfig.json +0 -3
- package/attributes-master/packages/videohls/CHANGELOG.md +0 -76
- package/attributes-master/packages/videohls/README.md +0 -27
- package/attributes-master/packages/videohls/package.json +0 -26
- package/attributes-master/packages/videohls/src/actions/list.ts +0 -23
- package/attributes-master/packages/videohls/src/actions/video.ts +0 -44
- package/attributes-master/packages/videohls/src/index.ts +0 -3
- package/attributes-master/packages/videohls/src/init.ts +0 -28
- package/attributes-master/packages/videohls/src/utils/constants.ts +0 -12
- package/attributes-master/packages/videohls/src/utils/selectors.ts +0 -5
- package/attributes-master/packages/videohls/src/utils/stores.ts +0 -3
- package/attributes-master/packages/videohls/tsconfig.json +0 -3
- package/attributes-master/pnpm-lock.yaml +0 -3317
- package/attributes-master/pnpm-workspace.yaml +0 -3
- package/attributes-master/tsconfig.json +0 -6
- package/autoInit/smooth-scroll.js +0 -89
- package/utils/navbar.js +0 -214
- package/utils/scroll-progress.js +0 -29
- package/utils/toc.js +0 -77
@@ -1,185 +0,0 @@
|
|
1
|
-
# @finsweet/attributes-list
|
2
|
-
|
3
|
-
## 1.5.0
|
4
|
-
|
5
|
-
### Minor Changes
|
6
|
-
|
7
|
-
- bc17316: feat: `fs-list-showtag`
|
8
|
-
|
9
|
-
## 1.4.7
|
10
|
-
|
11
|
-
### Patch Changes
|
12
|
-
|
13
|
-
- 978384a: fix: support `fs-list-element="facet-count"` for elements that are rendered after initializing filters
|
14
|
-
|
15
|
-
## 1.4.6
|
16
|
-
|
17
|
-
### Patch Changes
|
18
|
-
|
19
|
-
- 3b9fe56: fix: don't set empty arrays in query params
|
20
|
-
|
21
|
-
## 1.4.5
|
22
|
-
|
23
|
-
### Patch Changes
|
24
|
-
|
25
|
-
- 81e9e3e: fix: only JSON.stringify array values for query params
|
26
|
-
- 124839b: fix: query params filters reactivity
|
27
|
-
|
28
|
-
## 1.4.4
|
29
|
-
|
30
|
-
### Patch Changes
|
31
|
-
|
32
|
-
- 2f45dd5: fix: hide next buttons correclty when items are filtered
|
33
|
-
|
34
|
-
## 1.4.3
|
35
|
-
|
36
|
-
### Patch Changes
|
37
|
-
|
38
|
-
- 621ed61: fix: hide pagination next when itemsPerPage > items.length
|
39
|
-
|
40
|
-
## 1.4.2
|
41
|
-
|
42
|
-
### Patch Changes
|
43
|
-
|
44
|
-
- 6246fbb: fix: combine + pagination
|
45
|
-
- 2eac30b: fix: prevent race conditions in facet counts
|
46
|
-
- d2af879: fix: filtering items with nested properties
|
47
|
-
|
48
|
-
## 1.4.1
|
49
|
-
|
50
|
-
### Patch Changes
|
51
|
-
|
52
|
-
- Updated dependencies [2af0bad]
|
53
|
-
- @finsweet/attributes-utils@0.1.0
|
54
|
-
|
55
|
-
## 1.4.0
|
56
|
-
|
57
|
-
### Minor Changes
|
58
|
-
|
59
|
-
- 4805858: feat: beautify query params
|
60
|
-
|
61
|
-
### Patch Changes
|
62
|
-
|
63
|
-
- 4805858: fix: respect `fs-list-allowsubmit` for sorting forms
|
64
|
-
|
65
|
-
## 1.3.1
|
66
|
-
|
67
|
-
### Patch Changes
|
68
|
-
|
69
|
-
- Updated dependencies [378d74d]
|
70
|
-
- @finsweet/attributes-utils@0.0.6
|
71
|
-
|
72
|
-
## 1.3.0
|
73
|
-
|
74
|
-
### Minor Changes
|
75
|
-
|
76
|
-
- 8c7ab62: feat: support debouncing in dynamic mode
|
77
|
-
|
78
|
-
### Patch Changes
|
79
|
-
|
80
|
-
- 102879c: chore: trim field attributes
|
81
|
-
- f5b70e5: chore: remove console logs in the wild
|
82
|
-
|
83
|
-
## 1.2.9
|
84
|
-
|
85
|
-
### Patch Changes
|
86
|
-
|
87
|
-
- c685c7b: fix: active class removal
|
88
|
-
- Updated dependencies [01973d8]
|
89
|
-
- @finsweet/attributes-utils@0.0.5
|
90
|
-
|
91
|
-
## 1.2.8
|
92
|
-
|
93
|
-
### Patch Changes
|
94
|
-
|
95
|
-
- Updated dependencies [deef758]
|
96
|
-
- @finsweet/attributes-utils@0.0.4
|
97
|
-
|
98
|
-
## 1.2.7
|
99
|
-
|
100
|
-
### Patch Changes
|
101
|
-
|
102
|
-
- 1c2900f: fix: support 2 way binding for dynamic filter values
|
103
|
-
- d21cbca: refactor: unify form field value getters and setters
|
104
|
-
- Updated dependencies [d21cbca]
|
105
|
-
- @finsweet/attributes-utils@0.0.3
|
106
|
-
|
107
|
-
## 1.2.6
|
108
|
-
|
109
|
-
### Patch Changes
|
110
|
-
|
111
|
-
- 58529b7: fix: make infinite loading more responsive
|
112
|
-
- ed6876f: fix: update page count in more/infinite modes
|
113
|
-
|
114
|
-
## 1.2.5
|
115
|
-
|
116
|
-
### Patch Changes
|
117
|
-
|
118
|
-
- 216237e: fix: fall back fs-list-loadcount source to the list element
|
119
|
-
- b84f8cd: fix: support `fs-list-element="clear"` in dynamic mode
|
120
|
-
|
121
|
-
## 1.2.4
|
122
|
-
|
123
|
-
### Patch Changes
|
124
|
-
|
125
|
-
- 87fef70: fix: resetix
|
126
|
-
|
127
|
-
## 1.2.3
|
128
|
-
|
129
|
-
### Patch Changes
|
130
|
-
|
131
|
-
- 76a962f: fix: only highlight text nodes
|
132
|
-
|
133
|
-
## 1.2.2
|
134
|
-
|
135
|
-
### Patch Changes
|
136
|
-
|
137
|
-
- c7b544d: chore: updated dependencies
|
138
|
-
- Updated dependencies [c7b544d]
|
139
|
-
- @finsweet/attributes-utils@0.0.2
|
140
|
-
|
141
|
-
## 1.2.1
|
142
|
-
|
143
|
-
### Patch Changes
|
144
|
-
|
145
|
-
- 43ffe73: fix: removal of items
|
146
|
-
|
147
|
-
## 1.2.0
|
148
|
-
|
149
|
-
### Minor Changes
|
150
|
-
|
151
|
-
- 205c30b: feat: list animations
|
152
|
-
|
153
|
-
### Patch Changes
|
154
|
-
|
155
|
-
- f349526: chore: finalize animations
|
156
|
-
|
157
|
-
## 1.1.0
|
158
|
-
|
159
|
-
### Minor Changes
|
160
|
-
|
161
|
-
- 3f92ebb: feat: remove tags in dynamic mode
|
162
|
-
|
163
|
-
## 1.0.0
|
164
|
-
|
165
|
-
### Major Changes
|
166
|
-
|
167
|
-
- 99ec3f2: feat: fs-list
|
168
|
-
|
169
|
-
## 0.1.1
|
170
|
-
|
171
|
-
### Patch Changes
|
172
|
-
|
173
|
-
- b56e5e5: rename fsAttribute in places of usage to finsweetAttribute
|
174
|
-
- Updated dependencies [b56e5e5]
|
175
|
-
- @finsweet/attributes-utils@0.0.1
|
176
|
-
|
177
|
-
## 0.1.0
|
178
|
-
|
179
|
-
### Minor Changes
|
180
|
-
|
181
|
-
- e2ca8e3: fs-list: added automatic & manual nesting
|
182
|
-
|
183
|
-
### Patch Changes
|
184
|
-
|
185
|
-
- 7081cb7: fs-list: renamed "load" options
|
@@ -1,331 +0,0 @@
|
|
1
|
-
# `list` Attribute
|
2
|
-
|
3
|
-
Supercharge your Webflow CMS and static lists.
|
4
|
-
|
5
|
-
## Getting Started
|
6
|
-
|
7
|
-
Please follow the documentation at [finsweet.com/attributes](https://www.finsweet.com/attributes) to learn how to use Attributes in your Webflow projects.
|
8
|
-
|
9
|
-
## Accessing the API
|
10
|
-
|
11
|
-
To learn how to access the API, please check the general [API Reference](../attributes/README.md#api-reference) documentation:
|
12
|
-
|
13
|
-
```javascript
|
14
|
-
window.FinsweetAttributes ||= [];
|
15
|
-
window.FinsweetAttributes.push([
|
16
|
-
'list',
|
17
|
-
(listInstances) => {
|
18
|
-
// Your code goes here.
|
19
|
-
},
|
20
|
-
]);
|
21
|
-
```
|
22
|
-
|
23
|
-
The `result` object contains the [List](#the-list-object) instances that are currently active on the page.
|
24
|
-
|
25
|
-
## The `List` object
|
26
|
-
|
27
|
-
### Reactivity
|
28
|
-
|
29
|
-
List instances have a set of [reactive properties](#reactive-properties) powered by [@vue/reactivity](https://vuejs.org/api/reactivity-core.html). These properties allow us to track them and run logic when they change.
|
30
|
-
|
31
|
-
### Lifecycle of the items
|
32
|
-
|
33
|
-
The items in the list instances follow a lifecycle that is divided into the following phases:
|
34
|
-
|
35
|
-
1. `start`: The items are in their initial state.
|
36
|
-
2. `filter`: The items are being filtered.
|
37
|
-
3. `sort`: The items are being sorted.
|
38
|
-
4. `pagination`: The items are being paginated.
|
39
|
-
5. `beforeRender`: The items are about to be rendered.
|
40
|
-
6. `render`: The items are being rendered.
|
41
|
-
7. `afterRender`: The items have been rendered.
|
42
|
-
|
43
|
-
Not all phases are always executed, as the lifecycle may start at any point depending on the actions taken by the user. For example, if the user interacts with the sorting controls, the lifecycle will start at the `sort` phase. If the user interacts with the pagination controls, the lifecycle will start at the `pagination` phase.
|
44
|
-
|
45
|
-
You can hook into any of these phases by using the [List.addHook()](#listaddhookkey-callback) method, allowing you to run custom logic and interact with the items at any point in the lifecycle.
|
46
|
-
|
47
|
-
### Adding and removing items from the list
|
48
|
-
|
49
|
-
The [List.items](#reactive-properties) property is a [shallowRef](https://vuejs.org/api/reactivity-advanced#shallowref) array that contains the items in the list. You can add and remove items from the list by simply mutating the array:
|
50
|
-
|
51
|
-
```javascript
|
52
|
-
listInstance.items.value = listInstance.items.value.filter((item) => {
|
53
|
-
return item.fields.target.value === 'adults';
|
54
|
-
});
|
55
|
-
```
|
56
|
-
|
57
|
-
To create new item instances, you can use the [List.createItem()](#listcreateitemelement) method, which takes a DOM element as an argument and returns a new [ListItem](#the-listitem-object) instance:
|
58
|
-
|
59
|
-
```javascript
|
60
|
-
const newItem = listInstance.createItem(element);
|
61
|
-
|
62
|
-
listInstance.items.value = [...listInstance.items.value, newItem];
|
63
|
-
```
|
64
|
-
|
65
|
-
### Updating the filters
|
66
|
-
|
67
|
-
The [List.filters](#reactive-properties) property is a [ref](https://vuejs.org/api/reactivity-core.html#ref) object that contains the filters applied to the list. You can update the filters by simply mutating the object:
|
68
|
-
|
69
|
-
```javascript
|
70
|
-
listInstance.filters.value.groups[0].conditions.push({
|
71
|
-
id: 'new-condition',
|
72
|
-
type: 'checkbox',
|
73
|
-
fieldKey: 'premium',
|
74
|
-
op: 'equal',
|
75
|
-
value: 'true',
|
76
|
-
});
|
77
|
-
```
|
78
|
-
|
79
|
-
### Updating the sorting
|
80
|
-
|
81
|
-
The [List.sorting](#reactive-properties) property is a [ref](https://vuejs.org/api/reactivity-core.html#ref) object that contains the sorting applied to the list. You can update the sorting by simply mutating the object:
|
82
|
-
|
83
|
-
```javascript
|
84
|
-
listInstance.sorting.value.fieldKey = 'name';
|
85
|
-
listInstance.sorting.value.direction = 'asc';
|
86
|
-
```
|
87
|
-
|
88
|
-
### Updating the pagination
|
89
|
-
|
90
|
-
You can update the pagination by simply mutating the [List.currentPage](#reactive-properties) and/or [List.itemsPerPage](#reactive-properties) properties:
|
91
|
-
|
92
|
-
```javascript
|
93
|
-
listInstance.currentPage.value = 2;
|
94
|
-
```
|
95
|
-
|
96
|
-
### Watching for changes
|
97
|
-
|
98
|
-
You can watch for any changes to the [reactive properties](#reactive-properties) using the [List.watch()](#listwatchsource-callback-options) method:
|
99
|
-
|
100
|
-
```javascript
|
101
|
-
listInstance.watch(
|
102
|
-
() => listInstance.items,
|
103
|
-
(newItems, oldItems) => {
|
104
|
-
console.log('Items updated:', newItems, oldItems);
|
105
|
-
}
|
106
|
-
);
|
107
|
-
```
|
108
|
-
|
109
|
-
You can also use the [List.effect()](#listeffectcallback-options) method to run a function whenever the reactive properties change:
|
110
|
-
|
111
|
-
```javascript
|
112
|
-
listInstance.effect(() => {
|
113
|
-
console.log('Total items:', listInstance.items.value.length);
|
114
|
-
});
|
115
|
-
```
|
116
|
-
|
117
|
-
### Reactive properties
|
118
|
-
|
119
|
-
| Property | Reactive Type | Value Type | Description |
|
120
|
-
| --------------- | ------------------------------------------------------------------ | ---------------------------------- | ---------------------------------------------------- |
|
121
|
-
| `items` | [shallowRef](https://vuejs.org/api/reactivity-advanced#shallowref) | [ListItem[]](#the-listitem-object) | The items in the list. |
|
122
|
-
| `filters` | [ref](https://vuejs.org/api/reactivity-core.html#ref) | [Filters](#the-filters-object) | The filters applied to the list. |
|
123
|
-
| `sorting` | [ref](https://vuejs.org/api/reactivity-core.html#ref) | [Sorting](#the-sorting-object) | The sorting applied to the list. |
|
124
|
-
| `currentPage` | [ref](https://vuejs.org/api/reactivity-core.html#ref) | `number` | The current page number. |
|
125
|
-
| `itemsPerPage` | [ref](https://vuejs.org/api/reactivity-core.html#ref) | `number` | The amount of items to display on each page. |
|
126
|
-
| `totalPages` | [computed](https://vuejs.org/api/reactivity-core.html#computed) | `number` | The total number of pages. |
|
127
|
-
| `hasInteracted` | [computed](https://vuejs.org/api/reactivity-core.html#computed) | `number` | Defines if the user has interacted with the filters. |
|
128
|
-
| `allFieldsData` | [computed](https://vuejs.org/api/reactivity-core.html#computed) | `Object` | Defines the data for all item fields in the list. |
|
129
|
-
|
130
|
-
### Standard properties
|
131
|
-
|
132
|
-
| Property | Type | Description |
|
133
|
-
| ------------------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
134
|
-
| `pageIndex` | `number` | The index of the list in the page. |
|
135
|
-
| `instance` | `string \| null` | The instance key of the list, if defined using `[fs-list-instance]`. |
|
136
|
-
| `wrapperElement` | `HTMLElement` | The wrapper element of the list. |
|
137
|
-
| `listElement` | `HTMLElement \| null` | The list element. |
|
138
|
-
| `paginationWrapperElement` | `HTMLElement \| null \| undefined` | The pagination wrapper element. |
|
139
|
-
| `paginationCountElement` | `HTMLElement \| null \| undefined` | The page count element. |
|
140
|
-
| `initialElement` | `HTMLElement \| null \| undefined` | An initial element to display when there are no filters applied. |
|
141
|
-
| `loaderElement` | `HTMLElement \| null \| undefined` | A custom loader element. |
|
142
|
-
| `itemsCountElement` | `HTMLElement \| null \| undefined` | An element that displays the total amount of items in the list. |
|
143
|
-
| `resultsCountElement` | `HTMLElement \| null \| undefined` | An element that displays the total amount of items after filtering. |
|
144
|
-
| `visibleCountElement` | `HTMLElement \| null \| undefined` | An element that displays the amount of visible items. |
|
145
|
-
| `visibleCountFromElement` | `HTMLElement \| null \| undefined` | An element that displays the lower range of visible items. |
|
146
|
-
| `visibleCountToElement` | `HTMLElement \| null \| undefined` | An element that displays the upper range of visible items. |
|
147
|
-
| `scrollAnchorElement` | `HTMLElement \| null \| undefined` | The scroll anchor element. |
|
148
|
-
| `scrollAnchorFilterElement` | `HTMLElement \| null \| undefined` | A custom scroll anchor element for filter actions. |
|
149
|
-
| `scrollAnchorSortElement` | `HTMLElement \| null \| undefined` | A custom scroll anchor element for sort actions. |
|
150
|
-
| `scrollAnchorPaginationElement` | `HTMLElement \| null \| undefined` | A custom scroll anchor element for pagination actions. |
|
151
|
-
| `initialItemsPerPage` | `number` | Defines the original amount of items per page. |
|
152
|
-
| `showQuery` | `boolean` | Defines if the filtering, sorting and pagination state should be added to the URL. |
|
153
|
-
| `highlight` | `boolean \| undefined` | Defines if the matched fields when filtering should be highlighted. |
|
154
|
-
| `cache` | `boolean` | Defines if loaded Items can be cached using IndexedDB after fetching them. |
|
155
|
-
| `webflowModules` | `Set<WebflowModule>` | Defines the Webflow modules to restart after rendering. |
|
156
|
-
| `paginationSearchParam` | `string \| undefined` | Defines the URL query key for the paginated pages. |
|
157
|
-
| `searchParamsPrefix` | `string` | Defines the query prefix for all the list's query params. |
|
158
|
-
| `loadingSearchParamsData` | `Promise<void> \| undefined` | An awaitable Promise that resolves once the pagination data has been retrieved. |
|
159
|
-
| `loadingPaginationElements` | `Promise<void> \| undefined` | An awaitable Promise that resolves once the pagination elements have been loaded. |
|
160
|
-
| `loadingPaginatedItems` | `Promise<void> \| undefined` | An awaitable Promise that resolves once all the Webflow CMS paginated items have been loaded. |
|
161
|
-
| `readingFilters` | `boolean \| undefined` | Defines if the filter field values are being collected from the DOM or event listeners are being set. |
|
162
|
-
| `settingFilters` | `boolean \| undefined` | Defines if the filter field values are being set to the DOM. |
|
163
|
-
|
164
|
-
### Methods
|
165
|
-
|
166
|
-
#### `List.addHook(key, callback)`
|
167
|
-
|
168
|
-
The `addHook` method allows you to add a custom hook to the list instance. The hook will be called when the specified phase is reached.
|
169
|
-
|
170
|
-
It takes two arguments:
|
171
|
-
|
172
|
-
- `key` (string): The key of the hook. This should be one of the lifecycle phases: `start`, `filter`, `sort`, `pagination`, `beforeRender`, `render`, or `afterRender`.
|
173
|
-
- `callback` (function): The callback function that will be called when the hook is reached. The callback function receives as an argument the array of [items](#the-listitem-object) returned from the previous phase and accepts an array of items to be returned as well. If the callback function returns a promise, the list instance will wait for the promise to resolve before continuing with the lifecycle.
|
174
|
-
|
175
|
-
```javascript
|
176
|
-
// Ensure that only items for the current target are displayed
|
177
|
-
listInstance.addHook('filter', (items) => {
|
178
|
-
const isAdult = localStorage.getItem('isAdult') === 'true';
|
179
|
-
|
180
|
-
const filteredItems = items.filter((item) => {
|
181
|
-
return isAdult ? item.fields.target.value === 'adults' : item.fields.target.value === 'kids';
|
182
|
-
});
|
183
|
-
|
184
|
-
return filteredItems;
|
185
|
-
});
|
186
|
-
```
|
187
|
-
|
188
|
-
#### `List.triggerHook(key)`
|
189
|
-
|
190
|
-
The `triggerHook` method allows you to trigger a specific lifecycle phase. This is useful if you want to manually trigger a phase without waiting for the user to interact with the list:
|
191
|
-
|
192
|
-
```javascript
|
193
|
-
const isAdultButton = document.querySelector('#isAdultButton');
|
194
|
-
|
195
|
-
isAdultButton.addEventListener('click', () => {
|
196
|
-
localStorage.setItem('isAdult', 'true');
|
197
|
-
listInstance.triggerHook('filter');
|
198
|
-
});
|
199
|
-
```
|
200
|
-
|
201
|
-
#### `List.createItem(element)`
|
202
|
-
|
203
|
-
The `createItem` method creates a new [ListItem](#the-listitem-object) instance from a given DOM element. See [adding and removing items from the list](#adding-and-removing-items-from-the-list) for more details.
|
204
|
-
|
205
|
-
#### `List.watch(source, callback, options)`
|
206
|
-
|
207
|
-
The `watch` method from the [@vue/reactivity](https://vuejs.org/api/reactivity-core.html#watch).
|
208
|
-
|
209
|
-
#### `List.effect(callback, options)`
|
210
|
-
|
211
|
-
The `effect` method from the [@vue/reactivity](https://vuejs.org/api/reactivity-core.html#watcheffect).
|
212
|
-
|
213
|
-
#### `List.destroy()`
|
214
|
-
|
215
|
-
The `destroy` method destroys the list instance. This will remove all event listeners and reactivity tracking.
|
216
|
-
|
217
|
-
## The `ListItem` object
|
218
|
-
|
219
|
-
The `ListItem` class represents a single collection item within a list. It contains data about the item's fields, DOM elements, and provides methods for interacting with the item.
|
220
|
-
|
221
|
-
### Properties
|
222
|
-
|
223
|
-
| Property | Type | Description |
|
224
|
-
| ---------------- | ---------------------------- | ----------------------------------------------------------------------- |
|
225
|
-
| `id` | `string` | A unique ID for the item. |
|
226
|
-
| `element` | `CollectionItemElement` | The DOM element of the collection item. |
|
227
|
-
| `list` | `List` | Reference to the parent List instance. |
|
228
|
-
| `currentIndex` | `number \| undefined` | The element's current index in the rendered DOM. |
|
229
|
-
| `href` | `string \| undefined` | The URL of the item's `Template Page` if it exists. |
|
230
|
-
| `fields` | `ListItemFields` | Contains the item's field data. |
|
231
|
-
| `nesting` | `Promise<void> \| undefined` | An awaitable Promise that resolves when the item's nesting is complete. |
|
232
|
-
| `startingClass` | `string` | The class to apply before rendering the item. |
|
233
|
-
| `highlightClass` | `string` | The class to apply when highlighting matched fields during filtering. |
|
234
|
-
| `stagger` | `number \| undefined` | Defines a stagger delay for the item's transitions. |
|
235
|
-
|
236
|
-
### Field Types
|
237
|
-
|
238
|
-
Fields that are defined using the `fs-list-field` attribute are stored in the `ListItem.fields` property. By default fields are typed as text, but they can be defined as numbers or dates using the `fs-list-fieldtype` attribute.
|
239
|
-
|
240
|
-
```typescript
|
241
|
-
type ListItemFields = {
|
242
|
-
[fieldKey: string]: ListItemField;
|
243
|
-
};
|
244
|
-
|
245
|
-
type ListItemField =
|
246
|
-
| {
|
247
|
-
type: 'text';
|
248
|
-
rawValue: string | string[];
|
249
|
-
value: string | string[];
|
250
|
-
}
|
251
|
-
| {
|
252
|
-
type: 'date';
|
253
|
-
rawValue: string | string[];
|
254
|
-
value: Date | Date[];
|
255
|
-
}
|
256
|
-
| {
|
257
|
-
type: 'number';
|
258
|
-
rawValue: string | string[];
|
259
|
-
value: number | number[];
|
260
|
-
};
|
261
|
-
```
|
262
|
-
|
263
|
-
### Methods
|
264
|
-
|
265
|
-
#### `ListItem.collectFields()`
|
266
|
-
|
267
|
-
The `collectFields` method scans the item's DOM element for field elements, extracts their values, and stores them in the `ListItem.fields` property.
|
268
|
-
|
269
|
-
## The `Filters` object
|
270
|
-
|
271
|
-
The `Filters` object contains the definition of the filters applied to the list.
|
272
|
-
|
273
|
-
```typescript
|
274
|
-
type Filters = {
|
275
|
-
groupsMatch?: FilterMatch; // The match type for the groups. Defaults to 'and'.
|
276
|
-
groups: FiltersGroup[];
|
277
|
-
};
|
278
|
-
|
279
|
-
type FilterMatch = 'and' | 'or';
|
280
|
-
|
281
|
-
type FiltersGroup = {
|
282
|
-
id: string; // A unique identifier for the group.
|
283
|
-
conditionsMatch: FilterMatch; // The match type for the group conditions. Defaults to 'and'.
|
284
|
-
conditions: FiltersCondition[];
|
285
|
-
};
|
286
|
-
|
287
|
-
type FiltersCondition = {
|
288
|
-
id: string; // A unique identifier for the condition.
|
289
|
-
type: string; // The form field type.
|
290
|
-
fieldKey: string; // The field key of the condition.
|
291
|
-
value: string | string[]; // The value of the condition.
|
292
|
-
op?: FilterOperator; // The operator to use for the condition. Defaults to `contain`.
|
293
|
-
filterMatch?: FilterMatch; // The match type for the value, in case of multiple condition values. Defaults to `or`.
|
294
|
-
fieldMatch?: FilterMatch; // The match type for the field, in case of multiple field values. Defaults to `or`.
|
295
|
-
fuzzyThreshold?: number; // The threshold for fuzzy matching.
|
296
|
-
interacted?: boolean; // If the user has interacted with the form field.
|
297
|
-
customTagField?: string; // A custom field name to display in the tags.
|
298
|
-
};
|
299
|
-
|
300
|
-
type FilterOperator =
|
301
|
-
| 'start'
|
302
|
-
| 'empty'
|
303
|
-
| 'equal'
|
304
|
-
| 'not-equal'
|
305
|
-
| 'contain'
|
306
|
-
| 'not-contain'
|
307
|
-
| 'not-start'
|
308
|
-
| 'end'
|
309
|
-
| 'not-end'
|
310
|
-
| 'greater-equal'
|
311
|
-
| 'greater'
|
312
|
-
| 'less-equal'
|
313
|
-
| 'less'
|
314
|
-
| 'not-empty';
|
315
|
-
```
|
316
|
-
|
317
|
-
## The `Sorting` object
|
318
|
-
|
319
|
-
The `Sorting` object contains the definition of the sorting applied to the list.
|
320
|
-
|
321
|
-
```typescript
|
322
|
-
type Sorting = {
|
323
|
-
fieldKey?: string;
|
324
|
-
direction?: 'asc' | 'desc';
|
325
|
-
interacted?: boolean;
|
326
|
-
};
|
327
|
-
```
|
328
|
-
|
329
|
-
## License
|
330
|
-
|
331
|
-
[Apache 2.0](../../LICENSE.md)
|
@@ -1,37 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "@finsweet/attributes-list",
|
3
|
-
"version": "1.5.0",
|
4
|
-
"description": "Supercharge your Webflow CMS and static lists.",
|
5
|
-
"private": true,
|
6
|
-
"type": "module",
|
7
|
-
"types": "src/index.ts",
|
8
|
-
"scripts": {
|
9
|
-
"lint": "eslint ./src && prettier --check ./src",
|
10
|
-
"lint:fix": "eslint ./src --fix && prettier --write ./src",
|
11
|
-
"check": "tsc --noEmit"
|
12
|
-
},
|
13
|
-
"exports": {
|
14
|
-
".": {
|
15
|
-
"types": "./src/index.ts",
|
16
|
-
"import": "./src/index.ts"
|
17
|
-
},
|
18
|
-
"./selectors": {
|
19
|
-
"types": "./src/utils/selectors.ts",
|
20
|
-
"import": "./src/utils/selectors.ts"
|
21
|
-
},
|
22
|
-
"./dom": {
|
23
|
-
"types": "./src/utils/dom.ts",
|
24
|
-
"import": "./src/utils/dom.ts"
|
25
|
-
}
|
26
|
-
},
|
27
|
-
"dependencies": {
|
28
|
-
"@finsweet/attributes-utils": "workspace:*",
|
29
|
-
"@vue/reactivity": "^3.5.13",
|
30
|
-
"fuzzysort": "^3.1.0",
|
31
|
-
"just-debounce": "^1.1.0",
|
32
|
-
"just-throttle": "^4.2.0"
|
33
|
-
},
|
34
|
-
"devDependencies": {
|
35
|
-
"@types/dlv": "^1.1.5"
|
36
|
-
}
|
37
|
-
}
|
@@ -1,38 +0,0 @@
|
|
1
|
-
import { extractCommaSeparatedValues } from '@finsweet/attributes-utils';
|
2
|
-
import { effect } from '@vue/reactivity';
|
3
|
-
|
4
|
-
import type { List } from '../components';
|
5
|
-
import { listInstancesStore } from '../utils/store';
|
6
|
-
|
7
|
-
/**
|
8
|
-
* Initializes the list combine feature.
|
9
|
-
* @param targetList The target list.
|
10
|
-
* @param rawSourceInstances A comma-separated list of source instances.
|
11
|
-
* @returns A cleanup function.
|
12
|
-
*/
|
13
|
-
export const initListCombine = (targetList: List, rawSourceInstances: string) => {
|
14
|
-
const sourceInstances = extractCommaSeparatedValues(rawSourceInstances);
|
15
|
-
|
16
|
-
const sourceLists = [...listInstancesStore.values()].filter(
|
17
|
-
(list) => list !== targetList && list.instance && sourceInstances.includes(list.instance)
|
18
|
-
);
|
19
|
-
|
20
|
-
if (!sourceLists.length) return;
|
21
|
-
|
22
|
-
const cleanups = sourceLists.map((sourceList) => {
|
23
|
-
const runner = effect(() => {
|
24
|
-
if (!sourceList.items.value.length) return;
|
25
|
-
|
26
|
-
const elements = sourceList.items.value.map((item) => targetList.createItem(item.element));
|
27
|
-
|
28
|
-
sourceList.items.value = [];
|
29
|
-
targetList.items.value = [...targetList.items.value, ...elements];
|
30
|
-
});
|
31
|
-
|
32
|
-
return () => runner.effect.stop();
|
33
|
-
});
|
34
|
-
|
35
|
-
return () => {
|
36
|
-
cleanups.forEach((cleanup) => cleanup());
|
37
|
-
};
|
38
|
-
};
|