@supersoniks/concorde 2.0.7 → 3.0.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/build-infos.json +1 -0
- package/index.html +44 -0
- package/notes de migration.md +21 -0
- package/package.json +23 -290
- package/scripts/prebuild.mjs +22 -0
- package/{components.js → src/components.ts} +5 -2
- package/src/concorde-loaded.ts +3 -0
- package/src/core/_types/types.ts +55 -0
- package/src/core/components/functional/date/date.md +290 -0
- package/src/core/components/functional/date/date.ts +206 -0
- package/src/core/components/functional/example/example.ts +11 -0
- package/src/core/components/functional/fetch/fetch.md +117 -0
- package/{core/components/functional/fetch/fetch.js → src/core/components/functional/fetch/fetch.ts} +33 -37
- package/src/core/components/functional/if/if.md +16 -0
- package/src/core/components/functional/if/if.test.ts +40 -0
- package/src/core/components/functional/if/if.ts +23 -0
- package/src/core/components/functional/list/list.md +194 -0
- package/src/core/components/functional/list/list.ts +236 -0
- package/src/core/components/functional/mix/mix.md +41 -0
- package/src/core/components/functional/mix/mix.ts +95 -0
- package/src/core/components/functional/queue/queue.md +87 -0
- package/src/core/components/functional/queue/queue.ts +279 -0
- package/src/core/components/functional/router/redirect.ts +44 -0
- package/src/core/components/functional/router/router.md +112 -0
- package/src/core/components/functional/router/router.ts +108 -0
- package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +229 -0
- package/{core → src/core}/components/functional/sdui/default-library.json +13 -13
- package/src/core/components/functional/sdui/example.json +99 -0
- package/src/core/components/functional/sdui/sdui-utils.ts +62 -0
- package/src/core/components/functional/sdui/sdui.md +356 -0
- package/src/core/components/functional/sdui/sdui.ts +230 -0
- package/src/core/components/functional/sdui/types.ts +34 -0
- package/src/core/components/functional/sonic-scope/sonic-scope.ts +13 -0
- package/src/core/components/functional/states/states.md +87 -0
- package/src/core/components/functional/states/states.ts +121 -0
- package/src/core/components/functional/submit/submit.md +48 -0
- package/src/core/components/functional/submit/submit.ts +265 -0
- package/src/core/components/functional/subscriber/subscriber.md +91 -0
- package/src/core/components/functional/subscriber/subscriber.ts +28 -0
- package/src/core/components/functional/value/value.md +35 -0
- package/src/core/components/functional/value/value.ts +18 -0
- package/{core/components/ui/_css/scroll.js → src/core/components/ui/_css/scroll.ts} +3 -2
- package/{core/components/ui/_css/size.js → src/core/components/ui/_css/size.ts} +5 -2
- package/{core/components/ui/_css/type.js → src/core/components/ui/_css/type.ts} +5 -3
- package/src/core/components/ui/alert/alert.md +121 -0
- package/src/core/components/ui/alert/alert.ts +177 -0
- package/src/core/components/ui/badge/badge.md +102 -0
- package/{core/components/ui/badge/badge.js → src/core/components/ui/badge/badge.ts} +36 -51
- package/src/core/components/ui/button/button.md +184 -0
- package/{core/components/ui/button/button.js → src/core/components/ui/button/button.ts} +258 -302
- package/src/core/components/ui/captcha/captcha.md +12 -0
- package/src/core/components/ui/captcha/captcha.ts +88 -0
- package/src/core/components/ui/card/card-footer.ts +19 -0
- package/src/core/components/ui/card/card-header-descripton.ts +24 -0
- package/{core/components/ui/card/card-header.js → src/core/components/ui/card/card-header.ts} +28 -38
- package/src/core/components/ui/card/card-main.ts +24 -0
- package/src/core/components/ui/card/card.md +96 -0
- package/{core/components/ui/card/card.js → src/core/components/ui/card/card.ts} +23 -34
- package/src/core/components/ui/divider/divider.md +35 -0
- package/{core/components/ui/divider/divider.js → src/core/components/ui/divider/divider.ts} +35 -65
- package/src/core/components/ui/form/checkbox/checkbox.md +96 -0
- package/{core/components/ui/form/checkbox/checkbox.js → src/core/components/ui/form/checkbox/checkbox.ts} +79 -98
- package/{core/components/ui/form/css/form-control.js → src/core/components/ui/form/css/form-control.ts} +9 -5
- package/src/core/components/ui/form/fieldset/fieldset.md +129 -0
- package/src/core/components/ui/form/fieldset/fieldset.ts +96 -0
- package/src/core/components/ui/form/fieldset/legend-description.ts +23 -0
- package/src/core/components/ui/form/fieldset/legend.ts +90 -0
- package/src/core/components/ui/form/form-actions/form-actions.md +77 -0
- package/src/core/components/ui/form/form-actions/form-actions.ts +32 -0
- package/src/core/components/ui/form/form-layout/form-layout.md +43 -0
- package/src/core/components/ui/form/form-layout/form-layout.ts +71 -0
- package/src/core/components/ui/form/input/input.md +168 -0
- package/src/core/components/ui/form/input/input.ts +227 -0
- package/src/core/components/ui/form/input/password-helper.ts +68 -0
- package/src/core/components/ui/form/input/same-value-helper.ts +48 -0
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +130 -0
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +285 -0
- package/src/core/components/ui/form/radio/radio.md +86 -0
- package/src/core/components/ui/form/radio/radio.ts +44 -0
- package/src/core/components/ui/form/select/select.md +99 -0
- package/src/core/components/ui/form/select/select.ts +310 -0
- package/src/core/components/ui/form/textarea/textarea.md +66 -0
- package/src/core/components/ui/form/textarea/textarea.ts +119 -0
- package/src/core/components/ui/group/group.md +75 -0
- package/src/core/components/ui/group/group.ts +101 -0
- package/src/core/components/ui/icon/icon.md +125 -0
- package/src/core/components/ui/icon/icon.stories.ts +100 -0
- package/src/core/components/ui/icon/icon.ts +106 -0
- package/src/core/components/ui/icon/icons.json +1 -0
- package/src/core/components/ui/icon/icons.ts +130 -0
- package/src/core/components/ui/icon/svgs/cancel.svg +3 -0
- package/src/core/components/ui/icon/svgs/check-circled-outline.svg +4 -0
- package/src/core/components/ui/icon/svgs/check.svg +3 -0
- package/src/core/components/ui/icon/svgs/emoji-puzzled.svg +1 -0
- package/src/core/components/ui/icon/svgs/info-empty.svg +5 -0
- package/src/core/components/ui/icon/svgs/loader.svg +1 -0
- package/src/core/components/ui/icon/svgs/minus-small.svg +3 -0
- package/src/core/components/ui/icon/svgs/more-horiz.svg +5 -0
- package/src/core/components/ui/icon/svgs/more-vert.svg +5 -0
- package/src/core/components/ui/icon/svgs/nav-arrow-down.svg +3 -0
- package/src/core/components/ui/icon/svgs/warning-circled-outline.svg +5 -0
- package/src/core/components/ui/image/image.md +107 -0
- package/src/core/components/ui/image/image.ts +117 -0
- package/src/core/components/ui/link/link.md +43 -0
- package/src/core/components/ui/link/link.ts +108 -0
- package/src/core/components/ui/loader/loader.md +37 -0
- package/src/core/components/ui/loader/loader.stories.ts +25 -0
- package/src/core/components/ui/loader/loader.ts +81 -0
- package/{core/components/ui/loader/styles/fixed.js → src/core/components/ui/loader/styles/fixed.ts} +2 -1
- package/{core/components/ui/loader/styles/inline.js → src/core/components/ui/loader/styles/inline.ts} +3 -2
- package/src/core/components/ui/menu/menu-item.ts +30 -0
- package/src/core/components/ui/menu/menu.md +288 -0
- package/src/core/components/ui/menu/menu.ts +292 -0
- package/src/core/components/ui/modal/modal-actions.ts +35 -0
- package/src/core/components/ui/modal/modal-close.ts +36 -0
- package/src/core/components/ui/modal/modal-content.ts +19 -0
- package/src/core/components/ui/modal/modal-subtitle.ts +23 -0
- package/src/core/components/ui/modal/modal-title.ts +22 -0
- package/src/core/components/ui/modal/modal.md +123 -0
- package/src/core/components/ui/modal/modal.stories.ts +140 -0
- package/src/core/components/ui/modal/modal.ts +386 -0
- package/src/core/components/ui/pop/pop.md +79 -0
- package/src/core/components/ui/pop/pop.ts +291 -0
- package/src/core/components/ui/progress/progress.md +65 -0
- package/{core/components/ui/progress/progress.js → src/core/components/ui/progress/progress.ts} +31 -50
- package/src/core/components/ui/table/table-caption.ts +21 -0
- package/src/core/components/ui/table/table-tbody.ts +32 -0
- package/src/core/components/ui/table/table-td.ts +47 -0
- package/src/core/components/ui/table/table-tfoot.ts +20 -0
- package/src/core/components/ui/table/table-th.ts +56 -0
- package/src/core/components/ui/table/table-thead.ts +18 -0
- package/src/core/components/ui/table/table-tr.ts +48 -0
- package/src/core/components/ui/table/table.md +467 -0
- package/{core/components/ui/table/table.js → src/core/components/ui/table/table.ts} +32 -53
- package/{core/components/ui/theme/theme-collection/core-variables.js → src/core/components/ui/theme/theme-collection/core-variables.ts} +3 -2
- package/{core/components/ui/theme/theme-collection/dark.js → src/core/components/ui/theme/theme-collection/dark.ts} +5 -3
- package/{core/components/ui/theme/theme-collection/light.js → src/core/components/ui/theme/theme-collection/light.ts} +3 -2
- package/src/core/components/ui/theme/theme.ts +118 -0
- package/src/core/components/ui/toast/message-subscriber.stories.ts +43 -0
- package/src/core/components/ui/toast/message-subscriber.ts +37 -0
- package/{core/components/ui/toast/toast-item.js → src/core/components/ui/toast/toast-item.ts} +86 -113
- package/src/core/components/ui/toast/toast.ts +237 -0
- package/src/core/components/ui/toast/types.ts +14 -0
- package/src/core/components/ui/tooltip/tooltip.md +37 -0
- package/{core/components/ui/tooltip/tooltip.js → src/core/components/ui/tooltip/tooltip.ts} +26 -47
- package/{core/components/ui/ui.js → src/core/components/ui/ui.ts} +2 -0
- package/src/core/core.ts +22 -0
- package/src/core/decorators/Subscriber.ts +187 -0
- package/src/core/directives/DataProvider.ts +113 -0
- package/src/core/directives/Wording.ts +220 -0
- package/src/core/mixins/Fetcher.ts +258 -0
- package/src/core/mixins/FormCheckable.ts +287 -0
- package/src/core/mixins/FormElement.ts +275 -0
- package/src/core/mixins/FormInput.ts +135 -0
- package/src/core/mixins/Subscriber.ts +352 -0
- package/src/core/mixins/TemplatesContainer.ts +70 -0
- package/{core/mixins/mixins.d.ts → src/core/mixins/mixins.ts} +1 -1
- package/src/core/utils/Arrays.ts +161 -0
- package/src/core/utils/DataBindObserver.ts +286 -0
- package/src/core/utils/Electron.ts +15 -0
- package/src/core/utils/Format.ts +58 -0
- package/src/core/utils/HTML.ts +126 -0
- package/src/core/utils/LocationHandler.ts +139 -0
- package/src/core/utils/Objects.ts +103 -0
- package/src/core/utils/PublisherProxy.ts +786 -0
- package/src/core/utils/Utils.ts +12 -0
- package/src/core/utils/api.ts +456 -0
- package/{core/utils/url-pattern.d.ts → src/core/utils/url-pattern.ts} +1 -0
- package/{decorators.js → src/decorators.ts} +6 -2
- package/{directives.js → src/directives.ts} +11 -6
- package/src/docs/_core-concept/overview.md +57 -0
- package/src/docs/_core-concept/subscriber.md +76 -0
- package/src/docs/_getting-started/concorde-outside.md +141 -0
- package/src/docs/_getting-started/create-a-component.md +137 -0
- package/src/docs/_getting-started/pubsub.md +150 -0
- package/src/docs/_getting-started/start.md +37 -0
- package/src/docs/_getting-started/theming.md +91 -0
- package/src/docs/code.ts +281 -0
- package/src/docs/docs.ts +6 -0
- package/src/docs/example/users.ts +64 -0
- package/src/docs/navigation/navigation.ts +101 -0
- package/src/docs/prism/index.ts +6 -0
- package/src/docs/prism/prism.css +158 -0
- package/src/docs/prism/prism.js +1022 -0
- package/src/docs/search/docs-search.json +3767 -0
- package/src/docs/search/markdown-renderer.ts +40 -0
- package/src/docs/search/page.ts +40 -0
- package/src/docs/search/search.ts +184 -0
- package/src/docs.ts +2 -0
- package/src/index.ts +7 -0
- package/{mixins.js → src/mixins.ts} +10 -6
- package/src/tag-list.json +1 -0
- package/src/test-utils/TestUtils.ts +13 -0
- package/src/tsconfig.json +113 -0
- package/{utils.js → src/utils.ts} +15 -11
- package/test-utils/TestUtils.ts +13 -0
- package/vite/config.js +136 -0
- package/vite.config.mts +87 -0
- package/README.md +0 -27
- package/cli.js +0 -75
- package/components.d.ts +0 -4
- package/concorde-core.bundle.js +0 -3427
- package/concorde-core.es.js +0 -14372
- package/core/_types/types.d.ts +0 -28
- package/core/_types/types.js +0 -2
- package/core/components/functional/date/date.d.ts +0 -45
- package/core/components/functional/date/date.js +0 -243
- package/core/components/functional/example/example.d.ts +0 -7
- package/core/components/functional/example/example.js +0 -26
- package/core/components/functional/fetch/fetch.d.ts +0 -93
- package/core/components/functional/functional.js +0 -15
- package/core/components/functional/if/if.d.ts +0 -12
- package/core/components/functional/if/if.js +0 -38
- package/core/components/functional/if/if.test.d.ts +0 -1
- package/core/components/functional/if/if.test.js +0 -35
- package/core/components/functional/list/list.d.ts +0 -117
- package/core/components/functional/list/list.js +0 -214
- package/core/components/functional/mix/mix.d.ts +0 -22
- package/core/components/functional/mix/mix.js +0 -102
- package/core/components/functional/queue/queue.d.ts +0 -67
- package/core/components/functional/queue/queue.js +0 -310
- package/core/components/functional/router/redirect.d.ts +0 -18
- package/core/components/functional/router/redirect.js +0 -53
- package/core/components/functional/router/router.d.ts +0 -27
- package/core/components/functional/router/router.js +0 -119
- package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -58
- package/core/components/functional/sdui/SDUIDescriptorTransformer.js +0 -215
- package/core/components/functional/sdui/sdui-utils.d.ts +0 -5
- package/core/components/functional/sdui/sdui-utils.js +0 -63
- package/core/components/functional/sdui/sdui.d.ts +0 -136
- package/core/components/functional/sdui/sdui.js +0 -254
- package/core/components/functional/sdui/types.d.ts +0 -37
- package/core/components/functional/sdui/types.js +0 -1
- package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -5
- package/core/components/functional/sonic-scope/sonic-scope.js +0 -21
- package/core/components/functional/states/states.d.ts +0 -29
- package/core/components/functional/states/states.js +0 -134
- package/core/components/functional/submit/submit.d.ts +0 -30
- package/core/components/functional/submit/submit.js +0 -236
- package/core/components/functional/subscriber/subscriber.d.ts +0 -12
- package/core/components/functional/subscriber/subscriber.js +0 -38
- package/core/components/functional/value/value.d.ts +0 -7
- package/core/components/functional/value/value.js +0 -27
- package/core/components/ui/_css/scroll.d.ts +0 -1
- package/core/components/ui/_css/size.d.ts +0 -2
- package/core/components/ui/_css/type.d.ts +0 -2
- package/core/components/ui/alert/alert.d.ts +0 -34
- package/core/components/ui/alert/alert.js +0 -202
- package/core/components/ui/badge/badge.d.ts +0 -26
- package/core/components/ui/button/button.d.ts +0 -171
- package/core/components/ui/captcha/captcha.d.ts +0 -30
- package/core/components/ui/captcha/captcha.js +0 -93
- package/core/components/ui/card/card-footer.d.ts +0 -4
- package/core/components/ui/card/card-footer.js +0 -24
- package/core/components/ui/card/card-header-descripton.d.ts +0 -5
- package/core/components/ui/card/card-header-descripton.js +0 -32
- package/core/components/ui/card/card-header.d.ts +0 -8
- package/core/components/ui/card/card-main.d.ts +0 -4
- package/core/components/ui/card/card-main.js +0 -28
- package/core/components/ui/card/card.d.ts +0 -12
- package/core/components/ui/divider/divider.d.ts +0 -15
- package/core/components/ui/form/checkbox/checkbox.d.ts +0 -181
- package/core/components/ui/form/css/form-control.d.ts +0 -4
- package/core/components/ui/form/fieldset/fieldset.d.ts +0 -23
- package/core/components/ui/form/fieldset/fieldset.js +0 -118
- package/core/components/ui/form/fieldset/legend-description.d.ts +0 -5
- package/core/components/ui/form/fieldset/legend-description.js +0 -30
- package/core/components/ui/form/fieldset/legend.d.ts +0 -16
- package/core/components/ui/form/fieldset/legend.js +0 -112
- package/core/components/ui/form/form-actions/form-actions.d.ts +0 -7
- package/core/components/ui/form/form-actions/form-actions.js +0 -46
- package/core/components/ui/form/form-layout/form-layout.d.ts +0 -12
- package/core/components/ui/form/form-layout/form-layout.js +0 -83
- package/core/components/ui/form/input/input.d.ts +0 -106
- package/core/components/ui/form/input/input.js +0 -268
- package/core/components/ui/form/input/password-helper.d.ts +0 -25
- package/core/components/ui/form/input/password-helper.js +0 -119
- package/core/components/ui/form/input/same-value-helper.d.ts +0 -16
- package/core/components/ui/form/input/same-value-helper.js +0 -77
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +0 -136
- package/core/components/ui/form/input-autocomplete/input-autocomplete.js +0 -296
- package/core/components/ui/form/radio/radio.d.ts +0 -12
- package/core/components/ui/form/radio/radio.js +0 -50
- package/core/components/ui/form/select/select.d.ts +0 -58
- package/core/components/ui/form/select/select.js +0 -298
- package/core/components/ui/form/textarea/textarea.d.ts +0 -84
- package/core/components/ui/form/textarea/textarea.js +0 -150
- package/core/components/ui/group/group.d.ts +0 -16
- package/core/components/ui/group/group.js +0 -118
- package/core/components/ui/icon/icon.d.ts +0 -26
- package/core/components/ui/icon/icon.js +0 -113
- package/core/components/ui/icon/icons.d.ts +0 -10
- package/core/components/ui/icon/icons.js +0 -126
- package/core/components/ui/icon/icons.json +0 -1
- package/core/components/ui/image/image.d.ts +0 -15
- package/core/components/ui/image/image.js +0 -153
- package/core/components/ui/link/link.d.ts +0 -29
- package/core/components/ui/link/link.js +0 -124
- package/core/components/ui/loader/loader.d.ts +0 -23
- package/core/components/ui/loader/loader.js +0 -97
- package/core/components/ui/loader/styles/fixed.d.ts +0 -1
- package/core/components/ui/loader/styles/inline.d.ts +0 -1
- package/core/components/ui/menu/menu-item.d.ts +0 -5
- package/core/components/ui/menu/menu-item.js +0 -34
- package/core/components/ui/menu/menu.d.ts +0 -41
- package/core/components/ui/menu/menu.js +0 -313
- package/core/components/ui/modal/modal-actions.d.ts +0 -7
- package/core/components/ui/modal/modal-actions.js +0 -42
- package/core/components/ui/modal/modal-close.d.ts +0 -7
- package/core/components/ui/modal/modal-close.js +0 -43
- package/core/components/ui/modal/modal-content.d.ts +0 -5
- package/core/components/ui/modal/modal-content.js +0 -26
- package/core/components/ui/modal/modal-subtitle.d.ts +0 -5
- package/core/components/ui/modal/modal-subtitle.js +0 -30
- package/core/components/ui/modal/modal-title.d.ts +0 -5
- package/core/components/ui/modal/modal-title.js +0 -29
- package/core/components/ui/modal/modal.d.ts +0 -58
- package/core/components/ui/modal/modal.js +0 -401
- package/core/components/ui/pop/pop.d.ts +0 -37
- package/core/components/ui/pop/pop.js +0 -299
- package/core/components/ui/progress/progress.d.ts +0 -10
- package/core/components/ui/table/table-caption.d.ts +0 -5
- package/core/components/ui/table/table-caption.js +0 -28
- package/core/components/ui/table/table-tbody.d.ts +0 -5
- package/core/components/ui/table/table-tbody.js +0 -39
- package/core/components/ui/table/table-td.d.ts +0 -12
- package/core/components/ui/table/table-td.js +0 -68
- package/core/components/ui/table/table-tfoot.d.ts +0 -5
- package/core/components/ui/table/table-tfoot.js +0 -27
- package/core/components/ui/table/table-th.d.ts +0 -11
- package/core/components/ui/table/table-th.js +0 -73
- package/core/components/ui/table/table-thead.d.ts +0 -5
- package/core/components/ui/table/table-thead.js +0 -25
- package/core/components/ui/table/table-tr.d.ts +0 -13
- package/core/components/ui/table/table-tr.js +0 -66
- package/core/components/ui/table/table.d.ts +0 -17
- package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -1
- package/core/components/ui/theme/theme-collection/dark.d.ts +0 -1
- package/core/components/ui/theme/theme-collection/light.d.ts +0 -1
- package/core/components/ui/theme/theme.d.ts +0 -19
- package/core/components/ui/theme/theme.js +0 -124
- package/core/components/ui/toast/message-subscriber.d.ts +0 -18
- package/core/components/ui/toast/message-subscriber.js +0 -40
- package/core/components/ui/toast/toast-item.d.ts +0 -19
- package/core/components/ui/toast/toast.d.ts +0 -25
- package/core/components/ui/toast/toast.js +0 -226
- package/core/components/ui/toast/types.d.ts +0 -11
- package/core/components/ui/toast/types.js +0 -1
- package/core/components/ui/tooltip/tooltip.d.ts +0 -10
- package/core/components/ui/ui.d.ts +0 -32
- package/core/core.d.ts +0 -4
- package/core/core.js +0 -19
- package/core/decorators/Subscriber.d.ts +0 -4
- package/core/decorators/Subscriber.js +0 -166
- package/core/directives/DataProvider.d.ts +0 -23
- package/core/directives/DataProvider.js +0 -102
- package/core/directives/Wording.d.ts +0 -42
- package/core/directives/Wording.js +0 -202
- package/core/mixins/Fetcher.d.ts +0 -90
- package/core/mixins/Fetcher.js +0 -242
- package/core/mixins/FormCheckable.d.ts +0 -88
- package/core/mixins/FormCheckable.js +0 -306
- package/core/mixins/FormElement.d.ts +0 -32
- package/core/mixins/FormElement.js +0 -272
- package/core/mixins/FormInput.d.ts +0 -70
- package/core/mixins/FormInput.js +0 -81
- package/core/mixins/Subscriber.d.ts +0 -36
- package/core/mixins/Subscriber.js +0 -333
- package/core/mixins/TemplatesContainer.d.ts +0 -13
- package/core/mixins/TemplatesContainer.js +0 -69
- package/core/mixins/mixins.js +0 -6
- package/core/utils/Arrays.d.ts +0 -97
- package/core/utils/Arrays.js +0 -140
- package/core/utils/DataBindObserver.d.ts +0 -83
- package/core/utils/DataBindObserver.js +0 -264
- package/core/utils/Electron.d.ts +0 -7
- package/core/utils/Electron.js +0 -11
- package/core/utils/Format.d.ts +0 -12
- package/core/utils/Format.js +0 -38
- package/core/utils/HTML.d.ts +0 -42
- package/core/utils/HTML.js +0 -119
- package/core/utils/LocationHandler.d.ts +0 -46
- package/core/utils/LocationHandler.js +0 -133
- package/core/utils/Objects.d.ts +0 -28
- package/core/utils/Objects.js +0 -102
- package/core/utils/PublisherProxy.d.ts +0 -176
- package/core/utils/PublisherProxy.js +0 -709
- package/core/utils/Utils.d.ts +0 -4
- package/core/utils/Utils.js +0 -12
- package/core/utils/api.d.ts +0 -139
- package/core/utils/api.js +0 -391
- package/core/utils/url-pattern.js +0 -2
- package/decorators.d.ts +0 -3
- package/directives.d.ts +0 -40
- package/img/concorde-logo.svg +0 -1
- package/img/concorde.png +0 -0
- package/img/concorde_def.png +0 -0
- package/mixins.d.ts +0 -181
- package/svg/regular/plane.svg +0 -1
- package/svg/solid/plane.svg +0 -1
- package/test-utils/TestUtils.d.ts +0 -4
- package/test-utils/TestUtils.js +0 -12
- package/utils.d.ts +0 -20
- /package/{core/components/functional/functional.d.ts → src/core/components/functional/functional.ts} +0 -0
- /package/{core → src/core}/components/ui/theme/css/tailwind.css +0 -0
- /package/{core → src/core}/components/ui/theme/css/tailwind.d.ts +0 -0
package/core/_types/types.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import DataBindObserver from "@supersoniks/concorde/core/utils/DataBindObserver";
|
|
2
|
-
import Publisher from "../utils/PublisherProxy";
|
|
3
|
-
export interface ConcordeWindow extends Window {
|
|
4
|
-
SonicPublisherManager: any;
|
|
5
|
-
SonicDataBindObserver: DataBindObserver;
|
|
6
|
-
PasswordCredential: new (options: {
|
|
7
|
-
id: string;
|
|
8
|
-
password: string;
|
|
9
|
-
}) => Credential;
|
|
10
|
-
grecaptcha: {
|
|
11
|
-
ready: (handler: () => void) => void;
|
|
12
|
-
execute: (key: string, options: {
|
|
13
|
-
action: string;
|
|
14
|
-
}) => Promise<string>;
|
|
15
|
-
};
|
|
16
|
-
SonicModal: any;
|
|
17
|
-
SonicToast: any;
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}
|
|
20
|
-
export type MixinArgsType = any;
|
|
21
|
-
export type PrimitiveType = string | number | boolean | bigint | undefined | null | symbol;
|
|
22
|
-
export type PublisherInterface<T = PublisherContentType> = Publisher<T> & any;
|
|
23
|
-
export type CoreJSType = string | number | boolean | null | {
|
|
24
|
-
[property: string | number | symbol]: CoreJSType;
|
|
25
|
-
} | CoreJSType[];
|
|
26
|
-
export type TypeAndRecordOfType<U> = U & Record<string | number, U>;
|
|
27
|
-
export type PublisherContentType = unknown;
|
|
28
|
-
export type HTMLFormControl = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
|
package/core/_types/types.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
type DateTimeFormatPartExtended = {
|
|
3
|
-
hidden?: boolean;
|
|
4
|
-
source?: string;
|
|
5
|
-
type: string;
|
|
6
|
-
value: string;
|
|
7
|
-
};
|
|
8
|
-
declare const SonicDate_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../_types/types").CoreJSType>) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/TemplatesContainer").TemplatesContainerInterface) & typeof LitElement;
|
|
9
|
-
export declare class SonicDate extends SonicDate_base {
|
|
10
|
-
pageLanguage: string;
|
|
11
|
-
private duAu;
|
|
12
|
-
private _wording_billet_periode_validite;
|
|
13
|
-
get wording_billet_periode_validite(): string;
|
|
14
|
-
set wording_billet_periode_validite(value: string);
|
|
15
|
-
designMode: boolean | null;
|
|
16
|
-
time_zone: string | null;
|
|
17
|
-
date: number | null;
|
|
18
|
-
date_string: string | null;
|
|
19
|
-
start_date_string: string | null;
|
|
20
|
-
end_date_string: string | null;
|
|
21
|
-
start_date: number;
|
|
22
|
-
hide_hours: boolean;
|
|
23
|
-
end_date: number;
|
|
24
|
-
era: "narrow" | "short" | "long" | "";
|
|
25
|
-
year: "numeric" | "2-digit";
|
|
26
|
-
month: "numeric" | "2-digit" | "narrow" | "short" | "long";
|
|
27
|
-
day: "numeric" | "2-digit";
|
|
28
|
-
weekday: "narrow" | "short" | "long" | "hidden";
|
|
29
|
-
hour: "numeric" | "2-digit" | "hidden";
|
|
30
|
-
hour12: boolean;
|
|
31
|
-
minute: "numeric" | "2-digit" | "hidden";
|
|
32
|
-
language: string;
|
|
33
|
-
renderIf: boolean;
|
|
34
|
-
now: boolean;
|
|
35
|
-
private startDateObject;
|
|
36
|
-
private endDateObject;
|
|
37
|
-
connectedCallback(): void;
|
|
38
|
-
/**
|
|
39
|
-
* Retourne un tableau des différentes parties de la date en fonction des options données, de la date de début et de fin.
|
|
40
|
-
*/
|
|
41
|
-
getDatesParts(start_date: number, end_date: number, options: Intl.DateTimeFormatOptions): DateTimeFormatPartExtended[];
|
|
42
|
-
dateStringToSeconds(dateString: string): number;
|
|
43
|
-
render(): import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/unsafe-html").UnsafeHTMLDirective>;
|
|
44
|
-
}
|
|
45
|
-
export {};
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
8
|
-
import TemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
|
|
9
|
-
import Format from "@supersoniks/concorde/core/utils/Format";
|
|
10
|
-
import HTML from "@supersoniks/concorde/core/utils/HTML";
|
|
11
|
-
import { LitElement, nothing } from "lit";
|
|
12
|
-
import { customElement, property } from "lit/decorators.js";
|
|
13
|
-
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
14
|
-
const tagName = "sonic-date";
|
|
15
|
-
let SonicDate = class SonicDate extends Subscriber(TemplatesContainer(LitElement)) {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.pageLanguage = "fr";
|
|
19
|
-
this.duAu = [];
|
|
20
|
-
this._wording_billet_periode_validite = "";
|
|
21
|
-
this.designMode = null;
|
|
22
|
-
this.time_zone = null;
|
|
23
|
-
this.date = null;
|
|
24
|
-
this.date_string = null;
|
|
25
|
-
this.start_date_string = null;
|
|
26
|
-
this.end_date_string = null;
|
|
27
|
-
this.start_date = 0;
|
|
28
|
-
this.hide_hours = false;
|
|
29
|
-
this.end_date = 0;
|
|
30
|
-
this.era = "";
|
|
31
|
-
this.year = "numeric";
|
|
32
|
-
this.month = "short";
|
|
33
|
-
this.day = "2-digit";
|
|
34
|
-
this.weekday = "short";
|
|
35
|
-
this.hour = "2-digit";
|
|
36
|
-
this.hour12 = false;
|
|
37
|
-
this.minute = "2-digit";
|
|
38
|
-
this.language = "";
|
|
39
|
-
this.renderIf = true;
|
|
40
|
-
this.now = false;
|
|
41
|
-
// @property({type:String}) second: 'numeric' | '2-digit'= "2-digit"
|
|
42
|
-
// @property({ type: String }) hour12: boolean = false;
|
|
43
|
-
this.startDateObject = new Date();
|
|
44
|
-
this.endDateObject = new Date();
|
|
45
|
-
}
|
|
46
|
-
get wording_billet_periode_validite() {
|
|
47
|
-
return this._wording_billet_periode_validite;
|
|
48
|
-
}
|
|
49
|
-
set wording_billet_periode_validite(value) {
|
|
50
|
-
if (!value)
|
|
51
|
-
value = "Du %s au %s";
|
|
52
|
-
this._wording_billet_periode_validite = value;
|
|
53
|
-
this.duAu = this.wording_billet_periode_validite?.split("%s").map((str) => str.trim());
|
|
54
|
-
this.duAu.pop();
|
|
55
|
-
this.requestUpdate();
|
|
56
|
-
}
|
|
57
|
-
connectedCallback() {
|
|
58
|
-
if (!this.hasAttribute("wording_billet_periode_validite"))
|
|
59
|
-
this.wording_billet_periode_validite = "Du %s au %s";
|
|
60
|
-
this.pageLanguage = HTML.getLanguage();
|
|
61
|
-
super.connectedCallback();
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Retourne un tableau des différentes parties de la date en fonction des options données, de la date de début et de fin.
|
|
65
|
-
*/
|
|
66
|
-
getDatesParts(start_date, end_date, options) {
|
|
67
|
-
const start = this.startDateObject;
|
|
68
|
-
start.setTime(start_date * 1000);
|
|
69
|
-
let parts = [];
|
|
70
|
-
if (end_date > 0) {
|
|
71
|
-
const end = this.endDateObject;
|
|
72
|
-
end.setTime(end_date * 1000);
|
|
73
|
-
//
|
|
74
|
-
//on affiche pas l'heure si les dates sont les mêmes
|
|
75
|
-
const isSameDay = start.toDateString() == end.toDateString();
|
|
76
|
-
if (!isSameDay || this.hide_hours) {
|
|
77
|
-
delete options.hour;
|
|
78
|
-
delete options.minute;
|
|
79
|
-
}
|
|
80
|
-
const format = new Intl.DateTimeFormat(this.language || this.pageLanguage, options);
|
|
81
|
-
parts = format.formatRangeToParts(start, end);
|
|
82
|
-
//on affiche du au uniquement si on a deux dates différentes
|
|
83
|
-
if (!isSameDay) {
|
|
84
|
-
const to = parts.find((part) => part.type == "literal" && part.source == "shared" && part.value.trim().length > 0);
|
|
85
|
-
if (to) {
|
|
86
|
-
to.value = " " + this.duAu[1] + " ";
|
|
87
|
-
to.type = "to";
|
|
88
|
-
}
|
|
89
|
-
if (!this.designMode)
|
|
90
|
-
parts.unshift({
|
|
91
|
-
type: "from",
|
|
92
|
-
value: this.duAu[0] + " ",
|
|
93
|
-
source: "shared",
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
const format = new Intl.DateTimeFormat(this.language || this.pageLanguage, options);
|
|
99
|
-
parts = format.formatToParts(start);
|
|
100
|
-
}
|
|
101
|
-
//En mode design on cache les ","
|
|
102
|
-
if (this.designMode) {
|
|
103
|
-
// parts.forEach((part) => (part.hidden = part.value.trim() == ","));
|
|
104
|
-
// replace all "," by " "
|
|
105
|
-
parts.forEach((part) => (part.value = part.value.replace(/,/g, " ")));
|
|
106
|
-
}
|
|
107
|
-
parts[0].value = Format.ucFirst(parts[0].value);
|
|
108
|
-
return parts.filter((p) => p.hidden !== true);
|
|
109
|
-
}
|
|
110
|
-
dateStringToSeconds(dateString) {
|
|
111
|
-
return new Date(dateString).getTime() / 1000;
|
|
112
|
-
}
|
|
113
|
-
render() {
|
|
114
|
-
if (!this.renderIf)
|
|
115
|
-
return nothing;
|
|
116
|
-
/* *
|
|
117
|
-
* Normalisation en fonction des valeurs de dates passées *
|
|
118
|
-
* */
|
|
119
|
-
if (this.date_string)
|
|
120
|
-
this.date = this.dateStringToSeconds(this.date_string);
|
|
121
|
-
if (this.date)
|
|
122
|
-
this.start_date = this.date;
|
|
123
|
-
if (this.start_date_string)
|
|
124
|
-
this.start_date = this.dateStringToSeconds(this.start_date_string);
|
|
125
|
-
if (this.end_date_string)
|
|
126
|
-
this.end_date = this.dateStringToSeconds(this.end_date_string);
|
|
127
|
-
if (!this.start_date && !this.now && !this.end_date)
|
|
128
|
-
return nothing;
|
|
129
|
-
if (!this.start_date)
|
|
130
|
-
this.start_date = Date.now() / 1000;
|
|
131
|
-
if (this.end_date > 0 && this.end_date < this.start_date) {
|
|
132
|
-
const copy = this.start_date;
|
|
133
|
-
this.start_date = this.end_date;
|
|
134
|
-
this.end_date = copy;
|
|
135
|
-
}
|
|
136
|
-
/* *
|
|
137
|
-
* gestion des options d'affichage des dates
|
|
138
|
-
* */
|
|
139
|
-
const options = {
|
|
140
|
-
year: this.year,
|
|
141
|
-
month: this.month,
|
|
142
|
-
day: this.day,
|
|
143
|
-
hour12: this.hour12,
|
|
144
|
-
};
|
|
145
|
-
if (this.weekday !== "hidden")
|
|
146
|
-
options.weekday = this.weekday;
|
|
147
|
-
if (this.hour !== "hidden")
|
|
148
|
-
options.hour = this.hour;
|
|
149
|
-
if (this.minute !== "hidden")
|
|
150
|
-
options.minute = this.minute;
|
|
151
|
-
if (this.era)
|
|
152
|
-
options.era = this.era;
|
|
153
|
-
if (this.time_zone)
|
|
154
|
-
options.timeZone = this.time_zone;
|
|
155
|
-
/**
|
|
156
|
-
* On récupère les différentes partie affichées en vu de l'injection dans le template
|
|
157
|
-
*/
|
|
158
|
-
const parts = this.getDatesParts(this.start_date, this.end_date, options);
|
|
159
|
-
return unsafeHTML(`${parts
|
|
160
|
-
.map((part) => {
|
|
161
|
-
const template = this.templateParts[part.type];
|
|
162
|
-
if (template) {
|
|
163
|
-
const clone = document.importNode(template.content, true);
|
|
164
|
-
const child = clone.children[0];
|
|
165
|
-
if (child.innerText.trim() == "")
|
|
166
|
-
child.innerText = part.value;
|
|
167
|
-
return child.outerHTML;
|
|
168
|
-
}
|
|
169
|
-
const span = document.createElement("span");
|
|
170
|
-
span.innerText = part.value;
|
|
171
|
-
span.className = part.type;
|
|
172
|
-
return `<span class="${part.type}">${part.value}</span>`;
|
|
173
|
-
})
|
|
174
|
-
.join("")}`);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
__decorate([
|
|
178
|
-
property()
|
|
179
|
-
], SonicDate.prototype, "wording_billet_periode_validite", null);
|
|
180
|
-
__decorate([
|
|
181
|
-
property({ type: Boolean })
|
|
182
|
-
], SonicDate.prototype, "designMode", void 0);
|
|
183
|
-
__decorate([
|
|
184
|
-
property({ type: String })
|
|
185
|
-
], SonicDate.prototype, "time_zone", void 0);
|
|
186
|
-
__decorate([
|
|
187
|
-
property({ type: Number })
|
|
188
|
-
], SonicDate.prototype, "date", void 0);
|
|
189
|
-
__decorate([
|
|
190
|
-
property({ type: String })
|
|
191
|
-
], SonicDate.prototype, "date_string", void 0);
|
|
192
|
-
__decorate([
|
|
193
|
-
property({ type: String })
|
|
194
|
-
], SonicDate.prototype, "start_date_string", void 0);
|
|
195
|
-
__decorate([
|
|
196
|
-
property({ type: String })
|
|
197
|
-
], SonicDate.prototype, "end_date_string", void 0);
|
|
198
|
-
__decorate([
|
|
199
|
-
property({ type: Number })
|
|
200
|
-
], SonicDate.prototype, "start_date", void 0);
|
|
201
|
-
__decorate([
|
|
202
|
-
property({ type: Boolean })
|
|
203
|
-
], SonicDate.prototype, "hide_hours", void 0);
|
|
204
|
-
__decorate([
|
|
205
|
-
property({ type: Number })
|
|
206
|
-
], SonicDate.prototype, "end_date", void 0);
|
|
207
|
-
__decorate([
|
|
208
|
-
property({ type: String })
|
|
209
|
-
], SonicDate.prototype, "era", void 0);
|
|
210
|
-
__decorate([
|
|
211
|
-
property({ type: String })
|
|
212
|
-
], SonicDate.prototype, "year", void 0);
|
|
213
|
-
__decorate([
|
|
214
|
-
property({ type: String })
|
|
215
|
-
], SonicDate.prototype, "month", void 0);
|
|
216
|
-
__decorate([
|
|
217
|
-
property({ type: String })
|
|
218
|
-
], SonicDate.prototype, "day", void 0);
|
|
219
|
-
__decorate([
|
|
220
|
-
property({ type: String })
|
|
221
|
-
], SonicDate.prototype, "weekday", void 0);
|
|
222
|
-
__decorate([
|
|
223
|
-
property({ type: String })
|
|
224
|
-
], SonicDate.prototype, "hour", void 0);
|
|
225
|
-
__decorate([
|
|
226
|
-
property({ type: Boolean })
|
|
227
|
-
], SonicDate.prototype, "hour12", void 0);
|
|
228
|
-
__decorate([
|
|
229
|
-
property({ type: String })
|
|
230
|
-
], SonicDate.prototype, "minute", void 0);
|
|
231
|
-
__decorate([
|
|
232
|
-
property({ type: String })
|
|
233
|
-
], SonicDate.prototype, "language", void 0);
|
|
234
|
-
__decorate([
|
|
235
|
-
property({ type: Boolean })
|
|
236
|
-
], SonicDate.prototype, "renderIf", void 0);
|
|
237
|
-
__decorate([
|
|
238
|
-
property({ type: Boolean })
|
|
239
|
-
], SonicDate.prototype, "now", void 0);
|
|
240
|
-
SonicDate = __decorate([
|
|
241
|
-
customElement(tagName)
|
|
242
|
-
], SonicDate);
|
|
243
|
-
export { SonicDate };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
declare const SonicComponent_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
3
|
-
export declare class SonicComponent extends SonicComponent_base {
|
|
4
|
-
text: string;
|
|
5
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
6
|
-
}
|
|
7
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { html, LitElement } from "lit";
|
|
8
|
-
import { customElement, property } from "lit/decorators.js";
|
|
9
|
-
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
10
|
-
const tagName = "sonic-example"; // For Astro.build
|
|
11
|
-
let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.text = "Example";
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
return html `<div>${this.text}</div>`;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
__decorate([
|
|
21
|
-
property()
|
|
22
|
-
], SonicComponent.prototype, "text", void 0);
|
|
23
|
-
SonicComponent = __decorate([
|
|
24
|
-
customElement(tagName)
|
|
25
|
-
], SonicComponent);
|
|
26
|
-
export { SonicComponent };
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { LitElement, nothing } from "lit";
|
|
3
|
-
import { LoaderMode } from "../../ui/loader/loader";
|
|
4
|
-
import { DirectiveResult } from "lit/async-directive";
|
|
5
|
-
declare const Fetch_base: {
|
|
6
|
-
new (...args: any[]): {
|
|
7
|
-
api: import("../../../utils/api").default | null;
|
|
8
|
-
key: string;
|
|
9
|
-
isFirstLoad: boolean;
|
|
10
|
-
isLoading: boolean;
|
|
11
|
-
lazyLoad?: boolean | undefined;
|
|
12
|
-
iObserver: IntersectionObserver | null;
|
|
13
|
-
isFetchEnabled: boolean;
|
|
14
|
-
fetchedData: any;
|
|
15
|
-
_endPoint: string;
|
|
16
|
-
props: import("../../../utils/api").ResultTypeInterface | null;
|
|
17
|
-
endPoint: string;
|
|
18
|
-
requestId: number;
|
|
19
|
-
refetchEveryMs: number;
|
|
20
|
-
refetchTimeOutId?: NodeJS.Timeout | undefined;
|
|
21
|
-
_fetchData(): Promise<void>;
|
|
22
|
-
onInvalidate?: (() => void) | undefined;
|
|
23
|
-
disconnectedCallback(): void;
|
|
24
|
-
connectedCallback(): void;
|
|
25
|
-
lazyLoadSpan?: HTMLSpanElement | undefined;
|
|
26
|
-
handleLazyLoad(): void;
|
|
27
|
-
onIntersection(entries: IntersectionObserverEntry[]): void;
|
|
28
|
-
propertyMap: object;
|
|
29
|
-
isConnected: boolean;
|
|
30
|
-
children: HTMLCollection;
|
|
31
|
-
appendChild(node: Node): Node;
|
|
32
|
-
getAncestorAttributeValue(attributeName: string): string;
|
|
33
|
-
hasAncestorAttribute(attributeName: string): boolean;
|
|
34
|
-
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
35
|
-
publisher: any;
|
|
36
|
-
dataProvider: string | null;
|
|
37
|
-
noShadowDom: string | null;
|
|
38
|
-
debug: HTMLElement | null;
|
|
39
|
-
defferedDebug: boolean | null;
|
|
40
|
-
displayContents: boolean;
|
|
41
|
-
shadowRoot?: ShadowRoot | undefined;
|
|
42
|
-
dispatchEvent(event: Event): void;
|
|
43
|
-
setAttribute(name: string, value: string): void;
|
|
44
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
45
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
46
|
-
removeAttribute(name: string): void;
|
|
47
|
-
initPublisher(): void;
|
|
48
|
-
getApiConfiguration(): import("../../../utils/api").APIConfiguration;
|
|
49
|
-
requestUpdate(): void;
|
|
50
|
-
getAttribute(name: string): string;
|
|
51
|
-
hasAttribute(attributeName: string): boolean;
|
|
52
|
-
getBoundingClientRect(): DOMRect;
|
|
53
|
-
};
|
|
54
|
-
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../_types/types").CoreJSType>) & (new (...args: any[]) => import("../../../mixins/TemplatesContainer").TemplatesContainerInterface) & typeof LitElement;
|
|
55
|
-
/**
|
|
56
|
-
* ###Fetch charge un contenu via un appel d'api web.
|
|
57
|
-
* Extends mixins : Fetcher, [Subscriber](./?path=/docs/miscallenous-🔔-subscriber--page)
|
|
58
|
-
*
|
|
59
|
-
* #### Configuration via les attributs
|
|
60
|
-
*
|
|
61
|
-
* | nom | sur quelle balise | Description | Exemple de valeur | défaut / requis |
|
|
62
|
-
* | -------------------------------------------------------------------------------------- |
|
|
63
|
-
* | serviceURL |Fetcher ou un de ses parents | URL de base des services. | http://la-billetterie.net/api/v2 | domain du site |
|
|
64
|
-
* | endpoint |Fetcher | point d'accès d'un service | user/2 | valeur de l'attribut dataProvider |
|
|
65
|
-
* | dataProvider |Fetcher ou un de ses parents | Identifiant d'un publisher qui stock les données, voir [subscriber](./?path=/docs/miscallenous-🔔-subscriber--page). | billetterie/user/2 | *REQUIS* |
|
|
66
|
-
* | headersDataProvider |Fetcher ou un de ses parents | Identifiant d'un publisher qui stock les données destinées à être envoyées en entêtes de la requetes | MyCoockieHEaders | null |
|
|
67
|
-
* | key |Fetcher | extrait une sous propriété de la donnée chargée avant de l'assignée à son publisher | ma.data | null |
|
|
68
|
-
*
|
|
69
|
-
* *Si la données est `{ma:{data:{a:1,b:2}}}` et `key="ma.data"`, la données disponible dans le composant sera `{a:1, b:2}`*
|
|
70
|
-
|
|
71
|
-
#### Intégration auto de basic auth (pour tester une api qui nécessite une authentification)
|
|
72
|
-
|
|
73
|
-
* Fetch utilise le service pour générer le token et l'ajoute au header de l'appel qui récupère les données.
|
|
74
|
-
|
|
75
|
-
* | nom | sur quelle balise | Description | Exemple de valeur | défaut / requis |
|
|
76
|
-
* | -------------------------------------------------------------------------------------- |
|
|
77
|
-
* | userName | Fetcher ou un de ses parents | Nom de l'utilisateur | DjuDju | null |
|
|
78
|
-
* | password | Fetcher ou un de ses parents | mot de passe | pom_549 | null |
|
|
79
|
-
* | tokenProvider | Fetcher ou un de ses parents | point d'accès du service fournissant le token | auth | null |
|
|
80
|
-
* | token | Fetcher ou un de ses parents | A fournir à la place des autres attributs si on le possède | q<d34gb | null |
|
|
81
|
-
|
|
82
|
-
#### Autres choses utiles
|
|
83
|
-
* * On peut appeler la methode invalidate() sur le publisher associé au composant pour declencher le rechargement des données.
|
|
84
|
-
* * endPoint est une propriété réctive, par conséquent, sa modification, manuelle via template ou data binbding provoque la mise à jour du contenu.
|
|
85
|
-
*/
|
|
86
|
-
export declare class Fetch extends Fetch_base {
|
|
87
|
-
static styles: import("lit").CSSResult[];
|
|
88
|
-
loader?: LoaderMode | true | "";
|
|
89
|
-
renderLoader(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
90
|
-
renderSkeleton(): DirectiveResult<import("lit-html/directive").DirectiveClass>;
|
|
91
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
92
|
-
}
|
|
93
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./date/date";
|
|
2
|
-
import "./fetch/fetch";
|
|
3
|
-
import "./if/if";
|
|
4
|
-
import "./list/list";
|
|
5
|
-
import "./queue/queue";
|
|
6
|
-
import "./subscriber/subscriber";
|
|
7
|
-
import "./submit/submit";
|
|
8
|
-
import "./router/router";
|
|
9
|
-
import "./router/redirect";
|
|
10
|
-
import "./states/states";
|
|
11
|
-
import "./sonic-scope/sonic-scope";
|
|
12
|
-
import "./example/example";
|
|
13
|
-
import "./sdui/sdui";
|
|
14
|
-
import "./mix/mix";
|
|
15
|
-
import "./value/value";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { LitElement, nothing } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* Le composant *sonic-if* affiche son contenu dans le slot principal si sa propriété .condition est évaluée à true
|
|
4
|
-
*/
|
|
5
|
-
export declare class SonicIF extends LitElement {
|
|
6
|
-
static styles: import("lit").CSSResult;
|
|
7
|
-
/**
|
|
8
|
-
* Le contenu s'affiche si la condition est évaluée à true.
|
|
9
|
-
*/
|
|
10
|
-
condition: boolean;
|
|
11
|
-
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
12
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { css, html, LitElement, nothing } from "lit";
|
|
8
|
-
import { customElement, property } from "lit/decorators.js";
|
|
9
|
-
const tagName = "sonic-if"; // For Astro.build
|
|
10
|
-
/**
|
|
11
|
-
* Le composant *sonic-if* affiche son contenu dans le slot principal si sa propriété .condition est évaluée à true
|
|
12
|
-
*/
|
|
13
|
-
let SonicIF = class SonicIF extends LitElement {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
/**
|
|
17
|
-
* Le contenu s'affiche si la condition est évaluée à true.
|
|
18
|
-
*/
|
|
19
|
-
this.condition = false;
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
if (!this.condition)
|
|
23
|
-
return nothing;
|
|
24
|
-
return html ` <slot></slot> `;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
SonicIF.styles = css `
|
|
28
|
-
:host {
|
|
29
|
-
display: contents;
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
__decorate([
|
|
33
|
-
property({ type: Boolean })
|
|
34
|
-
], SonicIF.prototype, "condition", void 0);
|
|
35
|
-
SonicIF = __decorate([
|
|
36
|
-
customElement(tagName)
|
|
37
|
-
], SonicIF);
|
|
38
|
-
export { SonicIF };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./if";
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { expect } from "@jest/globals";
|
|
2
|
-
import TestUtils from "@supersoniks/concorde/test-utils/TestUtils";
|
|
3
|
-
import "./if";
|
|
4
|
-
function create() {
|
|
5
|
-
return TestUtils.bootstrap(`<sonic-if>Some Content</sonic-if>`)[0];
|
|
6
|
-
}
|
|
7
|
-
test("shows ''Some Content'' condition = true set by property accessor", async () => {
|
|
8
|
-
const elt = create();
|
|
9
|
-
elt.condition = true;
|
|
10
|
-
await elt.updated();
|
|
11
|
-
const renderedText = elt.shadowRoot.children[0].assignedNodes()[0].textContent;
|
|
12
|
-
expect(renderedText).toBe("Some Content");
|
|
13
|
-
});
|
|
14
|
-
test("shows nothing condition = false set by property accessor", async () => {
|
|
15
|
-
const elt = create();
|
|
16
|
-
elt.condition = false;
|
|
17
|
-
await elt.updated();
|
|
18
|
-
const children = Array.from(elt.shadowRoot.children).filter((elt) => elt.nodeName.toLowerCase() != "style");
|
|
19
|
-
const length = children.length;
|
|
20
|
-
expect(length).toBe(0);
|
|
21
|
-
});
|
|
22
|
-
test("shows ''Some Content'' condition = true set by attribute", async () => {
|
|
23
|
-
const elt = create();
|
|
24
|
-
elt.setAttribute("condition", "");
|
|
25
|
-
await elt.updated();
|
|
26
|
-
const renderedText = elt.shadowRoot.children[0].assignedNodes()[0].textContent;
|
|
27
|
-
expect(renderedText).toBe("Some Content");
|
|
28
|
-
});
|
|
29
|
-
test("shows nothing condition not set", async () => {
|
|
30
|
-
const elt = create();
|
|
31
|
-
await elt.updated();
|
|
32
|
-
const children = Array.from(elt.shadowRoot.children).filter((elt) => elt.nodeName.toLowerCase() != "style");
|
|
33
|
-
const length = children.length;
|
|
34
|
-
expect(length).toBe(0);
|
|
35
|
-
});
|