@supersoniks/concorde 4.8.0 → 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 +29 -15
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +249 -249
- package/concorde-core.es.js +3692 -3601
- package/dist/concorde-core.bundle.js +249 -249
- package/dist/concorde-core.es.js +3692 -3601
- 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-wyNMyWT9.js → index-BEgZEIbv.js} +401 -401
- package/docs/index.html +1 -1
- 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 +79 -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 +9057 -0
- package/docs/src/tag-list.json +1 -0
- package/docs/src/tsconfig-model.json +23 -0
- package/docs/src/tsconfig.json +1119 -0
- package/gitlab/job_github_mirror.sh +39 -0
- package/index.html +0 -1
- package/package.json +1084 -364
- 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.ts +8 -10
- 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/components/docs-demo-sources.ts +13 -1
- package/src/docs/example/decorators-demo.ts +164 -8
- package/src/docs/search/docs-search.json +62 -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
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
class HTML {
|
|
2
|
+
/**
|
|
3
|
+
* retourne la langue de la page courante telle que défini via l'attribut lang de la balise html
|
|
4
|
+
*/
|
|
5
|
+
static getLanguage() {
|
|
6
|
+
const documentLanguage = document.documentElement.lang;
|
|
7
|
+
const selectedLanguage = localStorage.getItem("SonicSelectedLanguage");
|
|
8
|
+
return selectedLanguage || documentLanguage;
|
|
9
|
+
}
|
|
10
|
+
static getCookies() {
|
|
11
|
+
return document.cookie
|
|
12
|
+
.split(";")
|
|
13
|
+
.reduce((previous, current) => {
|
|
14
|
+
const eqIdx = current.indexOf("=");
|
|
15
|
+
previous[current.substring(0, eqIdx).trim()] = current.substring(eqIdx + 1);
|
|
16
|
+
return previous;
|
|
17
|
+
}, {});
|
|
18
|
+
}
|
|
19
|
+
static everyAncestors(node, callback) {
|
|
20
|
+
while (node) {
|
|
21
|
+
const result = callback(node);
|
|
22
|
+
if (!result)
|
|
23
|
+
return;
|
|
24
|
+
node = (node.parentNode ||
|
|
25
|
+
node.host);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
static getScrollableAncestor(node) {
|
|
29
|
+
//Based on overflow-y: auto, overflow-y: scroll, overflow-y: hidden
|
|
30
|
+
while (node) {
|
|
31
|
+
const htmlNode = node;
|
|
32
|
+
if (htmlNode.nodeType === 1) {
|
|
33
|
+
const style = window.getComputedStyle(htmlNode);
|
|
34
|
+
if (style?.overflowY === "auto" ||
|
|
35
|
+
style?.overflowY === "scroll" ||
|
|
36
|
+
style?.overflowY === "hidden" ||
|
|
37
|
+
style?.overflowX === "auto" ||
|
|
38
|
+
style?.overflowX === "scroll" ||
|
|
39
|
+
style?.overflowX === "hidden") {
|
|
40
|
+
return node;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
node = (node.parentNode ||
|
|
44
|
+
node.host);
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
/** Noms d'attribut DOM à tester (Lit reflect → minuscules, ex. serviceURL → serviceurl). */
|
|
49
|
+
static scopeAttributeNames(attributeName) {
|
|
50
|
+
const lower = attributeName.toLowerCase();
|
|
51
|
+
return lower === attributeName ? [attributeName] : [attributeName, lower];
|
|
52
|
+
}
|
|
53
|
+
static readScopeAttributeOnElement(element, attributeName) {
|
|
54
|
+
for (const attrName of HTML.scopeAttributeNames(attributeName)) {
|
|
55
|
+
if (element.hasAttribute(attrName)) {
|
|
56
|
+
const attr = element.getAttribute(attrName);
|
|
57
|
+
if (attr != null && attr.length > 0) {
|
|
58
|
+
return attr;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Va de parent en parent en partant de node pour trouver un attribut.
|
|
66
|
+
* @param attributeName nom de l'attribut
|
|
67
|
+
* @returns valeur de l'attribut ou null si l'attribut n'est pas trouvé
|
|
68
|
+
*/
|
|
69
|
+
static getAncestorAttributeValue(node, attributeName) {
|
|
70
|
+
if (!node)
|
|
71
|
+
return null;
|
|
72
|
+
let current = node;
|
|
73
|
+
while (current) {
|
|
74
|
+
if (current instanceof HTMLElement) {
|
|
75
|
+
const value = HTML.readScopeAttributeOnElement(current, attributeName);
|
|
76
|
+
if (value != null && value.length > 0) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const parent = current.parentNode || current.host;
|
|
81
|
+
if (!parent)
|
|
82
|
+
break;
|
|
83
|
+
current = parent;
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Petite fonction utilitaire pour retourner la configuration a passer à l'utilitaire API
|
|
89
|
+
* Utilisée pour la configuration du wording / de la traduction ainsi que par le mixin fetcher par exemple
|
|
90
|
+
*/
|
|
91
|
+
static getApiConfiguration(node) {
|
|
92
|
+
const token = HTML.getAncestorAttributeValue(node, "token");
|
|
93
|
+
const addHTTPResponse = HTML.getAncestorAttributeValue(node, "addHTTPResponse") != null;
|
|
94
|
+
const serviceURL = HTML.getAncestorAttributeValue(node, "serviceURL");
|
|
95
|
+
let userName = null;
|
|
96
|
+
let password = null;
|
|
97
|
+
const tokenProvider = HTML.getAncestorAttributeValue(node, "tokenProvider");
|
|
98
|
+
const authToken = HTML.getAncestorAttributeValue(node, "eventsApiToken");
|
|
99
|
+
if (!token) {
|
|
100
|
+
userName = HTML.getAncestorAttributeValue(node, "userName");
|
|
101
|
+
password = HTML.getAncestorAttributeValue(node, "password");
|
|
102
|
+
}
|
|
103
|
+
const credentials = HTML.getAncestorAttributeValue(node, "credentials") || undefined;
|
|
104
|
+
const cache = node.getAttribute("cache");
|
|
105
|
+
const blockUntilDone = node.hasAttribute("blockUntilDone");
|
|
106
|
+
const keepAlive = node.hasAttribute("keepAlive");
|
|
107
|
+
return {
|
|
108
|
+
serviceURL,
|
|
109
|
+
token,
|
|
110
|
+
userName,
|
|
111
|
+
password,
|
|
112
|
+
authToken,
|
|
113
|
+
tokenProvider,
|
|
114
|
+
addHTTPResponse,
|
|
115
|
+
credentials,
|
|
116
|
+
cache,
|
|
117
|
+
blockUntilDone,
|
|
118
|
+
keepAlive,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Va de parent en parent en partant de node pour trouver un attribut
|
|
123
|
+
* @param attributeName nom de l'attribut
|
|
124
|
+
* @returns valeur de l'attribut ou null si l'attribut n'est pas trouvé
|
|
125
|
+
*/
|
|
126
|
+
static getClosestElement(node, selector) {
|
|
127
|
+
while (!(node.nodeName && node.nodeName.toLowerCase() === selector)) {
|
|
128
|
+
const newNode = node.parentNode || node.host;
|
|
129
|
+
if (!newNode)
|
|
130
|
+
break;
|
|
131
|
+
node = (node.parentNode ||
|
|
132
|
+
node.host);
|
|
133
|
+
}
|
|
134
|
+
if (!node.nodeName) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
return node;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Va de parent en parent en partant de node pour trouver un attribut
|
|
141
|
+
* @param attributeName nom de l'attribut
|
|
142
|
+
* @returns valeur de l'attribut ou null si l'attribut n'est pas trouvé
|
|
143
|
+
*/
|
|
144
|
+
static getClosestForm(node) {
|
|
145
|
+
return HTML.getClosestElement(node, "form");
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Parcourt les ancêtres (parentNode / shadow host) et collecte ceux dont le tagName
|
|
149
|
+
* correspond à l'un des noms fournis (comparaison insensible à la casse).
|
|
150
|
+
* @param node Élément de départ
|
|
151
|
+
* @param tagNames Noms de balises à rechercher (ex: ['sonic-subscriber', 'sonic-sdui'])
|
|
152
|
+
* @returns Tableau des ancêtres correspondants
|
|
153
|
+
*/
|
|
154
|
+
static getAncestorsByTagNames(node, tagNames) {
|
|
155
|
+
const normalized = new Set(tagNames.map((t) => t.toLowerCase()));
|
|
156
|
+
const result = [];
|
|
157
|
+
let current = (node.parentNode ||
|
|
158
|
+
node.host);
|
|
159
|
+
while (current) {
|
|
160
|
+
if (current instanceof Element &&
|
|
161
|
+
normalized.has(current.tagName.toLowerCase())) {
|
|
162
|
+
result.push(current);
|
|
163
|
+
}
|
|
164
|
+
current = (current.parentNode ||
|
|
165
|
+
current.host);
|
|
166
|
+
}
|
|
167
|
+
return result;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Parcourt les ancêtres (parentNode / shadow host) et collecte ceux qui matchent
|
|
171
|
+
* l'un des sélecteurs CSS fournis (element.matches(selector)).
|
|
172
|
+
* @param node Élément de départ
|
|
173
|
+
* @param selectors Sélecteurs CSS (ex: ['sonic-subscriber', 'sonic-sdui', 'div.container'])
|
|
174
|
+
* @returns Tableau des ancêtres correspondants
|
|
175
|
+
*/
|
|
176
|
+
static getAncestorsBySelectors(node, selectors) {
|
|
177
|
+
const result = [];
|
|
178
|
+
let current = (node.parentNode ||
|
|
179
|
+
node.host);
|
|
180
|
+
while (current) {
|
|
181
|
+
if (current instanceof Element) {
|
|
182
|
+
for (const selector of selectors) {
|
|
183
|
+
try {
|
|
184
|
+
if (current.matches(selector)) {
|
|
185
|
+
result.push(current);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
// Invalid selector, skip
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
current = (current.parentNode ||
|
|
195
|
+
current.host);
|
|
196
|
+
}
|
|
197
|
+
return result;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Lance le chargement d'un js et retourne une promise qui resoud à true lorsque le chargement à réussi et à false, sinon.
|
|
201
|
+
* */
|
|
202
|
+
static async loadJS(src) {
|
|
203
|
+
const p = new Promise(async (resolve) => {
|
|
204
|
+
const script = document.createElement("script");
|
|
205
|
+
script.src = src;
|
|
206
|
+
script.onload = () => resolve(true);
|
|
207
|
+
script.onerror = () => resolve(true);
|
|
208
|
+
document.head.appendChild(script);
|
|
209
|
+
});
|
|
210
|
+
return p;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Lance le chargement d'un css et retourne une promise qui resoud à true lorsque le chargement à réussi et à false, sinon.
|
|
214
|
+
* */
|
|
215
|
+
static async loadCSS(src) {
|
|
216
|
+
const p = new Promise(async (resolve) => {
|
|
217
|
+
const cssnode = document.createElement("link");
|
|
218
|
+
cssnode.type = "text/css";
|
|
219
|
+
cssnode.rel = "stylesheet";
|
|
220
|
+
cssnode.href = src;
|
|
221
|
+
cssnode.onload = () => resolve(true);
|
|
222
|
+
cssnode.onerror = () => resolve(true);
|
|
223
|
+
document.head.appendChild(cssnode);
|
|
224
|
+
});
|
|
225
|
+
return p;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
export default HTML;
|
|
229
|
+
export const detecHTMLLanguageChange = (handler) => {
|
|
230
|
+
// Select the <html> element
|
|
231
|
+
const htmlElement = document.documentElement;
|
|
232
|
+
// Create a new MutationObserver instance
|
|
233
|
+
const observer = new MutationObserver((mutationsList) => {
|
|
234
|
+
for (let mutation of mutationsList) {
|
|
235
|
+
if (mutation.type === "attributes" && mutation.attributeName === "lang") {
|
|
236
|
+
handler();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
// Observer configuration: watch for changes to attributes
|
|
241
|
+
const config = {
|
|
242
|
+
attributes: true, // Watch for attribute changes
|
|
243
|
+
attributeFilter: ["lang"], // Only watch for changes to the lang attribute
|
|
244
|
+
};
|
|
245
|
+
// Start observing the <html> element for changes
|
|
246
|
+
observer.observe(htmlElement, config);
|
|
247
|
+
};
|
|
248
|
+
//# sourceMappingURL=HTML.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HTML.js","sourceRoot":"","sources":["../../../../src/core/utils/HTML.ts"],"names":[],"mappings":"AAKA,MAAM,IAAI;IACR;;OAEG;IACH,MAAM,CAAC,WAAW;QAChB,MAAM,gBAAgB,GAAG,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC;QACvD,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;QACvE,OAAO,gBAAgB,IAAK,gBAA2B,CAAC;IAC1D,CAAC;IACD,MAAM,CAAC,UAAU;QACf,OAAO,QAAQ,CAAC,MAAM;aACnB,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,CAAC,QAAgC,EAAE,OAAO,EAAE,EAAE;YACpD,MAAM,KAAK,GAAG,OA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e,EAAE,CAAC,MAAM,CAAC,EAAE,+CAA+C;KAC3E,CAAC;IAEF,iDAAiD;IACjD,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACxC,CAAC,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gestionnaire d'écoute des modifications sur l'url courante.
|
|
3
|
+
* On peut s'y abonner via la methode statique onChange()
|
|
4
|
+
* Utilisé par sonic-bouton pour lm'affichage de l'état actif et par le router.
|
|
5
|
+
*/
|
|
6
|
+
class LocationHandler {
|
|
7
|
+
static listen() {
|
|
8
|
+
if (!LocationHandler.listening) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const newURL = document.location?.href.replace(document.location.origin, "");
|
|
12
|
+
if (LocationHandler.prevURL && LocationHandler.prevURL != newURL) {
|
|
13
|
+
LocationHandler.prevURL = newURL;
|
|
14
|
+
LocationHandler.listeners.forEach((listener) => {
|
|
15
|
+
listener.location = newURL;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
window.requestAnimationFrame(LocationHandler.listen);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Arrête l'écoute des changements de location pour le listener fournit
|
|
22
|
+
*/
|
|
23
|
+
static offChange(listener) {
|
|
24
|
+
const idx = LocationHandler.listeners.indexOf(listener);
|
|
25
|
+
if (idx == -1)
|
|
26
|
+
return;
|
|
27
|
+
LocationHandler.listeners.splice(idx, 1);
|
|
28
|
+
if (LocationHandler.listeners.length == 0)
|
|
29
|
+
LocationHandler.listening = false;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Ecoute les changements de location et l'assigne à la propriété location de chaque listener
|
|
33
|
+
*/
|
|
34
|
+
static onChange(listener) {
|
|
35
|
+
if (!LocationHandler.listening) {
|
|
36
|
+
LocationHandler.listening = true;
|
|
37
|
+
LocationHandler.listen();
|
|
38
|
+
}
|
|
39
|
+
LocationHandler.listeners.push(listener);
|
|
40
|
+
listener.location = this.prevURL;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @param component HTMLElement
|
|
45
|
+
* Recupère la proprité to ou href de l'élément et lance la navigation
|
|
46
|
+
* Si l'attribut pushState est présent la naviguation se fait via un pushState
|
|
47
|
+
* Si l'attribut replaceState est présent la naviguation se fait via un replaceState
|
|
48
|
+
* Voir link et button pour les exemples d'implémentation
|
|
49
|
+
**/
|
|
50
|
+
static changeFromComponent(component) {
|
|
51
|
+
const goBack = component.goBack;
|
|
52
|
+
const referrer = document.referrer;
|
|
53
|
+
if (goBack !== null && goBack !== undefined) {
|
|
54
|
+
const origin = document.location.origin;
|
|
55
|
+
const urlDest = (goBack || origin).toString();
|
|
56
|
+
const isHTTP = referrer.indexOf("http") == 0;
|
|
57
|
+
const isNotSameOrigin = isHTTP
|
|
58
|
+
? new URL(referrer).origin != origin
|
|
59
|
+
: false;
|
|
60
|
+
const isReferrerEmpty = referrer == "";
|
|
61
|
+
const isFirstPage = history.length < 3; // imparfait mais variabsle selon les situations
|
|
62
|
+
const isFallbackNoReferer = isReferrerEmpty && isFirstPage; // fallback pour ff qui a parfois un referer nulle ex : drupal 9
|
|
63
|
+
const isNotSameURL = urlDest != document.location.href;
|
|
64
|
+
const goToURLDest = (isNotSameOrigin && isNotSameURL) || isFallbackNoReferer;
|
|
65
|
+
if (goToURLDest) {
|
|
66
|
+
const state = history.state || {};
|
|
67
|
+
state.concorde = state.concorde || {};
|
|
68
|
+
state.concorde.hasDoneHistoryBack = true;
|
|
69
|
+
history.pushState(state, document.title);
|
|
70
|
+
history.back();
|
|
71
|
+
document.location.replace(urlDest);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
history.back();
|
|
75
|
+
}
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
let to = component.getAttribute("to") || "";
|
|
79
|
+
if (!to)
|
|
80
|
+
to = component.href?.toString() || "";
|
|
81
|
+
if (!to)
|
|
82
|
+
return;
|
|
83
|
+
if (to.indexOf("#") == 0) {
|
|
84
|
+
document.location.hash = to.substring(1);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const url = new URL(to, document.location.href);
|
|
88
|
+
const split = url.pathname.split("/");
|
|
89
|
+
const newPathName = [];
|
|
90
|
+
let prevSp = "";
|
|
91
|
+
for (const sp of split) {
|
|
92
|
+
if (sp != prevSp)
|
|
93
|
+
newPathName.push(sp);
|
|
94
|
+
prevSp = sp;
|
|
95
|
+
}
|
|
96
|
+
to = "/" + newPathName.join("/") + url.search + (url.hash ? +url.hash : "");
|
|
97
|
+
if (component.hasAttribute("pushState")) {
|
|
98
|
+
history.pushState(null, "", to);
|
|
99
|
+
}
|
|
100
|
+
else if (component.hasAttribute("replaceState")) {
|
|
101
|
+
history.replaceState(null, "", to);
|
|
102
|
+
}
|
|
103
|
+
else
|
|
104
|
+
document.location.href = to;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @param component ActivableLink
|
|
109
|
+
* Ajoute l'attribut "active" à l'élément si l'url correspond à la location en donction du mode d'activation
|
|
110
|
+
*/
|
|
111
|
+
static updateComponentActiveState(component) {
|
|
112
|
+
if (component.autoActive == "disabled") {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const href = component.href?.toString() || "";
|
|
116
|
+
if (component.href && href.indexOf("http") != 0) {
|
|
117
|
+
const url1 = new URL(href, document.location.href);
|
|
118
|
+
const url2 = new URL(component.location || "", document.location.origin);
|
|
119
|
+
let isActive = false;
|
|
120
|
+
if (component.autoActive == "strict") {
|
|
121
|
+
isActive =
|
|
122
|
+
url1.pathname == url2.pathname &&
|
|
123
|
+
url1.hash == url2.hash &&
|
|
124
|
+
url1.search == url2.search;
|
|
125
|
+
}
|
|
126
|
+
else if (component.autoActive == "strict-path-only") {
|
|
127
|
+
isActive = url1.pathname == url2.pathname && url1.hash == url2.hash;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
isActive = url2.href.indexOf(url1.href) == 0;
|
|
131
|
+
}
|
|
132
|
+
if (isActive)
|
|
133
|
+
component.setAttribute("active", "true");
|
|
134
|
+
else
|
|
135
|
+
component.removeAttribute("active");
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
LocationHandler.listeners = [];
|
|
140
|
+
LocationHandler.listening = false;
|
|
141
|
+
LocationHandler.prevURL = document.location?.href.replace(document.location.origin, "");
|
|
142
|
+
export default LocationHandler;
|
|
143
|
+
//# sourceMappingURL=LocationHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationHandler.js","sourceRoot":"","sources":["../../../../src/core/utils/LocationHandler.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,MAAqB,eAAe;IAOlC,MAAM,CAAC,MAAM;QACX,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;YAC/B,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAC5C,QAAQ,CAAC,QAAQ,CAAC,MAAM,EACxB,EAAE,CACH,CAAC;QACF,IAAI,eAAe,CAAC,OAAO,IAAI,eAAe,CAAC,OAAO,IAAI,MAAM,EAAE,CAAC;YACjE,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC;YACjC,eAAe,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC7C,QAAQ,CAAC,QAAQ,GAAG,MAAM,CAAC;YAC7B,CAAC,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,qBAAqB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,QAAkB;QACjC,MAAM,GAAG,GAAG,eAAe,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACxD,IAAI,GAAG,IAAI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disable @typescript-eslint/no-explicit-any*/
|
|
6
|
+
static shallowEqual(object1, object2, useStrictComparaison = true) {
|
|
7
|
+
const keys1 = Object.keys(object1);
|
|
8
|
+
const keys2 = Object.keys(object2);
|
|
9
|
+
if (keys1.length !== keys2.length && useStrictComparaison) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
for (const key of keys1) {
|
|
13
|
+
const val1 = object1[key];
|
|
14
|
+
const val2 = object2[key];
|
|
15
|
+
const areEqual = useStrictComparaison ? val1 !== val2 : val1 != val2;
|
|
16
|
+
if (areEqual) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
/*eslint-enable @typescript-eslint/no-explicit-any*/
|
|
23
|
+
/**
|
|
24
|
+
* Effectue une comparaison d'égalité profonde entre deux objets.
|
|
25
|
+
*/
|
|
26
|
+
/*eslint-disable @typescript-eslint/no-explicit-any*/
|
|
27
|
+
static deepEqual(object1, object2, useStrictComparaison = true) {
|
|
28
|
+
const keys1 = Object.keys(object1);
|
|
29
|
+
const keys2 = Object.keys(object2);
|
|
30
|
+
if (keys1.length !== keys2.length && useStrictComparaison) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
for (const key of keys1) {
|
|
34
|
+
const val1 = object1[key];
|
|
35
|
+
const val2 = object2[key];
|
|
36
|
+
const areObjects = Objects.isObject(val1) && Objects.isObject(val2);
|
|
37
|
+
const areEqual = useStrictComparaison ? val1 !== val2 : val1 != val2;
|
|
38
|
+
if ((areObjects && !Objects.deepEqual(val1, val2)) ||
|
|
39
|
+
(!areObjects && areEqual)) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
/*eslint-enable @typescript-eslint/no-explicit-any*/
|
|
46
|
+
/**
|
|
47
|
+
* @returns true si l'objet est un objet ou un tableau (qui est un objet). mais false si null (car sinon typeof null "object")
|
|
48
|
+
*/
|
|
49
|
+
static isObject(object) {
|
|
50
|
+
return object != null && typeof object === "object";
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @returns true si l'argument est null ou undefined
|
|
54
|
+
*/
|
|
55
|
+
static isUndefindOrNull(object) {
|
|
56
|
+
return object === null || object === undefined;
|
|
57
|
+
}
|
|
58
|
+
static isEmpty(object) {
|
|
59
|
+
if (Objects.isUndefindOrNull(object))
|
|
60
|
+
return true;
|
|
61
|
+
return Object.keys(object).length === 0;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* traverse l'objet pour obtenir la valeur a l'adresse donnée via le tableau de clés pathArray.
|
|
65
|
+
* Si extendValues = true, les propriétés des objets parents sont copiées au fur et a mesure de la descente dans la hierarchie, avant l'assignation des propriétés de l'objet lui même.
|
|
66
|
+
*/
|
|
67
|
+
/*eslint-disable @typescript-eslint/no-explicit-any*/
|
|
68
|
+
static traverse(obj, pathArray, extendValues = false) {
|
|
69
|
+
for (const key of pathArray) {
|
|
70
|
+
const newObj = obj[key];
|
|
71
|
+
if (newObj === undefined) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
if (extendValues && Objects.isObject(newObj)) {
|
|
75
|
+
obj = Object.assign(Array.isArray(newObj) ? [] : {}, obj, newObj);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
obj = obj[key];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return obj;
|
|
82
|
+
}
|
|
83
|
+
static traverseDotNotation(obj, path, extendValues = false) {
|
|
84
|
+
return Objects.traverse(obj, path.split("."), extendValues);
|
|
85
|
+
}
|
|
86
|
+
/*eslint-enable @typescript-eslint/no-explicit-any*/
|
|
87
|
+
static getURLSearchArray(sourceObject, prefix = "") {
|
|
88
|
+
let arr = [];
|
|
89
|
+
for (let key in sourceObject) {
|
|
90
|
+
const value = sourceObject[key];
|
|
91
|
+
if (prefix)
|
|
92
|
+
key = prefix + "[" + key + "]";
|
|
93
|
+
if (Objects.isObject(value)) {
|
|
94
|
+
arr = [
|
|
95
|
+
...arr,
|
|
96
|
+
...this.getURLSearchArray(value, key),
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
arr.push(`${key}=${value}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return arr;
|
|
104
|
+
}
|
|
105
|
+
static getURLSearchString(sourceObject) {
|
|
106
|
+
return Objects.getURLSearchArray(sourceObject, "").join("&");
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export default Objects;
|
|
110
|
+
export const traverseDotNotation = Objects.traverseDotNotation;
|
|
111
|
+
//# sourceMappingURL=Objects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Objects.js","sourceRoot":"","sources":["../../../../src/core/utils/Objects.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO;IACX;;OAEG;IAEH,qDAAqD;IACrD,MAAM,CAAC,YAAY,CAAC,OAAY,EAAE,OAAY,EAAE,oBAAoB,GAAG,IAAI;QACzE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,oBAAoB,EAAE,CAAC;YAC1D,OAAO,KAAK,CAAC;QACf,CAAC;QACD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;YACxB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YAC1B,MAAM,QAAQ,GAAG,oBAAoB,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC;YACrE,IAAI,QAAQ,EAAE,CAAC;gBACb,OA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