@supersoniks/concorde 4.7.4 → 4.9.0
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 +30 -16
- package/ai/cursor/rules/concorde.mdc +1 -1
- package/ai/skills/concorde-scope/SKILL.md +2 -2
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +214 -214
- package/concorde-core.es.js +4517 -4133
- package/dist/concorde-core.bundle.js +214 -214
- package/dist/concorde-core.es.js +4517 -4133
- package/dist/docs-mock-api-sw.js +19 -0
- 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 +559 -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 +106 -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-BEgZEIbv.js +11196 -0
- package/docs/docs-mock-api-sw.js +19 -0
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +1 -1
- package/docs/src/docs/_core-concept/dataFlow.md +9 -3
- package/docs/src/docs/_decorators/bind.md +2 -2
- package/docs/src/docs/_decorators/get.md +13 -4
- package/docs/src/docs/_decorators/handle.md +5 -1
- package/docs/src/docs/_decorators/on-assign.md +2 -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 +1 -1
- package/docs/src/docs/_decorators/put.md +43 -0
- package/docs/src/docs/_decorators/subscribe.md +4 -1
- package/docs/src/docs/_directives/sub.md +1 -1
- package/docs/src/docs/_getting-started/my-first-component.md +1 -1
- package/docs/src/docs/_misc/api-configuration.md +3 -1
- package/docs/src/docs/_misc/dataProviderKey.md +2 -2
- package/docs/src/docs/_misc/dynamic-path.md +71 -0
- package/docs/src/docs/_misc/endpoint.md +5 -3
- package/docs/src/docs/search/docs-search.json +540 -15
- package/docs/src/tsconfig.json +377 -353
- package/gitlab/job_github_mirror.sh +39 -0
- package/index.html +0 -1
- package/package.json +1084 -356
- package/public/docs-mock-api-sw.js +19 -0
- 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/example/example.ts +3 -3
- package/src/core/components/functional/queue/queue.ts +2 -2
- package/src/core/components/ui/icon/icon.ts +17 -2
- package/src/core/components/ui/menu/menu.ts +12 -3
- package/src/core/components/ui/modal/modal.ts +1 -1
- package/src/core/decorators/Subscriber.ts +1 -0
- package/src/core/decorators/api.post.spec.ts +293 -0
- package/src/core/decorators/api.spec.ts +6 -6
- package/src/core/decorators/api.ts +641 -12
- 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/decorators/subscriber/bind.ts +13 -5
- package/src/core/decorators/subscriber/dynamicPath.spec.ts +53 -0
- package/src/core/decorators/subscriber/dynamicPath.ts +23 -1
- package/src/core/decorators/subscriber/handle.ts +3 -1
- package/src/core/decorators/subscriber/onAssign.ts +10 -2
- package/src/core/decorators/subscriber/publish.ts +12 -2
- 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 +123 -48
- package/src/core/utils/api.ts +82 -13
- package/src/core/utils/dpOptions.spec.ts +56 -0
- package/src/core/utils/endpoint.ts +3 -3
- package/src/css.d.ts +19 -0
- package/src/decorators.ts +17 -1
- package/src/directives.ts +3 -2
- package/src/docs/_core-concept/dataFlow.md +9 -3
- package/src/docs/_decorators/ancestor-attribute.md +56 -8
- package/src/docs/_decorators/bind.md +2 -2
- package/src/docs/_decorators/get.md +13 -4
- package/src/docs/_decorators/handle.md +5 -1
- package/src/docs/_decorators/on-assign.md +2 -0
- package/src/docs/_decorators/patch.md +45 -0
- package/src/docs/_decorators/post.md +93 -0
- package/src/docs/_decorators/publish.md +1 -1
- package/src/docs/_decorators/put.md +43 -0
- package/src/docs/_decorators/subscribe.md +4 -1
- package/src/docs/_directives/sub.md +1 -1
- package/src/docs/_getting-started/my-first-component.md +1 -1
- package/src/docs/_misc/api-configuration.md +3 -1
- package/src/docs/_misc/dataProviderKey.md +2 -2
- package/src/docs/_misc/dynamic-path.md +71 -0
- package/src/docs/_misc/endpoint.md +5 -3
- package/src/docs/components/docs-demo-sources.ts +115 -4
- package/src/docs/components/docs-lit-demo-raw.ts +2 -26
- package/src/docs/components/docs-lit-demo.ts +9 -42
- package/src/docs/components/docs-source-excerpt.ts +53 -0
- package/src/docs/components/docs-source-link.ts +24 -8
- package/src/docs/components/docs-source-raw.ts +34 -0
- package/src/docs/example/decorators-demo-geo.ts +2 -2
- package/src/docs/example/decorators-demo-post.ts +249 -0
- package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +5 -5
- package/src/docs/example/decorators-demo.ts +165 -8
- package/src/docs/example/docs-api-config-demos.ts +5 -5
- package/src/docs/mock-api/router.ts +20 -0
- package/src/docs/navigation/navigation.ts +16 -0
- package/src/docs/search/docs-search.json +602 -17
- package/src/tsconfig.declarations.json +22 -0
- package/src/tsconfig.emit.json +23 -0
- package/src/tsconfig.json +3 -261
- package/src/tsconfig.tsbuildinfo +1 -1
- package/vite.config.mts +1 -1
- package/docs/assets/index-CwtPzTFq.js +0 -7508
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
import HTML from "@supersoniks/concorde/core/utils/HTML";
|
|
2
|
+
import API from "@supersoniks/concorde/core/utils/api";
|
|
3
|
+
import { setSubscribable } from "./subscriber/common";
|
|
4
|
+
import { extractDynamicDependencies, resolveDynamicPath, } from "./subscriber/dynamicPath";
|
|
5
|
+
import { getDynamicWatchKeys, observeDynamicProperty, } from "./subscriber/dynamicPropertyWatch";
|
|
6
|
+
import { getPublisherFromPath } from "./subscriber/publisherPath";
|
|
7
|
+
function asSearchableHost(component) {
|
|
8
|
+
if (component instanceof HTMLElement || component instanceof ShadowRoot) {
|
|
9
|
+
return component;
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
function readApiConfigurationFromPublisher(publisher) {
|
|
14
|
+
if (!publisher || typeof publisher.get !== "function")
|
|
15
|
+
return null;
|
|
16
|
+
const raw = publisher.get();
|
|
17
|
+
if (!raw || typeof raw !== "object")
|
|
18
|
+
return null;
|
|
19
|
+
if (!("serviceURL" in raw))
|
|
20
|
+
return null;
|
|
21
|
+
return raw;
|
|
22
|
+
}
|
|
23
|
+
function resolveScopedConfiguration(component) {
|
|
24
|
+
const host = asSearchableHost(component);
|
|
25
|
+
if (!host)
|
|
26
|
+
return null;
|
|
27
|
+
return HTML.getApiConfiguration(host);
|
|
28
|
+
}
|
|
29
|
+
function isScopedConfigurationReady(config) {
|
|
30
|
+
return typeof config?.serviceURL === "string" && config.serviceURL.length > 0;
|
|
31
|
+
}
|
|
32
|
+
/** Attributs scope dont la présence peut déclencher un GET différé (Lit → minuscules). */
|
|
33
|
+
const SCOPE_WATCH_ATTRIBUTES = [
|
|
34
|
+
"serviceURL",
|
|
35
|
+
"serviceurl",
|
|
36
|
+
"token",
|
|
37
|
+
"credentials",
|
|
38
|
+
"tokenProvider",
|
|
39
|
+
"tokenprovider",
|
|
40
|
+
"userName",
|
|
41
|
+
"username",
|
|
42
|
+
"password",
|
|
43
|
+
"eventsApiToken",
|
|
44
|
+
"eventsapitoken",
|
|
45
|
+
];
|
|
46
|
+
function isLitHost(component) {
|
|
47
|
+
return (component instanceof HTMLElement &&
|
|
48
|
+
typeof component.updateComplete !== "undefined");
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Regroupe plusieurs déclencheurs synchrones (mutations `onInternalMutation`,
|
|
52
|
+
* `rebindAll`, etc.) en un seul appel par frame — même principe que
|
|
53
|
+
* `dynamicPropertyWatch.ts` (`scheduleObservedPropertyChanges`).
|
|
54
|
+
*/
|
|
55
|
+
function createAnimationFrameCoalescedRunner(run) {
|
|
56
|
+
let frameId = null;
|
|
57
|
+
return () => {
|
|
58
|
+
if (frameId !== null)
|
|
59
|
+
return;
|
|
60
|
+
frameId = requestAnimationFrame(() => {
|
|
61
|
+
frameId = null;
|
|
62
|
+
run();
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function scheduleAfterHostReady(component, callback) {
|
|
67
|
+
if (isLitHost(component)) {
|
|
68
|
+
let cancelled = false;
|
|
69
|
+
void component.updateComplete.then(() => {
|
|
70
|
+
if (!cancelled)
|
|
71
|
+
callback();
|
|
72
|
+
});
|
|
73
|
+
return () => {
|
|
74
|
+
cancelled = true;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
// HTMLElement classique : config ancêtre déjà lisible ; sinon watchScopedConfiguration.
|
|
78
|
+
callback();
|
|
79
|
+
return () => { };
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Attend que la config scope soit lisible (attributs DOM ou propriétés Lit reflect).
|
|
83
|
+
*/
|
|
84
|
+
function watchScopedConfiguration(component, onReady) {
|
|
85
|
+
const host = asSearchableHost(component);
|
|
86
|
+
if (!host)
|
|
87
|
+
return () => { };
|
|
88
|
+
let settled = false;
|
|
89
|
+
const tryNotify = () => {
|
|
90
|
+
if (settled)
|
|
91
|
+
return;
|
|
92
|
+
if (!isScopedConfigurationReady(resolveScopedConfiguration(component))) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
settled = true;
|
|
96
|
+
onReady();
|
|
97
|
+
};
|
|
98
|
+
tryNotify();
|
|
99
|
+
if (settled)
|
|
100
|
+
return () => { };
|
|
101
|
+
const cleanups = [];
|
|
102
|
+
const rafId = requestAnimationFrame(() => tryNotify());
|
|
103
|
+
cleanups.push(() => cancelAnimationFrame(rafId));
|
|
104
|
+
queueMicrotask(() => tryNotify());
|
|
105
|
+
const observer = new MutationObserver(() => tryNotify());
|
|
106
|
+
let node = host;
|
|
107
|
+
while (node) {
|
|
108
|
+
if (node instanceof Element) {
|
|
109
|
+
observer.observe(node, {
|
|
110
|
+
attributes: true,
|
|
111
|
+
attributeFilter: [...SCOPE_WATCH_ATTRIBUTES],
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
node = (node.parentNode ||
|
|
115
|
+
node.host);
|
|
116
|
+
}
|
|
117
|
+
cleanups.push(() => observer.disconnect());
|
|
118
|
+
return () => {
|
|
119
|
+
settled = true;
|
|
120
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function detachConfigPublisher(state) {
|
|
124
|
+
if (state.configPublisher && state.configMutationHandler) {
|
|
125
|
+
state.configPublisher.offInternalMutation(state.configMutationHandler);
|
|
126
|
+
}
|
|
127
|
+
state.configPublisher = null;
|
|
128
|
+
state.configMutationHandler = null;
|
|
129
|
+
}
|
|
130
|
+
export function get(endpoint, configurationKeyOrOptions, maybeOptions) {
|
|
131
|
+
const pathTemplate = endpoint.path;
|
|
132
|
+
const configurationKey = isGetOptions(configurationKeyOrOptions)
|
|
133
|
+
? undefined
|
|
134
|
+
: configurationKeyOrOptions;
|
|
135
|
+
const options = isGetOptions(configurationKeyOrOptions)
|
|
136
|
+
? configurationKeyOrOptions
|
|
137
|
+
: maybeOptions;
|
|
138
|
+
const pathOptions = {
|
|
139
|
+
skipEmptyPlaceholder: options?.skipEmptyPlaceholder,
|
|
140
|
+
};
|
|
141
|
+
const configurationKeyPath = configurationKey?.path;
|
|
142
|
+
const endpointDynamicDependencies = extractDynamicDependencies(pathTemplate);
|
|
143
|
+
const configKeyDynamicDependencies = configurationKeyPath
|
|
144
|
+
? extractDynamicDependencies(configurationKeyPath)
|
|
145
|
+
: [];
|
|
146
|
+
const mergedDynamicDependencies = [
|
|
147
|
+
...new Set([
|
|
148
|
+
...endpointDynamicDependencies,
|
|
149
|
+
...configKeyDynamicDependencies,
|
|
150
|
+
]),
|
|
151
|
+
];
|
|
152
|
+
const isDynamicPath = endpointDynamicDependencies.length > 0;
|
|
153
|
+
const usesPublisherConfig = Boolean(configurationKeyPath);
|
|
154
|
+
return function (target, propertyKey) {
|
|
155
|
+
if (!target)
|
|
156
|
+
return;
|
|
157
|
+
setSubscribable(target);
|
|
158
|
+
const stateKey = `__get_state_${propertyKey}`;
|
|
159
|
+
target.__onConnected__((component) => {
|
|
160
|
+
const comp = component;
|
|
161
|
+
let state = comp[stateKey];
|
|
162
|
+
if (!state) {
|
|
163
|
+
state = {
|
|
164
|
+
cleanupWatchers: [],
|
|
165
|
+
requestGeneration: 0,
|
|
166
|
+
configPublisher: null,
|
|
167
|
+
configMutationHandler: null,
|
|
168
|
+
scopeWatchCleanup: null,
|
|
169
|
+
};
|
|
170
|
+
comp[stateKey] = state;
|
|
171
|
+
}
|
|
172
|
+
state.cleanupWatchers.forEach((cleanup) => cleanup());
|
|
173
|
+
state.cleanupWatchers = [];
|
|
174
|
+
state.requestGeneration++;
|
|
175
|
+
const runFetch = () => {
|
|
176
|
+
const resolution = isDynamicPath
|
|
177
|
+
? resolveDynamicPath(component, pathTemplate, pathOptions)
|
|
178
|
+
: { ready: true, path: pathTemplate };
|
|
179
|
+
if (!resolution.ready || !resolution.path) {
|
|
180
|
+
comp[propertyKey] = undefined;
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
let config = null;
|
|
184
|
+
if (usesPublisherConfig && configurationKeyPath) {
|
|
185
|
+
const configRes = resolveDynamicPath(component, configurationKeyPath, pathOptions);
|
|
186
|
+
if (!configRes.ready || !configRes.path) {
|
|
187
|
+
comp[propertyKey] = undefined;
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const configPublisher = getPublisherFromPath(configRes.path);
|
|
191
|
+
config = readApiConfigurationFromPublisher(configPublisher);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
config = resolveScopedConfiguration(component);
|
|
195
|
+
}
|
|
196
|
+
if (!isScopedConfigurationReady(config)) {
|
|
197
|
+
if (!usesPublisherConfig && !state.scopeWatchCleanup) {
|
|
198
|
+
const scopeWatch = watchScopedConfiguration(component, runFetch);
|
|
199
|
+
state.scopeWatchCleanup = scopeWatch;
|
|
200
|
+
state.cleanupWatchers.push(() => {
|
|
201
|
+
scopeWatch();
|
|
202
|
+
state.scopeWatchCleanup = null;
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const generation = ++state.requestGeneration;
|
|
208
|
+
const api = new API(config);
|
|
209
|
+
void api
|
|
210
|
+
.getDetailed(resolution.path)
|
|
211
|
+
.then((payload) => {
|
|
212
|
+
if (generation !== state.requestGeneration)
|
|
213
|
+
return;
|
|
214
|
+
comp[propertyKey] = payload;
|
|
215
|
+
});
|
|
216
|
+
};
|
|
217
|
+
const rebindPublisherConfig = () => {
|
|
218
|
+
if (!usesPublisherConfig || !configurationKeyPath)
|
|
219
|
+
return;
|
|
220
|
+
detachConfigPublisher(state);
|
|
221
|
+
const configRes = resolveDynamicPath(component, configurationKeyPath, pathOptions);
|
|
222
|
+
if (!configRes.ready || !configRes.path) {
|
|
223
|
+
comp[propertyKey] = undefined;
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const publisher = getPublisherFromPath(configRes.path);
|
|
227
|
+
if (!publisher) {
|
|
228
|
+
comp[propertyKey] = undefined;
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const mutationHandler = () => {
|
|
232
|
+
runFetch();
|
|
233
|
+
};
|
|
234
|
+
publisher.onInternalMutation(mutationHandler);
|
|
235
|
+
state.configPublisher = publisher;
|
|
236
|
+
state.configMutationHandler = mutationHandler;
|
|
237
|
+
};
|
|
238
|
+
if (usesPublisherConfig) {
|
|
239
|
+
for (const dependency of mergedDynamicDependencies) {
|
|
240
|
+
const unsubscribe = observeDynamicProperty(getDynamicWatchKeys.watcherStore, getDynamicWatchKeys.hooked, component, dependency, () => rebindPublisherConfig());
|
|
241
|
+
state.cleanupWatchers.push(unsubscribe);
|
|
242
|
+
}
|
|
243
|
+
rebindPublisherConfig();
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
const startScopedFetch = () => {
|
|
247
|
+
if (isDynamicPath) {
|
|
248
|
+
for (const dependency of endpointDynamicDependencies) {
|
|
249
|
+
const unsubscribe = observeDynamicProperty(getDynamicWatchKeys.watcherStore, getDynamicWatchKeys.hooked, component, dependency, () => runFetch());
|
|
250
|
+
state.cleanupWatchers.push(unsubscribe);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
runFetch();
|
|
254
|
+
};
|
|
255
|
+
state.cleanupWatchers.push(scheduleAfterHostReady(component, startScopedFetch));
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
target.__onDisconnected__((component) => {
|
|
259
|
+
const comp = component;
|
|
260
|
+
const state = comp[stateKey];
|
|
261
|
+
if (!state)
|
|
262
|
+
return;
|
|
263
|
+
detachConfigPublisher(state);
|
|
264
|
+
state.cleanupWatchers.forEach((cleanup) => cleanup());
|
|
265
|
+
state.cleanupWatchers = [];
|
|
266
|
+
state.requestGeneration++;
|
|
267
|
+
comp[propertyKey] = undefined;
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function isGetOptions(value) {
|
|
272
|
+
if (!value || typeof value !== "object")
|
|
273
|
+
return false;
|
|
274
|
+
return "skipEmptyPlaceholder" in value;
|
|
275
|
+
}
|
|
276
|
+
function isApiSendOptions(value) {
|
|
277
|
+
if (!value || typeof value !== "object")
|
|
278
|
+
return false;
|
|
279
|
+
return ("refetchEveryMs" in value ||
|
|
280
|
+
"skipIfBodyMissing" in value ||
|
|
281
|
+
"autoPostOnBodyMutation" in value ||
|
|
282
|
+
"skipEmptyPlaceholder" in value ||
|
|
283
|
+
"triggerKey" in value);
|
|
284
|
+
}
|
|
285
|
+
function detachBodyPublisher(state) {
|
|
286
|
+
if (state.bodyPublisher && state.bodyMutationHandler) {
|
|
287
|
+
state.bodyPublisher.offInternalMutation(state.bodyMutationHandler);
|
|
288
|
+
}
|
|
289
|
+
state.bodyPublisher = null;
|
|
290
|
+
state.bodyMutationHandler = null;
|
|
291
|
+
}
|
|
292
|
+
function detachTriggerPublisher(state) {
|
|
293
|
+
if (state.triggerPublisher && state.triggerInvalidateHandler) {
|
|
294
|
+
state.triggerPublisher.offInvalidate(state.triggerInvalidateHandler);
|
|
295
|
+
}
|
|
296
|
+
state.triggerPublisher = null;
|
|
297
|
+
state.triggerInvalidateHandler = null;
|
|
298
|
+
}
|
|
299
|
+
function clearSendRefetch(state) {
|
|
300
|
+
if (state.refetchTimeoutId) {
|
|
301
|
+
clearTimeout(state.refetchTimeoutId);
|
|
302
|
+
state.refetchTimeoutId = null;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
function readBodyFromPublisher(publisher) {
|
|
306
|
+
if (!publisher || typeof publisher.get !== "function")
|
|
307
|
+
return undefined;
|
|
308
|
+
return publisher.get();
|
|
309
|
+
}
|
|
310
|
+
function createApiSendDecorator(method, callDetailed) {
|
|
311
|
+
return function (endpoint, bodyKey, configurationKeyOrOptions, maybeOptions) {
|
|
312
|
+
const pathTemplate = endpoint.path;
|
|
313
|
+
const bodyKeyPath = bodyKey.path;
|
|
314
|
+
const configurationKey = isApiSendOptions(configurationKeyOrOptions)
|
|
315
|
+
? undefined
|
|
316
|
+
: configurationKeyOrOptions;
|
|
317
|
+
const options = isApiSendOptions(configurationKeyOrOptions)
|
|
318
|
+
? configurationKeyOrOptions
|
|
319
|
+
: maybeOptions;
|
|
320
|
+
const configurationKeyPath = configurationKey?.path;
|
|
321
|
+
const triggerKeyPath = options?.triggerKey?.path;
|
|
322
|
+
const endpointDynamicDependencies = extractDynamicDependencies(pathTemplate);
|
|
323
|
+
const bodyKeyDynamicDependencies = extractDynamicDependencies(bodyKeyPath);
|
|
324
|
+
const configKeyDynamicDependencies = configurationKeyPath
|
|
325
|
+
? extractDynamicDependencies(configurationKeyPath)
|
|
326
|
+
: [];
|
|
327
|
+
const triggerKeyDynamicDependencies = triggerKeyPath
|
|
328
|
+
? extractDynamicDependencies(triggerKeyPath)
|
|
329
|
+
: [];
|
|
330
|
+
const mergedDynamicDependencies = [
|
|
331
|
+
...new Set([
|
|
332
|
+
...endpointDynamicDependencies,
|
|
333
|
+
...bodyKeyDynamicDependencies,
|
|
334
|
+
...configKeyDynamicDependencies,
|
|
335
|
+
...triggerKeyDynamicDependencies,
|
|
336
|
+
]),
|
|
337
|
+
];
|
|
338
|
+
const isDynamicPath = endpointDynamicDependencies.length > 0;
|
|
339
|
+
const usesPublisherConfig = Boolean(configurationKeyPath);
|
|
340
|
+
const refetchEveryMs = options?.refetchEveryMs ?? 0;
|
|
341
|
+
const skipIfBodyMissing = options?.skipIfBodyMissing ?? true;
|
|
342
|
+
const autoPostOnBodyMutation = options?.autoPostOnBodyMutation ?? true;
|
|
343
|
+
const pathOptions = {
|
|
344
|
+
skipEmptyPlaceholder: options?.skipEmptyPlaceholder,
|
|
345
|
+
};
|
|
346
|
+
const stateKeyPrefix = `__${method.toLowerCase()}_state_`;
|
|
347
|
+
return function (target, propertyKey) {
|
|
348
|
+
if (!target)
|
|
349
|
+
return;
|
|
350
|
+
setSubscribable(target);
|
|
351
|
+
const stateKey = `${stateKeyPrefix}${propertyKey}`;
|
|
352
|
+
target.__onConnected__((component) => {
|
|
353
|
+
const comp = component;
|
|
354
|
+
let state = comp[stateKey];
|
|
355
|
+
if (!state) {
|
|
356
|
+
state = {
|
|
357
|
+
cleanupWatchers: [],
|
|
358
|
+
requestGeneration: 0,
|
|
359
|
+
configPublisher: null,
|
|
360
|
+
configMutationHandler: null,
|
|
361
|
+
scopeWatchCleanup: null,
|
|
362
|
+
bodyPublisher: null,
|
|
363
|
+
bodyMutationHandler: null,
|
|
364
|
+
triggerPublisher: null,
|
|
365
|
+
triggerInvalidateHandler: null,
|
|
366
|
+
refetchTimeoutId: null,
|
|
367
|
+
refetchEveryMs,
|
|
368
|
+
skipIfBodyMissing,
|
|
369
|
+
autoPostOnBodyMutation,
|
|
370
|
+
};
|
|
371
|
+
comp[stateKey] = state;
|
|
372
|
+
}
|
|
373
|
+
state.cleanupWatchers.forEach((cleanup) => cleanup());
|
|
374
|
+
state.cleanupWatchers = [];
|
|
375
|
+
state.requestGeneration++;
|
|
376
|
+
state.refetchEveryMs = refetchEveryMs;
|
|
377
|
+
state.skipIfBodyMissing = skipIfBodyMissing;
|
|
378
|
+
state.autoPostOnBodyMutation = autoPostOnBodyMutation;
|
|
379
|
+
clearSendRefetch(state);
|
|
380
|
+
const scheduleRefetch = () => {
|
|
381
|
+
clearSendRefetch(state);
|
|
382
|
+
if (!state.refetchEveryMs || state.refetchEveryMs <= 0)
|
|
383
|
+
return;
|
|
384
|
+
state.refetchTimeoutId = setTimeout(() => {
|
|
385
|
+
state.refetchTimeoutId = null;
|
|
386
|
+
runSend();
|
|
387
|
+
}, state.refetchEveryMs);
|
|
388
|
+
};
|
|
389
|
+
const runSend = () => {
|
|
390
|
+
const resolution = isDynamicPath
|
|
391
|
+
? resolveDynamicPath(component, pathTemplate, pathOptions)
|
|
392
|
+
: { ready: true, path: pathTemplate };
|
|
393
|
+
if (!resolution.ready || !resolution.path) {
|
|
394
|
+
comp[propertyKey] = undefined;
|
|
395
|
+
scheduleRefetch();
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
const bodyResolution = resolveDynamicPath(component, bodyKeyPath, pathOptions);
|
|
399
|
+
if (!bodyResolution.ready || !bodyResolution.path) {
|
|
400
|
+
comp[propertyKey] = undefined;
|
|
401
|
+
scheduleRefetch();
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
const bodyPublisher = getPublisherFromPath(bodyResolution.path);
|
|
405
|
+
const body = readBodyFromPublisher(bodyPublisher);
|
|
406
|
+
if (state.skipIfBodyMissing &&
|
|
407
|
+
(body === null || body === undefined)) {
|
|
408
|
+
scheduleRefetch();
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
let config = null;
|
|
412
|
+
if (usesPublisherConfig && configurationKeyPath) {
|
|
413
|
+
const configRes = resolveDynamicPath(component, configurationKeyPath, pathOptions);
|
|
414
|
+
if (!configRes.ready || !configRes.path) {
|
|
415
|
+
comp[propertyKey] = undefined;
|
|
416
|
+
scheduleRefetch();
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
const configPublisher = getPublisherFromPath(configRes.path);
|
|
420
|
+
config = readApiConfigurationFromPublisher(configPublisher);
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
config = resolveScopedConfiguration(component);
|
|
424
|
+
}
|
|
425
|
+
if (!isScopedConfigurationReady(config)) {
|
|
426
|
+
if (!usesPublisherConfig && !state.scopeWatchCleanup) {
|
|
427
|
+
const scopeWatch = watchScopedConfiguration(component, runSend);
|
|
428
|
+
state.scopeWatchCleanup = scopeWatch;
|
|
429
|
+
state.cleanupWatchers.push(() => {
|
|
430
|
+
scopeWatch();
|
|
431
|
+
state.scopeWatchCleanup = null;
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
scheduleRefetch();
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
const generation = ++state.requestGeneration;
|
|
438
|
+
const api = new API(config);
|
|
439
|
+
void callDetailed(api, resolution.path, body).then((payload) => {
|
|
440
|
+
if (generation !== state.requestGeneration)
|
|
441
|
+
return;
|
|
442
|
+
comp[propertyKey] = payload;
|
|
443
|
+
scheduleRefetch();
|
|
444
|
+
});
|
|
445
|
+
};
|
|
446
|
+
const scheduleSend = createAnimationFrameCoalescedRunner(runSend);
|
|
447
|
+
const rebindBodyPublisher = () => {
|
|
448
|
+
detachBodyPublisher(state);
|
|
449
|
+
if (!state.autoPostOnBodyMutation) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
const bodyResolution = resolveDynamicPath(component, bodyKeyPath, pathOptions);
|
|
453
|
+
if (!bodyResolution.ready || !bodyResolution.path) {
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
const publisher = getPublisherFromPath(bodyResolution.path);
|
|
457
|
+
if (!publisher)
|
|
458
|
+
return;
|
|
459
|
+
const mutationHandler = () => scheduleSend();
|
|
460
|
+
publisher.onInternalMutation(mutationHandler);
|
|
461
|
+
state.bodyPublisher = publisher;
|
|
462
|
+
state.bodyMutationHandler = mutationHandler;
|
|
463
|
+
};
|
|
464
|
+
const rebindTriggerPublisher = () => {
|
|
465
|
+
detachTriggerPublisher(state);
|
|
466
|
+
if (!triggerKeyPath)
|
|
467
|
+
return;
|
|
468
|
+
const triggerResolution = resolveDynamicPath(component, triggerKeyPath, pathOptions);
|
|
469
|
+
if (!triggerResolution.ready || !triggerResolution.path) {
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
const publisher = getPublisherFromPath(triggerResolution.path);
|
|
473
|
+
if (!publisher)
|
|
474
|
+
return;
|
|
475
|
+
const invalidateHandler = () => scheduleSend();
|
|
476
|
+
publisher.onInvalidate(invalidateHandler);
|
|
477
|
+
state.triggerPublisher = publisher;
|
|
478
|
+
state.triggerInvalidateHandler = invalidateHandler;
|
|
479
|
+
};
|
|
480
|
+
const rebindPublisherConfig = () => {
|
|
481
|
+
if (!usesPublisherConfig || !configurationKeyPath)
|
|
482
|
+
return;
|
|
483
|
+
detachConfigPublisher(state);
|
|
484
|
+
const configRes = resolveDynamicPath(component, configurationKeyPath, pathOptions);
|
|
485
|
+
if (!configRes.ready || !configRes.path) {
|
|
486
|
+
comp[propertyKey] = undefined;
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
const publisher = getPublisherFromPath(configRes.path);
|
|
490
|
+
if (!publisher) {
|
|
491
|
+
comp[propertyKey] = undefined;
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
const mutationHandler = () => scheduleSend();
|
|
495
|
+
publisher.onInternalMutation(mutationHandler);
|
|
496
|
+
state.configPublisher = publisher;
|
|
497
|
+
state.configMutationHandler = mutationHandler;
|
|
498
|
+
};
|
|
499
|
+
const rebindAll = () => {
|
|
500
|
+
rebindBodyPublisher();
|
|
501
|
+
rebindTriggerPublisher();
|
|
502
|
+
rebindPublisherConfig();
|
|
503
|
+
if (state.autoPostOnBodyMutation) {
|
|
504
|
+
scheduleSend();
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
if (usesPublisherConfig ||
|
|
508
|
+
bodyKeyDynamicDependencies.length ||
|
|
509
|
+
triggerKeyDynamicDependencies.length) {
|
|
510
|
+
for (const dependency of mergedDynamicDependencies) {
|
|
511
|
+
const unsubscribe = observeDynamicProperty(getDynamicWatchKeys.watcherStore, getDynamicWatchKeys.hooked, component, dependency, () => rebindAll());
|
|
512
|
+
state.cleanupWatchers.push(unsubscribe);
|
|
513
|
+
}
|
|
514
|
+
rebindAll();
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
const startScopedSend = () => {
|
|
518
|
+
if (isDynamicPath) {
|
|
519
|
+
for (const dependency of endpointDynamicDependencies) {
|
|
520
|
+
const unsubscribe = observeDynamicProperty(getDynamicWatchKeys.watcherStore, getDynamicWatchKeys.hooked, component, dependency, () => scheduleSend());
|
|
521
|
+
state.cleanupWatchers.push(unsubscribe);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
rebindBodyPublisher();
|
|
525
|
+
rebindTriggerPublisher();
|
|
526
|
+
if (state.autoPostOnBodyMutation) {
|
|
527
|
+
scheduleSend();
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
state.cleanupWatchers.push(scheduleAfterHostReady(component, startScopedSend));
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
target.__onDisconnected__((component) => {
|
|
534
|
+
const comp = component;
|
|
535
|
+
const state = comp[stateKey];
|
|
536
|
+
if (!state)
|
|
537
|
+
return;
|
|
538
|
+
detachConfigPublisher(state);
|
|
539
|
+
detachBodyPublisher(state);
|
|
540
|
+
detachTriggerPublisher(state);
|
|
541
|
+
clearSendRefetch(state);
|
|
542
|
+
state.cleanupWatchers.forEach((cleanup) => cleanup());
|
|
543
|
+
state.cleanupWatchers = [];
|
|
544
|
+
state.requestGeneration++;
|
|
545
|
+
comp[propertyKey] = undefined;
|
|
546
|
+
});
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
export function post(endpoint, bodyKey, configurationKeyOrOptions, maybeOptions) {
|
|
551
|
+
return createApiSendDecorator("POST", (api, path, body) => api.postDetailed(path, body))(endpoint, bodyKey, configurationKeyOrOptions, maybeOptions);
|
|
552
|
+
}
|
|
553
|
+
export function put(endpoint, bodyKey, configurationKeyOrOptions, maybeOptions) {
|
|
554
|
+
return createApiSendDecorator("PUT", (api, path, body) => api.putDetailed(path, body))(endpoint, bodyKey, configurationKeyOrOptions, maybeOptions);
|
|
555
|
+
}
|
|
556
|
+
export function patch(endpoint, bodyKey, configurationKeyOrOptions, maybeOptions) {
|
|
557
|
+
return createApiSendDecorator("PATCH", (api, path, body) => api.patchDetailed(path, body))(endpoint, bodyKey, configurationKeyOrOptions, maybeOptions);
|
|
558
|
+
}
|
|
559
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/core/decorators/api.ts"],"names":[],"mappings":"AAKA,OAAO,IAEN,MAAM,uCAAuC,CAAC;AAC/C,OAAO,GAGN,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAsB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAEL,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,SAAS,gBAAgB,CAAC,SAAkB;IAC1C,IAAI,SAAS,YAAY,WAAW,I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EAAE,CAC3E,GAAG,CAAC,aAAa,CAAO,IAAI,EAAE,IAAS,CAAC,CACzC,CAAC,QAAQ,EAAE,OAAO,EAAE,yBAAyB,EAAE,YAAY,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import HTML from "../utils/HTML";
|
|
2
|
+
/** Event dispatched when a component's connectedCallback has completed. Can be listened to from anywhere (bubbles). */
|
|
3
|
+
export const CONNECTED = "sonic-connected";
|
|
4
|
+
const READY_TIMEOUT_MS = 5000;
|
|
5
|
+
const CONNECTED_SYMBOL = Symbol.for("sonic-connected");
|
|
6
|
+
function isWebComponent(element) {
|
|
7
|
+
return element.tagName.includes("-");
|
|
8
|
+
}
|
|
9
|
+
function waitForAncestorReady(ancestor, timeoutMs = READY_TIMEOUT_MS) {
|
|
10
|
+
if (!isWebComponent(ancestor))
|
|
11
|
+
return Promise.resolve();
|
|
12
|
+
if (ancestor[CONNECTED_SYMBOL])
|
|
13
|
+
return Promise.resolve();
|
|
14
|
+
return new Promise((resolve) => {
|
|
15
|
+
const handler = () => {
|
|
16
|
+
ancestor[CONNECTED_SYMBOL] = true;
|
|
17
|
+
ancestor.removeEventListener(CONNECTED, handler);
|
|
18
|
+
resolve();
|
|
19
|
+
};
|
|
20
|
+
ancestor.addEventListener(CONNECTED, handler);
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
ancestor.removeEventListener(CONNECTED, handler);
|
|
23
|
+
resolve();
|
|
24
|
+
}, timeoutMs);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Décorateur de classe qui retarde le connectedCallback jusqu'à ce que tous les ancêtres
|
|
29
|
+
* correspondant aux sélecteurs CSS fournis aient exécuté leur connectedCallback.
|
|
30
|
+
* Les nœuds qui ne sont pas des web components sont considérés comme connectés par défaut.
|
|
31
|
+
* S'applique uniquement aux web components (classes étendant HTMLElement).
|
|
32
|
+
*/
|
|
33
|
+
export function awaitConnectedAncestors(...selectors) {
|
|
34
|
+
return function (constructor) {
|
|
35
|
+
if (!selectors.length)
|
|
36
|
+
return constructor;
|
|
37
|
+
const originalConnectedCallback = constructor.prototype.connectedCallback;
|
|
38
|
+
constructor.prototype.connectedCallback = function () {
|
|
39
|
+
const ancestors = HTML.getAncestorsBySelectors(this, selectors);
|
|
40
|
+
const webComponentAncestors = ancestors.filter(isWebComponent);
|
|
41
|
+
const whenDefinedPromises = [
|
|
42
|
+
...new Set(webComponentAncestors.map((a) => a.tagName.toLowerCase())),
|
|
43
|
+
].map((tag) => customElements.whenDefined(tag));
|
|
44
|
+
const readyPromises = ancestors.map((a) => waitForAncestorReady(a));
|
|
45
|
+
Promise.all([...whenDefinedPromises, ...readyPromises]).then(() => {
|
|
46
|
+
originalConnectedCallback?.call(this);
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
return constructor;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Décorateur de classe pour les ancêtres qui veulent signaler qu'ils sont prêts.
|
|
54
|
+
* Dispatche l'événement "sonic-connected" à la fin du connectedCallback (bubbles).
|
|
55
|
+
*/
|
|
56
|
+
export function dispatchConnectedEvent() {
|
|
57
|
+
return function (constructor) {
|
|
58
|
+
const original = constructor.prototype.connectedCallback;
|
|
59
|
+
constructor.prototype.connectedCallback = function () {
|
|
60
|
+
original?.call(this);
|
|
61
|
+
this[CONNECTED_SYMBOL] = true;
|
|
62
|
+
this.dispatchEvent(new CustomEvent(CONNECTED, { bubbles: true }));
|
|
63
|
+
};
|
|
64
|
+
return constructor;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../../../src/core/decorators/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,eAAe,CAAC;AAEjC,uHAAuH;AACvH,MAAM,CAAC,M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