@supersoniks/concorde 4.8.0 → 4.9.1
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/.github/workflows/ci.yml +21 -0
- package/.github-export-ignore +30 -0
- package/.gitlab-ci.yml +13 -0
- package/CONTRIBUTING.md +59 -0
- package/DEV.md +54 -0
- package/LICENSE +21 -0
- package/OPEN_SOURCE_CHECKPOINT.md +133 -0
- package/README.md +29 -15
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +271 -271
- package/concorde-core.es.js +4503 -4389
- package/dist/concorde-core.bundle.js +271 -271
- package/dist/concorde-core.es.js +4503 -4389
- package/dist/docs-mock-api-sw.js +3 -2
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/dist/js/components.js +12 -0
- package/dist/js/components.js.map +1 -0
- package/dist/js/concorde-loaded.js +5 -0
- package/dist/js/concorde-loaded.js.map +1 -0
- package/dist/js/core/_types/endpoint.js +5 -0
- package/dist/js/core/_types/endpoint.js.map +1 -0
- package/dist/js/core/_types/key.js +2 -0
- package/dist/js/core/_types/key.js.map +1 -0
- package/dist/js/core/_types/types.js +3 -0
- package/dist/js/core/_types/types.js.map +1 -0
- package/dist/js/core/components/functional/date/date.js +272 -0
- package/dist/js/core/components/functional/date/date.js.map +1 -0
- package/dist/js/core/components/functional/example/example.js +44 -0
- package/dist/js/core/components/functional/example/example.js.map +1 -0
- package/dist/js/core/components/functional/fetch/fetch.js +79 -0
- package/dist/js/core/components/functional/fetch/fetch.js.map +1 -0
- package/dist/js/core/components/functional/functional.js +17 -0
- package/dist/js/core/components/functional/functional.js.map +1 -0
- package/dist/js/core/components/functional/if/if.js +39 -0
- package/dist/js/core/components/functional/if/if.js.map +1 -0
- package/dist/js/core/components/functional/list/list.js +341 -0
- package/dist/js/core/components/functional/list/list.js.map +1 -0
- package/dist/js/core/components/functional/mix/mix.js +103 -0
- package/dist/js/core/components/functional/mix/mix.js.map +1 -0
- package/dist/js/core/components/functional/queue/queue.js +386 -0
- package/dist/js/core/components/functional/queue/queue.js.map +1 -0
- package/dist/js/core/components/functional/router/redirect.js +54 -0
- package/dist/js/core/components/functional/router/redirect.js.map +1 -0
- package/dist/js/core/components/functional/router/router.js +179 -0
- package/dist/js/core/components/functional/router/router.js.map +1 -0
- package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js +216 -0
- package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js.map +1 -0
- package/dist/js/core/components/functional/sdui/default-library.json +108 -0
- package/dist/js/core/components/functional/sdui/sdui-utils.js +64 -0
- package/dist/js/core/components/functional/sdui/sdui-utils.js.map +1 -0
- package/dist/js/core/components/functional/sdui/sdui.js +266 -0
- package/dist/js/core/components/functional/sdui/sdui.js.map +1 -0
- package/dist/js/core/components/functional/sdui/types.js +2 -0
- package/dist/js/core/components/functional/sdui/types.js.map +1 -0
- package/dist/js/core/components/functional/sonic-scope/sonic-scope.js +22 -0
- package/dist/js/core/components/functional/sonic-scope/sonic-scope.js.map +1 -0
- package/dist/js/core/components/functional/states/states.js +172 -0
- package/dist/js/core/components/functional/states/states.js.map +1 -0
- package/dist/js/core/components/functional/submit/submit.js +284 -0
- package/dist/js/core/components/functional/submit/submit.js.map +1 -0
- package/dist/js/core/components/functional/subscriber/subscriber.js +39 -0
- package/dist/js/core/components/functional/subscriber/subscriber.js.map +1 -0
- package/dist/js/core/components/functional/translation/translation.js +28 -0
- package/dist/js/core/components/functional/translation/translation.js.map +1 -0
- package/dist/js/core/components/functional/value/value.js +28 -0
- package/dist/js/core/components/functional/value/value.js.map +1 -0
- package/dist/js/core/components/ui/_css/scroll.js +25 -0
- package/dist/js/core/components/ui/_css/scroll.js.map +1 -0
- package/dist/js/core/components/ui/_css/shadow.js +22 -0
- package/dist/js/core/components/ui/_css/shadow.js.map +1 -0
- package/dist/js/core/components/ui/_css/size.js +36 -0
- package/dist/js/core/components/ui/_css/size.js.map +1 -0
- package/dist/js/core/components/ui/_css/type.js +92 -0
- package/dist/js/core/components/ui/_css/type.js.map +1 -0
- package/dist/js/core/components/ui/alert/alert.js +213 -0
- package/dist/js/core/components/ui/alert/alert.js.map +1 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js +68 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -0
- package/dist/js/core/components/ui/badge/badge.js +199 -0
- package/dist/js/core/components/ui/badge/badge.js.map +1 -0
- package/dist/js/core/components/ui/button/button.js +697 -0
- package/dist/js/core/components/ui/button/button.js.map +1 -0
- package/dist/js/core/components/ui/captcha/altchaStyles.js +226 -0
- package/dist/js/core/components/ui/captcha/altchaStyles.js.map +1 -0
- package/dist/js/core/components/ui/captcha/captcha.js +167 -0
- package/dist/js/core/components/ui/captcha/captcha.js.map +1 -0
- package/dist/js/core/components/ui/card/card-footer.js +26 -0
- package/dist/js/core/components/ui/card/card-footer.js.map +1 -0
- package/dist/js/core/components/ui/card/card-header-descripton.js +30 -0
- package/dist/js/core/components/ui/card/card-header-descripton.js.map +1 -0
- package/dist/js/core/components/ui/card/card-header.js +79 -0
- package/dist/js/core/components/ui/card/card-header.js.map +1 -0
- package/dist/js/core/components/ui/card/card-main.js +26 -0
- package/dist/js/core/components/ui/card/card-main.js.map +1 -0
- package/dist/js/core/components/ui/card/card.js +67 -0
- package/dist/js/core/components/ui/card/card.js.map +1 -0
- package/dist/js/core/components/ui/divider/divider.js +200 -0
- package/dist/js/core/components/ui/divider/divider.js.map +1 -0
- package/dist/js/core/components/ui/form/checkbox/checkbox.js +257 -0
- package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -0
- package/dist/js/core/components/ui/form/css/form-control.js +393 -0
- package/dist/js/core/components/ui/form/css/form-control.js.map +1 -0
- package/dist/js/core/components/ui/form/fieldset/fieldset.js +124 -0
- package/dist/js/core/components/ui/form/fieldset/fieldset.js.map +1 -0
- package/dist/js/core/components/ui/form/fieldset/legend-description.js +38 -0
- package/dist/js/core/components/ui/form/fieldset/legend-description.js.map +1 -0
- package/dist/js/core/components/ui/form/fieldset/legend.js +130 -0
- package/dist/js/core/components/ui/form/fieldset/legend.js.map +1 -0
- package/dist/js/core/components/ui/form/form-actions/form-actions.js +47 -0
- package/dist/js/core/components/ui/form/form-actions/form-actions.js.map +1 -0
- package/dist/js/core/components/ui/form/form-layout/form-layout.js +84 -0
- package/dist/js/core/components/ui/form/form-layout/form-layout.js.map +1 -0
- package/dist/js/core/components/ui/form/input/input.js +316 -0
- package/dist/js/core/components/ui/form/input/input.js.map +1 -0
- package/dist/js/core/components/ui/form/input/password-helper.js +134 -0
- package/dist/js/core/components/ui/form/input/password-helper.js.map +1 -0
- package/dist/js/core/components/ui/form/input/same-value-helper.js +85 -0
- package/dist/js/core/components/ui/form/input/same-value-helper.js.map +1 -0
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +405 -0
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -0
- package/dist/js/core/components/ui/form/radio/radio.js +63 -0
- package/dist/js/core/components/ui/form/radio/radio.js.map +1 -0
- package/dist/js/core/components/ui/form/select/select.js +323 -0
- package/dist/js/core/components/ui/form/select/select.js.map +1 -0
- package/dist/js/core/components/ui/form/switch/switch.js +90 -0
- package/dist/js/core/components/ui/form/switch/switch.js.map +1 -0
- package/dist/js/core/components/ui/form/textarea/textarea.js +162 -0
- package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -0
- package/dist/js/core/components/ui/group/group.js +128 -0
- package/dist/js/core/components/ui/group/group.js.map +1 -0
- package/dist/js/core/components/ui/icon/icon.js +129 -0
- package/dist/js/core/components/ui/icon/icon.js.map +1 -0
- package/dist/js/core/components/ui/icon/icons.js +163 -0
- package/dist/js/core/components/ui/icon/icons.js.map +1 -0
- package/dist/js/core/components/ui/icon/icons.json +1 -0
- package/dist/js/core/components/ui/image/image.js +160 -0
- package/dist/js/core/components/ui/image/image.js.map +1 -0
- package/dist/js/core/components/ui/link/link.js +125 -0
- package/dist/js/core/components/ui/link/link.js.map +1 -0
- package/dist/js/core/components/ui/loader/loader.js +106 -0
- package/dist/js/core/components/ui/loader/loader.js.map +1 -0
- package/dist/js/core/components/ui/loader/styles/fixed.js +56 -0
- package/dist/js/core/components/ui/loader/styles/fixed.js.map +1 -0
- package/dist/js/core/components/ui/loader/styles/inline.js +70 -0
- package/dist/js/core/components/ui/loader/styles/inline.js.map +1 -0
- package/dist/js/core/components/ui/menu/menu-item.js +35 -0
- package/dist/js/core/components/ui/menu/menu-item.js.map +1 -0
- package/dist/js/core/components/ui/menu/menu.js +436 -0
- package/dist/js/core/components/ui/menu/menu.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-actions.js +44 -0
- package/dist/js/core/components/ui/modal/modal-actions.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-close.js +56 -0
- package/dist/js/core/components/ui/modal/modal-close.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-content.js +27 -0
- package/dist/js/core/components/ui/modal/modal-content.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-subtitle.js +34 -0
- package/dist/js/core/components/ui/modal/modal-subtitle.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-title.js +35 -0
- package/dist/js/core/components/ui/modal/modal-title.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-utils.js +32 -0
- package/dist/js/core/components/ui/modal/modal-utils.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal.js +568 -0
- package/dist/js/core/components/ui/modal/modal.js.map +1 -0
- package/dist/js/core/components/ui/pop/pop.js +337 -0
- package/dist/js/core/components/ui/pop/pop.js.map +1 -0
- package/dist/js/core/components/ui/progress/progress.js +164 -0
- package/dist/js/core/components/ui/progress/progress.js.map +1 -0
- package/dist/js/core/components/ui/table/table-caption.js +29 -0
- package/dist/js/core/components/ui/table/table-caption.js.map +1 -0
- package/dist/js/core/components/ui/table/table-tbody.js +41 -0
- package/dist/js/core/components/ui/table/table-tbody.js.map +1 -0
- package/dist/js/core/components/ui/table/table-td.js +69 -0
- package/dist/js/core/components/ui/table/table-td.js.map +1 -0
- package/dist/js/core/components/ui/table/table-tfoot.js +28 -0
- package/dist/js/core/components/ui/table/table-tfoot.js.map +1 -0
- package/dist/js/core/components/ui/table/table-th.js +80 -0
- package/dist/js/core/components/ui/table/table-th.js.map +1 -0
- package/dist/js/core/components/ui/table/table-thead.js +26 -0
- package/dist/js/core/components/ui/table/table-thead.js.map +1 -0
- package/dist/js/core/components/ui/table/table-tr.js +67 -0
- package/dist/js/core/components/ui/table/table-tr.js.map +1 -0
- package/dist/js/core/components/ui/table/table.js +106 -0
- package/dist/js/core/components/ui/table/table.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme-collection/core-variables.js +74 -0
- package/dist/js/core/components/ui/theme/theme-collection/core-variables.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme-collection/dark.js +39 -0
- package/dist/js/core/components/ui/theme/theme-collection/dark.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme-collection/light.js +32 -0
- package/dist/js/core/components/ui/theme/theme-collection/light.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme.js +150 -0
- package/dist/js/core/components/ui/theme/theme.js.map +1 -0
- package/dist/js/core/components/ui/toast/message-subscriber.js +41 -0
- package/dist/js/core/components/ui/toast/message-subscriber.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast-item.js +379 -0
- package/dist/js/core/components/ui/toast/toast-item.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast.js +269 -0
- package/dist/js/core/components/ui/toast/toast.js.map +1 -0
- package/dist/js/core/components/ui/toast/types.js +2 -0
- package/dist/js/core/components/ui/toast/types.js.map +1 -0
- package/dist/js/core/components/ui/tooltip/tooltip.js +219 -0
- package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -0
- package/dist/js/core/components/ui/ui.js +41 -0
- package/dist/js/core/components/ui/ui.js.map +1 -0
- package/dist/js/core/core.js +14 -0
- package/dist/js/core/core.js.map +1 -0
- package/dist/js/core/decorators/Subscriber.js +9 -0
- package/dist/js/core/decorators/Subscriber.js.map +1 -0
- package/dist/js/core/decorators/api.js +611 -0
- package/dist/js/core/decorators/api.js.map +1 -0
- package/dist/js/core/decorators/lifecycle.js +67 -0
- package/dist/js/core/decorators/lifecycle.js.map +1 -0
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js +27 -0
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -0
- package/dist/js/core/decorators/subscriber/autoFill.js +26 -0
- package/dist/js/core/decorators/subscriber/autoFill.js.map +1 -0
- package/dist/js/core/decorators/subscriber/autoSubscribe.js +46 -0
- package/dist/js/core/decorators/subscriber/autoSubscribe.js.map +1 -0
- package/dist/js/core/decorators/subscriber/bind.js +150 -0
- package/dist/js/core/decorators/subscriber/bind.js.map +1 -0
- package/dist/js/core/decorators/subscriber/common.js +44 -0
- package/dist/js/core/decorators/subscriber/common.js.map +1 -0
- package/dist/js/core/decorators/subscriber/dynamicPath.js +75 -0
- package/dist/js/core/decorators/subscriber/dynamicPath.js.map +1 -0
- package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js +138 -0
- package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js.map +1 -0
- package/dist/js/core/decorators/subscriber/handle.js +22 -0
- package/dist/js/core/decorators/subscriber/handle.js.map +1 -0
- package/dist/js/core/decorators/subscriber/onAssign.js +199 -0
- package/dist/js/core/decorators/subscriber/onAssign.js.map +1 -0
- package/dist/js/core/decorators/subscriber/publish.js +108 -0
- package/dist/js/core/decorators/subscriber/publish.js.map +1 -0
- package/dist/js/core/decorators/subscriber/publisherPath.js +16 -0
- package/dist/js/core/decorators/subscriber/publisherPath.js.map +1 -0
- package/dist/js/core/decorators/subscriber/subscribe.js +20 -0
- package/dist/js/core/decorators/subscriber/subscribe.js.map +1 -0
- package/dist/js/core/directives/DataProvider.js +127 -0
- package/dist/js/core/directives/DataProvider.js.map +1 -0
- package/dist/js/core/directives/Wording.js +221 -0
- package/dist/js/core/directives/Wording.js.map +1 -0
- package/dist/js/core/mixins/Fetcher.js +325 -0
- package/dist/js/core/mixins/Fetcher.js.map +1 -0
- package/dist/js/core/mixins/FormCheckable.js +313 -0
- package/dist/js/core/mixins/FormCheckable.js.map +1 -0
- package/dist/js/core/mixins/FormElement.js +304 -0
- package/dist/js/core/mixins/FormElement.js.map +1 -0
- package/dist/js/core/mixins/FormInput.js +82 -0
- package/dist/js/core/mixins/FormInput.js.map +1 -0
- package/dist/js/core/mixins/Subscriber.js +354 -0
- package/dist/js/core/mixins/Subscriber.js.map +1 -0
- package/dist/js/core/mixins/TemplatesContainer.js +70 -0
- package/dist/js/core/mixins/TemplatesContainer.js.map +1 -0
- package/dist/js/core/mixins/mixins.js +7 -0
- package/dist/js/core/mixins/mixins.js.map +1 -0
- package/dist/js/core/utils/AncestorAttributeObserver.js +140 -0
- package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -0
- package/dist/js/core/utils/Arrays.js +141 -0
- package/dist/js/core/utils/Arrays.js.map +1 -0
- package/dist/js/core/utils/DataBindObserver.js +265 -0
- package/dist/js/core/utils/DataBindObserver.js.map +1 -0
- package/dist/js/core/utils/Electron.js +14 -0
- package/dist/js/core/utils/Electron.js.map +1 -0
- package/dist/js/core/utils/Format.js +43 -0
- package/dist/js/core/utils/Format.js.map +1 -0
- package/dist/js/core/utils/HTML.js +248 -0
- package/dist/js/core/utils/HTML.js.map +1 -0
- package/dist/js/core/utils/LocationHandler.js +143 -0
- package/dist/js/core/utils/LocationHandler.js.map +1 -0
- package/dist/js/core/utils/Objects.js +111 -0
- package/dist/js/core/utils/Objects.js.map +1 -0
- package/dist/js/core/utils/PublisherProxy.js +946 -0
- package/dist/js/core/utils/PublisherProxy.js.map +1 -0
- package/dist/js/core/utils/Utils.js +19 -0
- package/dist/js/core/utils/Utils.js.map +1 -0
- package/dist/js/core/utils/aesCrypto.js +98 -0
- package/dist/js/core/utils/aesCrypto.js.map +1 -0
- package/dist/js/core/utils/api.js +574 -0
- package/dist/js/core/utils/api.js.map +1 -0
- package/dist/js/core/utils/dataProviderKey.js +64 -0
- package/dist/js/core/utils/dataProviderKey.js.map +1 -0
- package/dist/js/core/utils/endpoint.js +74 -0
- package/dist/js/core/utils/endpoint.js.map +1 -0
- package/dist/js/core/utils/route.js +149 -0
- package/dist/js/core/utils/route.js.map +1 -0
- package/dist/js/core/utils/url-pattern.js +3 -0
- package/dist/js/core/utils/url-pattern.js.map +1 -0
- package/dist/js/dataprovider.js +2 -0
- package/dist/js/dataprovider.js.map +1 -0
- package/dist/js/decorators.js +39 -0
- package/dist/js/decorators.js.map +1 -0
- package/dist/js/directives.js +30 -0
- package/dist/js/directives.js.map +1 -0
- package/dist/js/index.js +8 -0
- package/dist/js/index.js.map +1 -0
- package/dist/js/mixins.js +23 -0
- package/dist/js/mixins.js.map +1 -0
- package/dist/js/test-utils/TestUtils.js +10 -0
- package/dist/js/test-utils/TestUtils.js.map +1 -0
- package/dist/js/utils.js +41 -0
- package/dist/js/utils.js.map +1 -0
- package/dist/types/components.d.ts +5 -0
- package/dist/types/components.d.ts.map +1 -0
- package/dist/types/concorde-loaded.d.ts +2 -0
- package/dist/types/concorde-loaded.d.ts.map +1 -0
- package/dist/types/core/_types/endpoint.d.ts +5 -0
- package/dist/types/core/_types/endpoint.d.ts.map +1 -0
- package/dist/types/core/_types/key.d.ts +2 -0
- package/dist/types/core/_types/key.d.ts.map +1 -0
- package/dist/types/core/_types/types.d.ts +28 -0
- package/dist/types/core/_types/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/date/date.d.ts +52 -0
- package/dist/types/core/components/functional/date/date.d.ts.map +1 -0
- package/dist/types/core/components/functional/example/example.d.ts +15 -0
- package/dist/types/core/components/functional/example/example.d.ts.map +1 -0
- package/dist/types/core/components/functional/fetch/fetch.d.ts +102 -0
- package/dist/types/core/components/functional/fetch/fetch.d.ts.map +1 -0
- package/dist/types/core/components/functional/functional.d.ts +17 -0
- package/dist/types/core/components/functional/functional.d.ts.map +1 -0
- package/dist/types/core/components/functional/if/if.d.ts +13 -0
- package/dist/types/core/components/functional/if/if.d.ts.map +1 -0
- package/dist/types/core/components/functional/list/list.d.ts +149 -0
- package/dist/types/core/components/functional/list/list.d.ts.map +1 -0
- package/dist/types/core/components/functional/mix/mix.d.ts +23 -0
- package/dist/types/core/components/functional/mix/mix.d.ts.map +1 -0
- package/dist/types/core/components/functional/queue/queue.d.ts +79 -0
- package/dist/types/core/components/functional/queue/queue.d.ts.map +1 -0
- package/dist/types/core/components/functional/router/redirect.d.ts +19 -0
- package/dist/types/core/components/functional/router/redirect.d.ts.map +1 -0
- package/dist/types/core/components/functional/router/router.d.ts +46 -0
- package/dist/types/core/components/functional/router/router.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +59 -0
- package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/sdui-utils.d.ts +6 -0
- package/dist/types/core/components/functional/sdui/sdui-utils.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/sdui.d.ts +145 -0
- package/dist/types/core/components/functional/sdui/sdui.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/types.d.ts +38 -0
- package/dist/types/core/components/functional/sdui/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts +6 -0
- package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts.map +1 -0
- package/dist/types/core/components/functional/states/states.d.ts +42 -0
- package/dist/types/core/components/functional/states/states.d.ts.map +1 -0
- package/dist/types/core/components/functional/submit/submit.d.ts +37 -0
- package/dist/types/core/components/functional/submit/submit.d.ts.map +1 -0
- package/dist/types/core/components/functional/subscriber/subscriber.d.ts +13 -0
- package/dist/types/core/components/functional/subscriber/subscriber.d.ts.map +1 -0
- package/dist/types/core/components/functional/translation/translation.d.ts +7 -0
- package/dist/types/core/components/functional/translation/translation.d.ts.map +1 -0
- package/dist/types/core/components/functional/value/value.d.ts +8 -0
- package/dist/types/core/components/functional/value/value.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/scroll.d.ts +2 -0
- package/dist/types/core/components/ui/_css/scroll.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/shadow.d.ts +3 -0
- package/dist/types/core/components/ui/_css/shadow.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/size.d.ts +3 -0
- package/dist/types/core/components/ui/_css/size.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/type.d.ts +3 -0
- package/dist/types/core/components/ui/_css/type.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert/alert.d.ts +37 -0
- package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts +15 -0
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -0
- package/dist/types/core/components/ui/badge/badge.d.ts +27 -0
- package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -0
- package/dist/types/core/components/ui/button/button.d.ts +180 -0
- package/dist/types/core/components/ui/button/button.d.ts.map +1 -0
- package/dist/types/core/components/ui/captcha/altchaStyles.d.ts +2 -0
- package/dist/types/core/components/ui/captcha/altchaStyles.d.ts.map +1 -0
- package/dist/types/core/components/ui/captcha/captcha.d.ts +30 -0
- package/dist/types/core/components/ui/captcha/captcha.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-footer.d.ts +6 -0
- package/dist/types/core/components/ui/card/card-footer.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-header-descripton.d.ts +6 -0
- package/dist/types/core/components/ui/card/card-header-descripton.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-header.d.ts +9 -0
- package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-main.d.ts +6 -0
- package/dist/types/core/components/ui/card/card-main.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card.d.ts +13 -0
- package/dist/types/core/components/ui/card/card.d.ts.map +1 -0
- package/dist/types/core/components/ui/divider/divider.d.ts +16 -0
- package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +176 -0
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/css/form-control.d.ts +5 -0
- package/dist/types/core/components/ui/form/css/form-control.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts +24 -0
- package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts +6 -0
- package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/fieldset/legend.d.ts +17 -0
- package/dist/types/core/components/ui/form/fieldset/legend.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts +8 -0
- package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts +13 -0
- package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input/input.d.ts +123 -0
- package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input/password-helper.d.ts +26 -0
- package/dist/types/core/components/ui/form/input/password-helper.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input/same-value-helper.d.ts +17 -0
- package/dist/types/core/components/ui/form/input/same-value-helper.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +155 -0
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/radio/radio.d.ts +15 -0
- package/dist/types/core/components/ui/form/radio/radio.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/select/select.d.ts +59 -0
- package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/switch/switch.d.ts +6 -0
- package/dist/types/core/components/ui/form/switch/switch.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts +94 -0
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -0
- package/dist/types/core/components/ui/group/group.d.ts +17 -0
- package/dist/types/core/components/ui/group/group.d.ts.map +1 -0
- package/dist/types/core/components/ui/icon/icon.d.ts +28 -0
- package/dist/types/core/components/ui/icon/icon.d.ts.map +1 -0
- package/dist/types/core/components/ui/icon/icons.d.ts +11 -0
- package/dist/types/core/components/ui/icon/icons.d.ts.map +1 -0
- package/dist/types/core/components/ui/image/image.d.ts +16 -0
- package/dist/types/core/components/ui/image/image.d.ts.map +1 -0
- package/dist/types/core/components/ui/link/link.d.ts +30 -0
- package/dist/types/core/components/ui/link/link.d.ts.map +1 -0
- package/dist/types/core/components/ui/loader/loader.d.ts +24 -0
- package/dist/types/core/components/ui/loader/loader.d.ts.map +1 -0
- package/dist/types/core/components/ui/loader/styles/fixed.d.ts +2 -0
- package/dist/types/core/components/ui/loader/styles/fixed.d.ts.map +1 -0
- package/dist/types/core/components/ui/loader/styles/inline.d.ts +2 -0
- package/dist/types/core/components/ui/loader/styles/inline.d.ts.map +1 -0
- package/dist/types/core/components/ui/menu/menu-item.d.ts +6 -0
- package/dist/types/core/components/ui/menu/menu-item.d.ts.map +1 -0
- package/dist/types/core/components/ui/menu/menu.d.ts +52 -0
- package/dist/types/core/components/ui/menu/menu.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-actions.d.ts +9 -0
- package/dist/types/core/components/ui/modal/modal-actions.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-close.d.ts +11 -0
- package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-content.d.ts +6 -0
- package/dist/types/core/components/ui/modal/modal-content.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-subtitle.d.ts +6 -0
- package/dist/types/core/components/ui/modal/modal-subtitle.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-title.d.ts +6 -0
- package/dist/types/core/components/ui/modal/modal-title.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-utils.d.ts +4 -0
- package/dist/types/core/components/ui/modal/modal-utils.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal.d.ts +79 -0
- package/dist/types/core/components/ui/modal/modal.d.ts.map +1 -0
- package/dist/types/core/components/ui/pop/pop.d.ts +42 -0
- package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -0
- package/dist/types/core/components/ui/progress/progress.d.ts +12 -0
- package/dist/types/core/components/ui/progress/progress.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-caption.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-caption.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-tbody.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-tbody.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-td.d.ts +13 -0
- package/dist/types/core/components/ui/table/table-td.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-tfoot.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-tfoot.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-th.d.ts +12 -0
- package/dist/types/core/components/ui/table/table-th.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-thead.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-thead.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-tr.d.ts +14 -0
- package/dist/types/core/components/ui/table/table-tr.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table.d.ts +18 -0
- package/dist/types/core/components/ui/table/table.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts +2 -0
- package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts +2 -0
- package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme-collection/light.d.ts +2 -0
- package/dist/types/core/components/ui/theme/theme-collection/light.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme.d.ts +20 -0
- package/dist/types/core/components/ui/theme/theme.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/message-subscriber.d.ts +19 -0
- package/dist/types/core/components/ui/toast/message-subscriber.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts +41 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast.d.ts +28 -0
- package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/types.d.ts +12 -0
- package/dist/types/core/components/ui/toast/types.d.ts.map +1 -0
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts +21 -0
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -0
- package/dist/types/core/components/ui/ui.d.ts +35 -0
- package/dist/types/core/components/ui/ui.d.ts.map +1 -0
- package/dist/types/core/core.d.ts +5 -0
- package/dist/types/core/core.d.ts.map +1 -0
- package/dist/types/core/decorators/Subscriber.d.ts +11 -0
- package/dist/types/core/decorators/Subscriber.d.ts.map +1 -0
- package/dist/types/core/decorators/api.d.ts +119 -0
- package/dist/types/core/decorators/api.d.ts.map +1 -0
- package/dist/types/core/decorators/lifecycle.d.ts +19 -0
- package/dist/types/core/decorators/lifecycle.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +11 -0
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/autoFill.d.ts +2 -0
- package/dist/types/core/decorators/subscriber/autoFill.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts +2 -0
- package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/bind.d.ts +28 -0
- package/dist/types/core/decorators/subscriber/bind.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/common.d.ts +14 -0
- package/dist/types/core/decorators/subscriber/common.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/dynamicPath.d.ts +23 -0
- package/dist/types/core/decorators/subscriber/dynamicPath.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts +42 -0
- package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/handle.d.ts +74 -0
- package/dist/types/core/decorators/subscriber/handle.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/onAssign.d.ts +53 -0
- package/dist/types/core/decorators/subscriber/onAssign.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/publish.d.ts +23 -0
- package/dist/types/core/decorators/subscriber/publish.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/publisherPath.d.ts +3 -0
- package/dist/types/core/decorators/subscriber/publisherPath.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/subscribe.d.ts +20 -0
- package/dist/types/core/decorators/subscriber/subscribe.d.ts.map +1 -0
- package/dist/types/core/directives/DataProvider.d.ts +45 -0
- package/dist/types/core/directives/DataProvider.d.ts.map +1 -0
- package/dist/types/core/directives/Wording.d.ts +44 -0
- package/dist/types/core/directives/Wording.d.ts.map +1 -0
- package/dist/types/core/mixins/Fetcher.d.ts +108 -0
- package/dist/types/core/mixins/Fetcher.d.ts.map +1 -0
- package/dist/types/core/mixins/FormCheckable.d.ts +95 -0
- package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -0
- package/dist/types/core/mixins/FormElement.d.ts +37 -0
- package/dist/types/core/mixins/FormElement.d.ts.map +1 -0
- package/dist/types/core/mixins/FormInput.d.ts +79 -0
- package/dist/types/core/mixins/FormInput.d.ts.map +1 -0
- package/dist/types/core/mixins/Subscriber.d.ts +38 -0
- package/dist/types/core/mixins/Subscriber.d.ts.map +1 -0
- package/dist/types/core/mixins/TemplatesContainer.d.ts +14 -0
- package/dist/types/core/mixins/TemplatesContainer.d.ts.map +1 -0
- package/dist/types/core/mixins/mixins.d.ts +7 -0
- package/dist/types/core/mixins/mixins.d.ts.map +1 -0
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts +38 -0
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -0
- package/dist/types/core/utils/Arrays.d.ts +98 -0
- package/dist/types/core/utils/Arrays.d.ts.map +1 -0
- package/dist/types/core/utils/DataBindObserver.d.ts +84 -0
- package/dist/types/core/utils/DataBindObserver.d.ts.map +1 -0
- package/dist/types/core/utils/Electron.d.ts +8 -0
- package/dist/types/core/utils/Electron.d.ts.map +1 -0
- package/dist/types/core/utils/Format.d.ts +13 -0
- package/dist/types/core/utils/Format.d.ts.map +1 -0
- package/dist/types/core/utils/HTML.d.ts +64 -0
- package/dist/types/core/utils/HTML.d.ts.map +1 -0
- package/dist/types/core/utils/LocationHandler.d.ts +48 -0
- package/dist/types/core/utils/LocationHandler.d.ts.map +1 -0
- package/dist/types/core/utils/Objects.d.ts +31 -0
- package/dist/types/core/utils/Objects.d.ts.map +1 -0
- package/dist/types/core/utils/PublisherProxy.d.ts +230 -0
- package/dist/types/core/utils/PublisherProxy.d.ts.map +1 -0
- package/dist/types/core/utils/Utils.d.ts +6 -0
- package/dist/types/core/utils/Utils.d.ts.map +1 -0
- package/dist/types/core/utils/aesCrypto.d.ts +53 -0
- package/dist/types/core/utils/aesCrypto.d.ts.map +1 -0
- package/dist/types/core/utils/api.d.ts +173 -0
- package/dist/types/core/utils/api.d.ts.map +1 -0
- package/dist/types/core/utils/dataProviderKey.d.ts +56 -0
- package/dist/types/core/utils/dataProviderKey.d.ts.map +1 -0
- package/dist/types/core/utils/endpoint.d.ts +37 -0
- package/dist/types/core/utils/endpoint.d.ts.map +1 -0
- package/dist/types/core/utils/route.d.ts +41 -0
- package/dist/types/core/utils/route.d.ts.map +1 -0
- package/dist/types/core/utils/url-pattern.d.ts +3 -0
- package/dist/types/core/utils/url-pattern.d.ts.map +1 -0
- package/dist/types/dataprovider.d.ts +2 -0
- package/dist/types/dataprovider.d.ts.map +1 -0
- package/dist/types/decorators.d.ts +28 -0
- package/dist/types/decorators.d.ts.map +1 -0
- package/dist/types/directives.d.ts +21 -0
- package/dist/types/directives.d.ts.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/mixins.d.ts +204 -0
- package/dist/types/mixins.d.ts.map +1 -0
- package/dist/types/test-utils/TestUtils.d.ts +4 -0
- package/dist/types/test-utils/TestUtils.d.ts.map +1 -0
- package/dist/types/utils.d.ts +17 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/docs/assets/{index-t0-i22oI.css → index-CZLTFws2.css} +1 -1
- package/docs/assets/{index-wyNMyWT9.js → index-nkkwC13U.js} +781 -506
- package/docs/index.html +2 -3
- package/docs/src/core/components/functional/date/date.md +290 -0
- package/docs/src/core/components/functional/fetch/fetch.md +125 -0
- package/docs/src/core/components/functional/if/if.md +9 -0
- package/docs/src/core/components/functional/list/list.md +65 -0
- package/docs/src/core/components/functional/mix/mix.md +41 -0
- package/docs/src/core/components/functional/queue/queue.md +72 -0
- package/docs/src/core/components/functional/router/router.md +94 -0
- package/docs/src/core/components/functional/sdui/default-library.json +108 -0
- package/docs/src/core/components/functional/sdui/example.json +99 -0
- package/docs/src/core/components/functional/sdui/sdui.md +356 -0
- package/docs/src/core/components/functional/states/states.md +87 -0
- package/docs/src/core/components/functional/submit/submit.md +114 -0
- package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
- package/docs/src/core/components/functional/value/value.md +35 -0
- package/docs/src/core/components/ui/alert/alert.md +121 -0
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
- package/docs/src/core/components/ui/badge/badge.md +127 -0
- package/docs/src/core/components/ui/button/button.md +182 -0
- package/docs/src/core/components/ui/captcha/captcha.md +12 -0
- package/docs/src/core/components/ui/card/card.md +97 -0
- package/docs/src/core/components/ui/divider/divider.md +35 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +77 -0
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +129 -0
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +77 -0
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +44 -0
- package/docs/src/core/components/ui/form/input/input.md +142 -0
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +133 -0
- package/docs/src/core/components/ui/form/radio/radio.md +57 -0
- package/docs/src/core/components/ui/form/select/select.md +71 -0
- package/docs/src/core/components/ui/form/switch/switch.md +57 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +65 -0
- package/docs/src/core/components/ui/group/group.md +75 -0
- package/docs/src/core/components/ui/icon/icon.md +125 -0
- package/docs/src/core/components/ui/icon/icons.json +1 -0
- package/docs/src/core/components/ui/image/image.md +107 -0
- package/docs/src/core/components/ui/link/link.md +43 -0
- package/docs/src/core/components/ui/loader/loader.md +55 -0
- package/docs/src/core/components/ui/menu/menu.md +329 -0
- package/docs/src/core/components/ui/modal/modal.md +119 -0
- package/docs/src/core/components/ui/pop/pop.md +96 -0
- package/docs/src/core/components/ui/progress/progress.md +63 -0
- package/docs/src/core/components/ui/table/table.md +455 -0
- package/docs/src/core/components/ui/toast/toast.md +166 -0
- package/docs/src/core/components/ui/tooltip/tooltip.md +82 -0
- package/docs/src/docs/_core-concept/dataFlow.md +79 -0
- package/docs/src/docs/_core-concept/overview.md +57 -0
- package/docs/src/docs/_core-concept/subscriber.md +75 -0
- package/docs/src/docs/_decorators/ancestor-attribute.md +127 -0
- package/docs/src/docs/_decorators/auto-subscribe.md +202 -0
- package/docs/src/docs/_decorators/bind.md +167 -0
- package/docs/src/docs/_decorators/get.md +77 -0
- package/docs/src/docs/_decorators/handle.md +175 -0
- package/docs/src/docs/_decorators/on-assign.md +390 -0
- package/docs/src/docs/_decorators/patch.md +45 -0
- package/docs/src/docs/_decorators/post.md +93 -0
- package/docs/src/docs/_decorators/publish.md +55 -0
- package/docs/src/docs/_decorators/put.md +43 -0
- package/docs/src/docs/_decorators/subscribe.md +100 -0
- package/docs/src/docs/_decorators/wait-for-ancestors.md +163 -0
- package/docs/src/docs/_directives/sub.md +91 -0
- package/docs/src/docs/_getting-started/ai-agents.md +56 -0
- package/docs/src/docs/_getting-started/concorde-manual-install.md +133 -0
- package/docs/src/docs/_getting-started/concorde-outside.md +33 -0
- package/docs/src/docs/_getting-started/create-a-component.md +139 -0
- package/docs/src/docs/_getting-started/my-first-component.md +236 -0
- package/docs/src/docs/_getting-started/my-first-subscriber.md +120 -0
- package/docs/src/docs/_getting-started/pubsub.md +37 -0
- package/docs/src/docs/_getting-started/start.md +47 -0
- package/docs/src/docs/_getting-started/theming.md +91 -0
- package/docs/src/docs/_misc/api-configuration.md +81 -0
- package/docs/src/docs/_misc/dataProviderKey.md +168 -0
- package/docs/src/docs/_misc/docs-mock-api.md +60 -0
- package/docs/src/docs/_misc/dynamic-path.md +71 -0
- package/docs/src/docs/_misc/endpoint.md +45 -0
- package/docs/src/docs/_misc/html-integration.md +13 -0
- package/docs/src/docs/search/docs-search.json +9117 -0
- package/docs/src/tag-list.json +1 -0
- package/docs/src/tsconfig-model.json +23 -0
- package/docs/src/tsconfig.declarations.json +22 -0
- package/docs/src/tsconfig.emit.json +23 -0
- package/docs/src/tsconfig.json +837 -0
- package/gitlab/job_github_mirror.sh +39 -0
- package/index.html +0 -1
- package/package.json +1084 -364
- package/public/docs-mock-api-sw.js +3 -2
- package/public/docs-mock-api-sw.js.map +2 -2
- package/scripts/github-export.mjs +150 -0
- package/scripts/post-build.mjs +43 -0
- package/scripts/pre-build.mjs +32 -4
- package/scripts/pre-publish.mjs +2 -0
- package/src/core/components/functional/queue/queue.ts +2 -2
- package/src/core/components/ui/modal/modal.ts +1 -1
- package/src/core/decorators/Subscriber.ts +1 -0
- package/src/core/decorators/api.spec.ts +74 -4
- package/src/core/decorators/api.ts +111 -30
- package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +197 -0
- package/src/core/decorators/subscriber/ancestorAttribute.ts +40 -7
- package/src/core/decorators/subscriber/autoSubscribe.ts +7 -3
- package/src/core/mixins/Fetcher.ts +12 -6
- package/src/core/utils/AncestorAttributeObserver.ts +199 -0
- package/src/core/utils/HTML.ts +3 -11
- package/src/core/utils/PublisherProxy.ts +28 -37
- package/src/core/utils/api.ts +10 -10
- package/src/css.d.ts +19 -0
- package/src/directives.ts +3 -2
- package/src/docs/_decorators/ancestor-attribute.md +56 -8
- package/src/docs/_decorators/get.md +47 -1
- package/src/docs/components/docs-demo-sources.ts +20 -3
- package/src/docs/example/decorators-demo-geo.ts +5 -0
- package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +72 -31
- package/src/docs/example/decorators-demo.ts +164 -8
- package/src/docs/mock-api/router.ts +3 -1
- package/src/docs/search/docs-search.json +92 -2
- package/src/tsconfig.declarations.json +22 -0
- package/src/tsconfig.emit.json +23 -0
- package/src/tsconfig.json +3 -285
- package/src/tsconfig.tsbuildinfo +1 -1
|
@@ -162,14 +162,25 @@ function watchScopedConfiguration(
|
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
type
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
type TriggerPublisherBinding = {
|
|
166
|
+
triggerPublisher: DataProvider | null;
|
|
167
|
+
triggerInvalidateHandler: (() => void) | null;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
type RefetchScheduleState = {
|
|
171
|
+
refetchTimeoutId: ReturnType<typeof setTimeout> | null;
|
|
172
|
+
refetchEveryMs: number;
|
|
171
173
|
};
|
|
172
174
|
|
|
175
|
+
type ApiGetState = TriggerPublisherBinding &
|
|
176
|
+
RefetchScheduleState & {
|
|
177
|
+
cleanupWatchers: Array<() => void>;
|
|
178
|
+
requestGeneration: number;
|
|
179
|
+
configPublisher: DataProvider | null;
|
|
180
|
+
configMutationHandler: (() => void) | null;
|
|
181
|
+
scopeWatchCleanup: (() => void) | null;
|
|
182
|
+
};
|
|
183
|
+
|
|
173
184
|
function detachConfigPublisher(state: ApiGetState): void {
|
|
174
185
|
if (state.configPublisher && state.configMutationHandler) {
|
|
175
186
|
state.configPublisher.offInternalMutation(state.configMutationHandler);
|
|
@@ -191,6 +202,9 @@ function detachConfigPublisher(state: ApiGetState): void {
|
|
|
191
202
|
* `PublisherManager` sur le chemin résolu (même syntaxe dynamique que `@subscribe`).
|
|
192
203
|
* Toute mutation interne du publisher (`onInternalMutation`) relance le GET.
|
|
193
204
|
*
|
|
205
|
+
* **Options** (`GetOptions`) : `triggerKey` — `PublisherManager.get(...).invalidate()` relance le GET ;
|
|
206
|
+
* `refetchEveryMs` — polling automatique.
|
|
207
|
+
*
|
|
194
208
|
* @example
|
|
195
209
|
* @get(new Endpoint<User, { userId: string }>("users/${userId}"))
|
|
196
210
|
* payload?: ApiResult<User>;
|
|
@@ -200,6 +214,11 @@ function detachConfigPublisher(state: ApiGetState): void {
|
|
|
200
214
|
* PublisherManager.get("myApiConf").set({ serviceURL: "...", token: null, ... });
|
|
201
215
|
* @get(new Endpoint<Thing, { id: string }>("things/${id}"), apiConf)
|
|
202
216
|
* payload?: ApiResult<Thing>;
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* @get(usersEndpoint, { triggerKey: refreshUsersKey })
|
|
220
|
+
* payload?: ApiResult<User[]>;
|
|
221
|
+
* // PublisherManager.get("users.refresh").invalidate() → refetch
|
|
203
222
|
*/
|
|
204
223
|
export function get<T, Ue = any>(
|
|
205
224
|
endpoint: Endpoint<T, Ue>,
|
|
@@ -260,18 +279,24 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
260
279
|
skipEmptyPlaceholder: options?.skipEmptyPlaceholder,
|
|
261
280
|
};
|
|
262
281
|
const configurationKeyPath = configurationKey?.path;
|
|
282
|
+
const triggerKeyPath = options?.triggerKey?.path;
|
|
263
283
|
const endpointDynamicDependencies = extractDynamicDependencies(pathTemplate);
|
|
264
284
|
const configKeyDynamicDependencies = configurationKeyPath
|
|
265
285
|
? extractDynamicDependencies(configurationKeyPath)
|
|
266
286
|
: [];
|
|
287
|
+
const triggerKeyDynamicDependencies = triggerKeyPath
|
|
288
|
+
? extractDynamicDependencies(triggerKeyPath)
|
|
289
|
+
: [];
|
|
267
290
|
const mergedDynamicDependencies = [
|
|
268
291
|
...new Set([
|
|
269
292
|
...endpointDynamicDependencies,
|
|
270
293
|
...configKeyDynamicDependencies,
|
|
294
|
+
...triggerKeyDynamicDependencies,
|
|
271
295
|
]),
|
|
272
296
|
];
|
|
273
297
|
const isDynamicPath = endpointDynamicDependencies.length > 0;
|
|
274
298
|
const usesPublisherConfig = Boolean(configurationKeyPath);
|
|
299
|
+
const refetchEveryMs = options?.refetchEveryMs ?? 0;
|
|
275
300
|
|
|
276
301
|
return function (target: object, propertyKey: string) {
|
|
277
302
|
if (!target) return;
|
|
@@ -288,6 +313,10 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
288
313
|
configPublisher: null,
|
|
289
314
|
configMutationHandler: null,
|
|
290
315
|
scopeWatchCleanup: null,
|
|
316
|
+
triggerPublisher: null,
|
|
317
|
+
triggerInvalidateHandler: null,
|
|
318
|
+
refetchTimeoutId: null,
|
|
319
|
+
refetchEveryMs,
|
|
291
320
|
};
|
|
292
321
|
comp[stateKey] = state;
|
|
293
322
|
}
|
|
@@ -295,6 +324,17 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
295
324
|
state.cleanupWatchers.forEach((cleanup) => cleanup());
|
|
296
325
|
state.cleanupWatchers = [];
|
|
297
326
|
state.requestGeneration++;
|
|
327
|
+
state.refetchEveryMs = refetchEveryMs;
|
|
328
|
+
clearRefetch(state);
|
|
329
|
+
|
|
330
|
+
const scheduleRefetch = () => {
|
|
331
|
+
clearRefetch(state);
|
|
332
|
+
if (!state.refetchEveryMs || state.refetchEveryMs <= 0) return;
|
|
333
|
+
state.refetchTimeoutId = setTimeout(() => {
|
|
334
|
+
state.refetchTimeoutId = null;
|
|
335
|
+
runFetch();
|
|
336
|
+
}, state.refetchEveryMs);
|
|
337
|
+
};
|
|
298
338
|
|
|
299
339
|
const runFetch = () => {
|
|
300
340
|
const resolution = isDynamicPath
|
|
@@ -302,6 +342,7 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
302
342
|
: { ready: true, path: pathTemplate };
|
|
303
343
|
if (!resolution.ready || !resolution.path) {
|
|
304
344
|
comp[propertyKey] = undefined;
|
|
345
|
+
scheduleRefetch();
|
|
305
346
|
return;
|
|
306
347
|
}
|
|
307
348
|
let config: APIConfiguration | null = null;
|
|
@@ -313,6 +354,7 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
313
354
|
);
|
|
314
355
|
if (!configRes.ready || !configRes.path) {
|
|
315
356
|
comp[propertyKey] = undefined;
|
|
357
|
+
scheduleRefetch();
|
|
316
358
|
return;
|
|
317
359
|
}
|
|
318
360
|
const configPublisher = getPublisherFromPath(configRes.path);
|
|
@@ -329,6 +371,7 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
329
371
|
state.scopeWatchCleanup = null;
|
|
330
372
|
});
|
|
331
373
|
}
|
|
374
|
+
scheduleRefetch();
|
|
332
375
|
return;
|
|
333
376
|
}
|
|
334
377
|
const generation = ++state.requestGeneration;
|
|
@@ -338,9 +381,31 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
338
381
|
.then((payload?: ApiResult<T>) => {
|
|
339
382
|
if (generation !== state.requestGeneration) return;
|
|
340
383
|
comp[propertyKey] = payload;
|
|
384
|
+
scheduleRefetch();
|
|
341
385
|
});
|
|
342
386
|
};
|
|
343
387
|
|
|
388
|
+
const scheduleFetch = createAnimationFrameCoalescedRunner(runFetch);
|
|
389
|
+
|
|
390
|
+
const rebindTriggerPublisher = () => {
|
|
391
|
+
detachTriggerPublisher(state);
|
|
392
|
+
if (!triggerKeyPath) return;
|
|
393
|
+
const triggerResolution = resolveDynamicPath(
|
|
394
|
+
component,
|
|
395
|
+
triggerKeyPath,
|
|
396
|
+
pathOptions,
|
|
397
|
+
);
|
|
398
|
+
if (!triggerResolution.ready || !triggerResolution.path) {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
const publisher = getPublisherFromPath(triggerResolution.path);
|
|
402
|
+
if (!publisher) return;
|
|
403
|
+
const invalidateHandler = () => scheduleFetch();
|
|
404
|
+
publisher.onInvalidate(invalidateHandler);
|
|
405
|
+
state.triggerPublisher = publisher;
|
|
406
|
+
state.triggerInvalidateHandler = invalidateHandler;
|
|
407
|
+
};
|
|
408
|
+
|
|
344
409
|
const rebindPublisherConfig = () => {
|
|
345
410
|
if (!usesPublisherConfig || !configurationKeyPath) return;
|
|
346
411
|
detachConfigPublisher(state);
|
|
@@ -358,26 +423,32 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
358
423
|
comp[propertyKey] = undefined;
|
|
359
424
|
return;
|
|
360
425
|
}
|
|
361
|
-
const mutationHandler = () =>
|
|
362
|
-
runFetch();
|
|
363
|
-
};
|
|
426
|
+
const mutationHandler = () => scheduleFetch();
|
|
364
427
|
publisher.onInternalMutation(mutationHandler);
|
|
365
428
|
state.configPublisher = publisher;
|
|
366
429
|
state.configMutationHandler = mutationHandler;
|
|
367
430
|
};
|
|
368
431
|
|
|
369
|
-
|
|
432
|
+
const rebindAll = () => {
|
|
433
|
+
rebindTriggerPublisher();
|
|
434
|
+
rebindPublisherConfig();
|
|
435
|
+
if (!usesPublisherConfig) {
|
|
436
|
+
scheduleFetch();
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
if (usesPublisherConfig || triggerKeyDynamicDependencies.length) {
|
|
370
441
|
for (const dependency of mergedDynamicDependencies) {
|
|
371
442
|
const unsubscribe = observeDynamicProperty(
|
|
372
443
|
getDynamicWatchKeys.watcherStore,
|
|
373
444
|
getDynamicWatchKeys.hooked,
|
|
374
445
|
component,
|
|
375
446
|
dependency,
|
|
376
|
-
() =>
|
|
447
|
+
() => rebindAll(),
|
|
377
448
|
);
|
|
378
449
|
state.cleanupWatchers.push(unsubscribe);
|
|
379
450
|
}
|
|
380
|
-
|
|
451
|
+
rebindAll();
|
|
381
452
|
} else {
|
|
382
453
|
const startScopedFetch = () => {
|
|
383
454
|
if (isDynamicPath) {
|
|
@@ -387,11 +458,12 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
387
458
|
getDynamicWatchKeys.hooked,
|
|
388
459
|
component,
|
|
389
460
|
dependency,
|
|
390
|
-
() =>
|
|
461
|
+
() => scheduleFetch(),
|
|
391
462
|
);
|
|
392
463
|
state.cleanupWatchers.push(unsubscribe);
|
|
393
464
|
}
|
|
394
465
|
}
|
|
466
|
+
rebindTriggerPublisher();
|
|
395
467
|
runFetch();
|
|
396
468
|
};
|
|
397
469
|
state.cleanupWatchers.push(
|
|
@@ -405,6 +477,8 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
405
477
|
const state = comp[stateKey] as ApiGetState | undefined;
|
|
406
478
|
if (!state) return;
|
|
407
479
|
detachConfigPublisher(state);
|
|
480
|
+
detachTriggerPublisher(state);
|
|
481
|
+
clearRefetch(state);
|
|
408
482
|
state.cleanupWatchers.forEach((cleanup) => cleanup());
|
|
409
483
|
state.cleanupWatchers = [];
|
|
410
484
|
state.requestGeneration++;
|
|
@@ -413,7 +487,12 @@ export function get<T, Ue = any, Uk = any, _Ut = any>(
|
|
|
413
487
|
};
|
|
414
488
|
}
|
|
415
489
|
|
|
416
|
-
export type GetOptions = DynamicPathOptions
|
|
490
|
+
export type GetOptions<Uk = any> = DynamicPathOptions & {
|
|
491
|
+
/** Intervalle de refetch automatique (ms). 0 ou absent = pas de polling. */
|
|
492
|
+
refetchEveryMs?: number;
|
|
493
|
+
/** Publisher dont `invalidate()` relance le GET. */
|
|
494
|
+
triggerKey?: DataProviderKey<unknown, Uk>;
|
|
495
|
+
};
|
|
417
496
|
|
|
418
497
|
export type ApiSendOptions<Uk = any> = DynamicPathOptions & {
|
|
419
498
|
/** Intervalle de renvoi automatique (ms). 0 ou absent = pas de polling. */
|
|
@@ -436,7 +515,11 @@ export type PatchOptions<Uk = any> = ApiSendOptions<Uk>;
|
|
|
436
515
|
|
|
437
516
|
function isGetOptions(value: unknown): value is GetOptions {
|
|
438
517
|
if (!value || typeof value !== "object") return false;
|
|
439
|
-
return
|
|
518
|
+
return (
|
|
519
|
+
"skipEmptyPlaceholder" in value ||
|
|
520
|
+
"refetchEveryMs" in value ||
|
|
521
|
+
"triggerKey" in value
|
|
522
|
+
);
|
|
440
523
|
}
|
|
441
524
|
|
|
442
525
|
function isApiSendOptions(value: unknown): value is ApiSendOptions {
|
|
@@ -469,7 +552,7 @@ function detachBodyPublisher(state: ApiSendState): void {
|
|
|
469
552
|
state.bodyMutationHandler = null;
|
|
470
553
|
}
|
|
471
554
|
|
|
472
|
-
function detachTriggerPublisher(state:
|
|
555
|
+
function detachTriggerPublisher(state: TriggerPublisherBinding): void {
|
|
473
556
|
if (state.triggerPublisher && state.triggerInvalidateHandler) {
|
|
474
557
|
state.triggerPublisher.offInvalidate(state.triggerInvalidateHandler);
|
|
475
558
|
}
|
|
@@ -477,7 +560,7 @@ function detachTriggerPublisher(state: ApiSendState): void {
|
|
|
477
560
|
state.triggerInvalidateHandler = null;
|
|
478
561
|
}
|
|
479
562
|
|
|
480
|
-
function
|
|
563
|
+
function clearRefetch(state: RefetchScheduleState): void {
|
|
481
564
|
if (state.refetchTimeoutId) {
|
|
482
565
|
clearTimeout(state.refetchTimeoutId);
|
|
483
566
|
state.refetchTimeoutId = null;
|
|
@@ -522,7 +605,8 @@ function createApiSendDecorator<T, B, Ue = any, Uk = any, Ut = any>(
|
|
|
522
605
|
: maybeOptions;
|
|
523
606
|
const configurationKeyPath = configurationKey?.path;
|
|
524
607
|
const triggerKeyPath = options?.triggerKey?.path;
|
|
525
|
-
const endpointDynamicDependencies =
|
|
608
|
+
const endpointDynamicDependencies =
|
|
609
|
+
extractDynamicDependencies(pathTemplate);
|
|
526
610
|
const bodyKeyDynamicDependencies = extractDynamicDependencies(bodyKeyPath);
|
|
527
611
|
const configKeyDynamicDependencies = configurationKeyPath
|
|
528
612
|
? extractDynamicDependencies(configurationKeyPath)
|
|
@@ -581,10 +665,10 @@ function createApiSendDecorator<T, B, Ue = any, Uk = any, Ut = any>(
|
|
|
581
665
|
state.refetchEveryMs = refetchEveryMs;
|
|
582
666
|
state.skipIfBodyMissing = skipIfBodyMissing;
|
|
583
667
|
state.autoPostOnBodyMutation = autoPostOnBodyMutation;
|
|
584
|
-
|
|
668
|
+
clearRefetch(state);
|
|
585
669
|
|
|
586
670
|
const scheduleRefetch = () => {
|
|
587
|
-
|
|
671
|
+
clearRefetch(state);
|
|
588
672
|
if (!state.refetchEveryMs || state.refetchEveryMs <= 0) return;
|
|
589
673
|
state.refetchTimeoutId = setTimeout(() => {
|
|
590
674
|
state.refetchTimeoutId = null;
|
|
@@ -788,7 +872,7 @@ function createApiSendDecorator<T, B, Ue = any, Uk = any, Ut = any>(
|
|
|
788
872
|
detachConfigPublisher(state);
|
|
789
873
|
detachBodyPublisher(state);
|
|
790
874
|
detachTriggerPublisher(state);
|
|
791
|
-
|
|
875
|
+
clearRefetch(state);
|
|
792
876
|
state.cleanupWatchers.forEach((cleanup) => cleanup());
|
|
793
877
|
state.cleanupWatchers = [];
|
|
794
878
|
state.requestGeneration++;
|
|
@@ -861,9 +945,8 @@ export function post<T, B, Ue = any, Uk = any, Ut = any>(
|
|
|
861
945
|
target: object & { [P in K]?: ApiResult<T> | null | undefined },
|
|
862
946
|
propertyKey: K,
|
|
863
947
|
) => void {
|
|
864
|
-
return createApiSendDecorator<T, B, Ue, Uk, Ut>(
|
|
865
|
-
|
|
866
|
-
(api, path, body) => api.postDetailed<T, B>(path, body as B),
|
|
948
|
+
return createApiSendDecorator<T, B, Ue, Uk, Ut>("POST", (api, path, body) =>
|
|
949
|
+
api.postDetailed<T, B>(path, body as B),
|
|
867
950
|
)(endpoint, bodyKey, configurationKeyOrOptions, maybeOptions);
|
|
868
951
|
}
|
|
869
952
|
|
|
@@ -921,9 +1004,8 @@ export function put<T, B, Ue = any, Uk = any, Ut = any>(
|
|
|
921
1004
|
target: object & { [P in K]?: ApiResult<T> | null | undefined },
|
|
922
1005
|
propertyKey: K,
|
|
923
1006
|
) => void {
|
|
924
|
-
return createApiSendDecorator<T, B, Ue, Uk, Ut>(
|
|
925
|
-
|
|
926
|
-
(api, path, body) => api.putDetailed<T, B>(path, body as B),
|
|
1007
|
+
return createApiSendDecorator<T, B, Ue, Uk, Ut>("PUT", (api, path, body) =>
|
|
1008
|
+
api.putDetailed<T, B>(path, body as B),
|
|
927
1009
|
)(endpoint, bodyKey, configurationKeyOrOptions, maybeOptions);
|
|
928
1010
|
}
|
|
929
1011
|
|
|
@@ -981,8 +1063,7 @@ export function patch<T, B, Ue = any, Uk = any, Ut = any>(
|
|
|
981
1063
|
target: object & { [P in K]?: ApiResult<T> | null | undefined },
|
|
982
1064
|
propertyKey: K,
|
|
983
1065
|
) => void {
|
|
984
|
-
return createApiSendDecorator<T, B, Ue, Uk, Ut>(
|
|
985
|
-
|
|
986
|
-
(api, path, body) => api.patchDetailed<T, B>(path, body as B),
|
|
1066
|
+
return createApiSendDecorator<T, B, Ue, Uk, Ut>("PATCH", (api, path, body) =>
|
|
1067
|
+
api.patchDetailed<T, B>(path, body as B),
|
|
987
1068
|
)(endpoint, bodyKey, configurationKeyOrOptions, maybeOptions);
|
|
988
1069
|
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
+
import { ancestorAttribute } from "./ancestorAttribute";
|
|
3
|
+
|
|
4
|
+
async function flushFrames(count = 2): Promise<void> {
|
|
5
|
+
for (let i = 0; i < count; i += 1) {
|
|
6
|
+
await new Promise<void>((resolve) => {
|
|
7
|
+
requestAnimationFrame(() => resolve());
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
describe("ancestorAttribute", () => {
|
|
13
|
+
afterEach(() => {
|
|
14
|
+
document.body.replaceChildren();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it("lit la valeur initiale au connect (mode statique par défaut)", () => {
|
|
18
|
+
const tag = "test-ancestor-attr-static-init";
|
|
19
|
+
class C extends HTMLElement {
|
|
20
|
+
@ancestorAttribute("dataProvider")
|
|
21
|
+
dataProvider: string | null = null;
|
|
22
|
+
}
|
|
23
|
+
if (!customElements.get(tag)) {
|
|
24
|
+
customElements.define(tag, C);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const wrap = document.createElement("div");
|
|
28
|
+
wrap.setAttribute("dataProvider", "scope-a");
|
|
29
|
+
const el = document.createElement(tag) as InstanceType<typeof C>;
|
|
30
|
+
wrap.appendChild(el);
|
|
31
|
+
document.body.appendChild(wrap);
|
|
32
|
+
|
|
33
|
+
expect(el.dataProvider).toBe("scope-a");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("ne réagit pas aux mutations en mode statique (défaut)", async () => {
|
|
37
|
+
const tag = "test-ancestor-attr-static-no-react";
|
|
38
|
+
class C extends HTMLElement {
|
|
39
|
+
@ancestorAttribute("dataProvider")
|
|
40
|
+
dataProvider: string | null = null;
|
|
41
|
+
}
|
|
42
|
+
if (!customElements.get(tag)) {
|
|
43
|
+
customElements.define(tag, C);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const wrap = document.createElement("div");
|
|
47
|
+
wrap.setAttribute("dataProvider", "scope-a");
|
|
48
|
+
const el = document.createElement(tag) as InstanceType<typeof C>;
|
|
49
|
+
wrap.appendChild(el);
|
|
50
|
+
document.body.appendChild(wrap);
|
|
51
|
+
|
|
52
|
+
wrap.setAttribute("dataProvider", "scope-b");
|
|
53
|
+
await flushFrames();
|
|
54
|
+
|
|
55
|
+
expect(el.dataProvider).toBe("scope-a");
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("met à jour la propriété quand un ancêtre change (mode dynamique)", async () => {
|
|
59
|
+
const tag = "test-ancestor-attr-dynamic-mutation";
|
|
60
|
+
class C extends HTMLElement {
|
|
61
|
+
@ancestorAttribute("dataProvider", { dynamic: true })
|
|
62
|
+
dataProvider: string | null = null;
|
|
63
|
+
}
|
|
64
|
+
if (!customElements.get(tag)) {
|
|
65
|
+
customElements.define(tag, C);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const wrap = document.createElement("div");
|
|
69
|
+
wrap.setAttribute("dataProvider", "scope-a");
|
|
70
|
+
const el = document.createElement(tag) as InstanceType<typeof C>;
|
|
71
|
+
wrap.appendChild(el);
|
|
72
|
+
document.body.appendChild(wrap);
|
|
73
|
+
|
|
74
|
+
expect(el.dataProvider).toBe("scope-a");
|
|
75
|
+
|
|
76
|
+
wrap.setAttribute("dataProvider", "scope-b");
|
|
77
|
+
await flushFrames();
|
|
78
|
+
|
|
79
|
+
expect(el.dataProvider).toBe("scope-b");
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("assigne null si l'attribut ancêtre est retiré (mode dynamique)", async () => {
|
|
83
|
+
const tag = "test-ancestor-attr-dynamic-null";
|
|
84
|
+
class C extends HTMLElement {
|
|
85
|
+
@ancestorAttribute("dataProvider", { dynamic: true })
|
|
86
|
+
dataProvider: string | null = "initial";
|
|
87
|
+
}
|
|
88
|
+
if (!customElements.get(tag)) {
|
|
89
|
+
customElements.define(tag, C);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const wrap = document.createElement("div");
|
|
93
|
+
wrap.setAttribute("dataProvider", "scope-a");
|
|
94
|
+
const el = document.createElement(tag) as InstanceType<typeof C>;
|
|
95
|
+
wrap.appendChild(el);
|
|
96
|
+
document.body.appendChild(wrap);
|
|
97
|
+
|
|
98
|
+
wrap.removeAttribute("dataProvider");
|
|
99
|
+
await flushFrames();
|
|
100
|
+
|
|
101
|
+
expect(el.dataProvider).toBeNull();
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it("retombe sur l'ancêtre suivant quand le plus proche perd l'attribut", async () => {
|
|
105
|
+
const tag = "test-ancestor-attr-dynamic-fallback";
|
|
106
|
+
class C extends HTMLElement {
|
|
107
|
+
@ancestorAttribute("dataProvider", { dynamic: true })
|
|
108
|
+
dataProvider: string | null = null;
|
|
109
|
+
}
|
|
110
|
+
if (!customElements.get(tag)) {
|
|
111
|
+
customElements.define(tag, C);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const outer = document.createElement("div");
|
|
115
|
+
outer.setAttribute("dataProvider", "from-outer");
|
|
116
|
+
const parent = document.createElement("div");
|
|
117
|
+
parent.setAttribute("dataProvider", "from-parent");
|
|
118
|
+
const el = document.createElement(tag) as InstanceType<typeof C>;
|
|
119
|
+
parent.appendChild(el);
|
|
120
|
+
outer.appendChild(parent);
|
|
121
|
+
document.body.appendChild(outer);
|
|
122
|
+
|
|
123
|
+
expect(el.dataProvider).toBe("from-parent");
|
|
124
|
+
|
|
125
|
+
parent.removeAttribute("dataProvider");
|
|
126
|
+
await flushFrames();
|
|
127
|
+
|
|
128
|
+
expect(el.dataProvider).toBe("from-outer");
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it("met à jour dans un shadow root (Lit)", async () => {
|
|
132
|
+
const hostTag = "test-ancestor-shadow-host";
|
|
133
|
+
const childTag = "test-ancestor-shadow-child";
|
|
134
|
+
|
|
135
|
+
class Host extends HTMLElement {
|
|
136
|
+
connectedCallback() {
|
|
137
|
+
const shadow = this.attachShadow({ mode: "open" });
|
|
138
|
+
const wrap = document.createElement("div");
|
|
139
|
+
wrap.setAttribute("dataProvider", "scope-a");
|
|
140
|
+
const child = document.createElement(childTag);
|
|
141
|
+
wrap.appendChild(child);
|
|
142
|
+
shadow.append(wrap);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
class Child extends HTMLElement {
|
|
147
|
+
@ancestorAttribute("dataProvider", { dynamic: true })
|
|
148
|
+
dataProvider: string | null = null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (!customElements.get(hostTag)) {
|
|
152
|
+
customElements.define(hostTag, Host);
|
|
153
|
+
}
|
|
154
|
+
if (!customElements.get(childTag)) {
|
|
155
|
+
customElements.define(childTag, Child);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const host = document.createElement(hostTag);
|
|
159
|
+
document.body.appendChild(host);
|
|
160
|
+
await flushFrames();
|
|
161
|
+
|
|
162
|
+
const wrap = host.shadowRoot!.querySelector("div")!;
|
|
163
|
+
const child = host.shadowRoot!.querySelector(childTag) as InstanceType<
|
|
164
|
+
typeof Child
|
|
165
|
+
>;
|
|
166
|
+
|
|
167
|
+
expect(child.dataProvider).toBe("scope-a");
|
|
168
|
+
|
|
169
|
+
wrap.setAttribute("dataProvider", "scope-b");
|
|
170
|
+
await flushFrames();
|
|
171
|
+
|
|
172
|
+
expect(child.dataProvider).toBe("scope-b");
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
it("ne met plus à jour après disconnect (mode dynamique)", async () => {
|
|
176
|
+
const tag = "test-ancestor-attr-dynamic-disconnect";
|
|
177
|
+
class C extends HTMLElement {
|
|
178
|
+
@ancestorAttribute("dataProvider", { dynamic: true })
|
|
179
|
+
dataProvider: string | null = null;
|
|
180
|
+
}
|
|
181
|
+
if (!customElements.get(tag)) {
|
|
182
|
+
customElements.define(tag, C);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const wrap = document.createElement("div");
|
|
186
|
+
wrap.setAttribute("dataProvider", "scope-a");
|
|
187
|
+
const el = document.createElement(tag) as InstanceType<typeof C>;
|
|
188
|
+
wrap.appendChild(el);
|
|
189
|
+
document.body.appendChild(wrap);
|
|
190
|
+
|
|
191
|
+
el.remove();
|
|
192
|
+
wrap.setAttribute("dataProvider", "scope-b");
|
|
193
|
+
await flushFrames();
|
|
194
|
+
|
|
195
|
+
expect(el.dataProvider).toBe("scope-a");
|
|
196
|
+
});
|
|
197
|
+
});
|
|
@@ -1,18 +1,51 @@
|
|
|
1
|
-
import
|
|
1
|
+
import AncestorAttributeObserver, {
|
|
2
|
+
syncAncestorAttributeValue,
|
|
3
|
+
} from "../../utils/AncestorAttributeObserver";
|
|
2
4
|
import { ConnectedComponent, setSubscribable } from "./common";
|
|
3
5
|
|
|
4
|
-
export
|
|
6
|
+
export type AncestorAttributeOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* Si true, le composant reste synchronisé avec les attributs ancêtres via
|
|
9
|
+
* `AncestorAttributeObserver` (mutations + reparenting). Requis pour que
|
|
10
|
+
* `@bind` / `@subscribe` avec `${dataProvider}` se re-lient quand le scope change.
|
|
11
|
+
* Défaut : false (lecture unique au connect, rétrocompat).
|
|
12
|
+
*/
|
|
13
|
+
dynamic?: boolean;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function ancestorAttribute(
|
|
17
|
+
attributeName: string,
|
|
18
|
+
options?: AncestorAttributeOptions,
|
|
19
|
+
) {
|
|
20
|
+
const dynamic = options?.dynamic ?? false;
|
|
21
|
+
const assignNull = dynamic;
|
|
22
|
+
|
|
5
23
|
return function (target: unknown, propertyKey: string) {
|
|
6
24
|
if (!target) return;
|
|
7
25
|
setSubscribable(target);
|
|
26
|
+
|
|
8
27
|
(target as ConnectedComponent).__onBeforeConnected__((component) => {
|
|
9
|
-
|
|
10
|
-
|
|
28
|
+
syncAncestorAttributeValue(component, attributeName, propertyKey, {
|
|
29
|
+
assignNull,
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (!dynamic) return;
|
|
34
|
+
|
|
35
|
+
let unsubscribe: (() => void) | null = null;
|
|
36
|
+
|
|
37
|
+
(target as ConnectedComponent).__onConnected__((component) => {
|
|
38
|
+
unsubscribe = AncestorAttributeObserver.subscribe(
|
|
39
|
+
component as unknown as HTMLElement,
|
|
11
40
|
attributeName,
|
|
41
|
+
propertyKey,
|
|
42
|
+
{ assignNull: true },
|
|
12
43
|
);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
(target as ConnectedComponent).__onDisconnected__(() => {
|
|
47
|
+
unsubscribe?.();
|
|
48
|
+
unsubscribe = null;
|
|
16
49
|
});
|
|
17
50
|
};
|
|
18
51
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
PublisherProxy,
|
|
3
|
+
collectModifiedPublisher,
|
|
4
|
+
getModifiedPublishers,
|
|
5
|
+
} from "../../utils/PublisherProxy";
|
|
2
6
|
|
|
3
7
|
export function autoSubscribe() {
|
|
4
8
|
return function (
|
|
@@ -33,10 +37,10 @@ export function autoSubscribe() {
|
|
|
33
37
|
publishers.forEach((publisher: PublisherProxy) => {
|
|
34
38
|
publisher.offAssign(onAssign);
|
|
35
39
|
});
|
|
36
|
-
|
|
40
|
+
collectModifiedPublisher();
|
|
37
41
|
const result = originalMethod.apply(this, args);
|
|
38
42
|
publishers =
|
|
39
|
-
|
|
43
|
+
getModifiedPublishers() || new Set<PublisherProxy>();
|
|
40
44
|
|
|
41
45
|
publishers.forEach((publisher: PublisherProxy) => {
|
|
42
46
|
publisher.onAssign(onAssign, false);
|
|
@@ -11,12 +11,13 @@ import { ResultTypeInterface } from "@supersoniks/concorde/core/utils/api";
|
|
|
11
11
|
import { detecHTMLLanguageChange } from "../utils/HTML";
|
|
12
12
|
type Constructor<T> = new (...args: MixinArgsType[]) => T;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
type Refetchable = { refetch: () => void | Promise<void> };
|
|
15
|
+
const fetchersInError: Set<Refetchable> = new Set();
|
|
15
16
|
export const invalidateFetchersInError = () => {
|
|
16
17
|
const fetchersInErrorCopy = new Set(fetchersInError);
|
|
17
18
|
fetchersInError.clear();
|
|
18
19
|
for (const fetcher of fetchersInErrorCopy) {
|
|
19
|
-
fetcher.
|
|
20
|
+
fetcher.refetch();
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
|
|
@@ -39,7 +40,7 @@ const dispatchFetchError = (apiResponse: Response) => {
|
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
42
|
|
|
42
|
-
const fetchComponents = new Set<
|
|
43
|
+
const fetchComponents = new Set<Refetchable>();
|
|
43
44
|
let languageChangeRequestId = 0;
|
|
44
45
|
detecHTMLLanguageChange(async () => {
|
|
45
46
|
//relaunch 4 fetchs then wait the result before launching the next 4 fetchs
|
|
@@ -49,7 +50,7 @@ detecHTMLLanguageChange(async () => {
|
|
|
49
50
|
while (fetchers.length > 0) {
|
|
50
51
|
if (currentRequestId != languageChangeRequestId) return;
|
|
51
52
|
const fourFetchers = fetchers.splice(0, 4);
|
|
52
|
-
await Promise.all(fourFetchers.map((fetcher) => fetcher.
|
|
53
|
+
await Promise.all(fourFetchers.map((fetcher) => fetcher.refetch()));
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
56
|
|
|
@@ -148,13 +149,18 @@ const Fetcher = <
|
|
|
148
149
|
this._fetchData();
|
|
149
150
|
}
|
|
150
151
|
}
|
|
152
|
+
|
|
153
|
+
refetch() {
|
|
154
|
+
return this._fetchData();
|
|
155
|
+
}
|
|
156
|
+
|
|
151
157
|
/**
|
|
152
158
|
*
|
|
153
159
|
* C'est ici que les données sont chargées via l'utilitaire API
|
|
154
160
|
* Elles sont ensuite injectées dans le publisher en accord avec la cible définie dans la propriété key
|
|
155
161
|
* Un Toast est affiché si le chargement échoue
|
|
156
162
|
*/
|
|
157
|
-
async _fetchData() {
|
|
163
|
+
protected async _fetchData() {
|
|
158
164
|
this.requestUpdate();
|
|
159
165
|
if (!this.isFetchEnabled) return;
|
|
160
166
|
this.api = new API(this.getApiConfiguration());
|
|
@@ -372,6 +378,6 @@ const Fetcher = <
|
|
|
372
378
|
}
|
|
373
379
|
}
|
|
374
380
|
}
|
|
375
|
-
return FetcherElement;
|
|
381
|
+
return FetcherElement;
|
|
376
382
|
};
|
|
377
383
|
export default Fetcher;
|