@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
|
@@ -1,66 +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, css } from "lit";
|
|
8
|
-
import { customElement, property } from "lit/decorators.js";
|
|
9
|
-
import { typeColor } from "@supersoniks/concorde/core/components/ui/_css/type";
|
|
10
|
-
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
11
|
-
const tagName = "sonic-tr";
|
|
12
|
-
let TableTr = class TableTr extends Subscriber(LitElement) {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this._metadata_ = {};
|
|
16
|
-
}
|
|
17
|
-
willUpdate(changedProperties) {
|
|
18
|
-
if (changedProperties.has("_metadata_")) {
|
|
19
|
-
this.even = !!this._metadata_.even;
|
|
20
|
-
this.odd = !!this._metadata_.odd;
|
|
21
|
-
this.last = !!this._metadata_.lastChild;
|
|
22
|
-
}
|
|
23
|
-
super.willUpdate(changedProperties);
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
return html `<slot></slot>`;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
TableTr.styles = [
|
|
30
|
-
typeColor,
|
|
31
|
-
css `
|
|
32
|
-
:host {
|
|
33
|
-
display: table-row;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host([odd]) {
|
|
37
|
-
background: var(--sc-table-accent-bg) !important;
|
|
38
|
-
}
|
|
39
|
-
:host([even]) {
|
|
40
|
-
background: var(--sc-table-bg) !important;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:host([last]) {
|
|
44
|
-
--sc-table-td-border-b: none;
|
|
45
|
-
}
|
|
46
|
-
:host(:hover) {
|
|
47
|
-
background: var(--sc-table-hover-bg) !important;
|
|
48
|
-
}
|
|
49
|
-
`,
|
|
50
|
-
];
|
|
51
|
-
__decorate([
|
|
52
|
-
property({ type: Object })
|
|
53
|
-
], TableTr.prototype, "_metadata_", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
property({ type: Boolean, reflect: true })
|
|
56
|
-
], TableTr.prototype, "even", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
property({ type: Boolean, reflect: true })
|
|
59
|
-
], TableTr.prototype, "odd", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
property({ type: Boolean, reflect: true })
|
|
62
|
-
], TableTr.prototype, "last", void 0);
|
|
63
|
-
TableTr = __decorate([
|
|
64
|
-
customElement(tagName)
|
|
65
|
-
], TableTr);
|
|
66
|
-
export { TableTr };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
import "@supersoniks/concorde/core/components/ui/table/table-tr";
|
|
3
|
-
import "@supersoniks/concorde/core/components/ui/table/table-th";
|
|
4
|
-
import "@supersoniks/concorde/core/components/ui/table/table-td";
|
|
5
|
-
import "@supersoniks/concorde/core/components/ui/table/table-thead";
|
|
6
|
-
import "@supersoniks/concorde/core/components/ui/table/table-tbody";
|
|
7
|
-
import "@supersoniks/concorde/core/components/ui/table/table-tfoot";
|
|
8
|
-
import "@supersoniks/concorde/core/components/ui/table/table-caption";
|
|
9
|
-
export declare class Table extends LitElement {
|
|
10
|
-
static styles: import("lit").CSSResult[];
|
|
11
|
-
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
12
|
-
bordered: boolean;
|
|
13
|
-
rounded: boolean;
|
|
14
|
-
noCustomScroll: boolean;
|
|
15
|
-
maxHeight?: string;
|
|
16
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const coreVariables: import("lit").CSSResult;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const dark: import("lit").CSSResult;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const light: import("lit").CSSResult;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
export declare class Theme extends LitElement {
|
|
3
|
-
static styles: import("lit").CSSResult[];
|
|
4
|
-
static instance: Theme | undefined;
|
|
5
|
-
constructor();
|
|
6
|
-
/**
|
|
7
|
-
* retourne le conteneur de tout ce qui pop : popups / modale / tooltip? / dropdown / ...
|
|
8
|
-
*/
|
|
9
|
-
static getPopContainer(): HTMLElement;
|
|
10
|
-
theme: string;
|
|
11
|
-
background: boolean;
|
|
12
|
-
color: boolean;
|
|
13
|
-
font: boolean;
|
|
14
|
-
connectedCallback(): void;
|
|
15
|
-
postCSSVars(): void;
|
|
16
|
-
receiveMessage(event: MessageEvent): void;
|
|
17
|
-
getCssVariables(): Record<string, string>;
|
|
18
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
19
|
-
}
|
|
@@ -1,124 +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
|
-
var Theme_1;
|
|
8
|
-
import { html, LitElement, css } from "lit";
|
|
9
|
-
import { customElement, property } from "lit/decorators.js";
|
|
10
|
-
import { coreVariables } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/core-variables";
|
|
11
|
-
import { light } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/light";
|
|
12
|
-
import { dark } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/dark";
|
|
13
|
-
import { PublisherManager } from "@supersoniks/concorde/utils";
|
|
14
|
-
const tagName = "sonic-theme";
|
|
15
|
-
let Theme = Theme_1 = class Theme extends LitElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.theme = "light";
|
|
19
|
-
this.background = false;
|
|
20
|
-
this.color = false;
|
|
21
|
-
this.font = false;
|
|
22
|
-
Theme_1.instance = this;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* retourne le conteneur de tout ce qui pop : popups / modale / tooltip? / dropdown / ...
|
|
26
|
-
*/
|
|
27
|
-
static getPopContainer() {
|
|
28
|
-
return Theme_1.instance || document.body;
|
|
29
|
-
}
|
|
30
|
-
connectedCallback() {
|
|
31
|
-
super.connectedCallback();
|
|
32
|
-
window.addEventListener("message", (e) => this.receiveMessage(e), false);
|
|
33
|
-
window.dispatchEvent(new CustomEvent("SonicThemeReady"));
|
|
34
|
-
this.postCSSVars();
|
|
35
|
-
}
|
|
36
|
-
postCSSVars() {
|
|
37
|
-
const stylesheets = document.styleSheets;
|
|
38
|
-
const ssLength = stylesheets.length;
|
|
39
|
-
const fontUrls = [];
|
|
40
|
-
for (let i = 0; i < ssLength; i++) {
|
|
41
|
-
const ss = stylesheets[i];
|
|
42
|
-
if (ss.href && (ss.href.includes("googleapis") || ss.href.includes("typekit.net")))
|
|
43
|
-
fontUrls.push(ss.href);
|
|
44
|
-
}
|
|
45
|
-
const theme = {
|
|
46
|
-
variables: this.getCssVariables(),
|
|
47
|
-
fonts: fontUrls,
|
|
48
|
-
};
|
|
49
|
-
PublisherManager.get("sonic-theme")?.set(theme);
|
|
50
|
-
document.querySelectorAll("iframe").forEach((elt) => elt.contentWindow?.postMessage({
|
|
51
|
-
type: "SonicTheme",
|
|
52
|
-
...theme,
|
|
53
|
-
}, "*"));
|
|
54
|
-
}
|
|
55
|
-
receiveMessage(event) {
|
|
56
|
-
const data = event.data;
|
|
57
|
-
if (!data.type || data.type != "GetSonicTheme")
|
|
58
|
-
return;
|
|
59
|
-
this.postCSSVars();
|
|
60
|
-
}
|
|
61
|
-
getCssVariables() {
|
|
62
|
-
const names = [];
|
|
63
|
-
const stylesheets = [...Theme_1.styles.map((s) => s.styleSheet), ...Array.from(document.styleSheets)];
|
|
64
|
-
for (const stylesheet of stylesheets) {
|
|
65
|
-
try {
|
|
66
|
-
if (!stylesheet)
|
|
67
|
-
continue;
|
|
68
|
-
const rules = stylesheet.cssRules;
|
|
69
|
-
for (const rule of rules) {
|
|
70
|
-
if (!("style" in rule))
|
|
71
|
-
continue;
|
|
72
|
-
const style = rule.style;
|
|
73
|
-
for (const name of style) {
|
|
74
|
-
if (names.includes(name) || name.indexOf("--sc") !== 0)
|
|
75
|
-
continue;
|
|
76
|
-
names.push(name);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch (e) {
|
|
81
|
-
console.log("Erreur lors de la récupération des variables CSS");
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
const style = window.getComputedStyle(this);
|
|
85
|
-
const result = {};
|
|
86
|
-
names.forEach((name) => (result[name] = style.getPropertyValue(name)));
|
|
87
|
-
return result;
|
|
88
|
-
}
|
|
89
|
-
render() {
|
|
90
|
-
return html `<slot></slot>`;
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
Theme.styles = [
|
|
94
|
-
light,
|
|
95
|
-
dark,
|
|
96
|
-
coreVariables,
|
|
97
|
-
css `
|
|
98
|
-
:host([color]) {
|
|
99
|
-
color: var(--sc-base-content);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
:host([font]) {
|
|
103
|
-
font-family: var(--sc-font-family-base), sans-serif;
|
|
104
|
-
font-weight: var(--sc-font-weight-base);
|
|
105
|
-
font-style: var(--sc-font-style-base);
|
|
106
|
-
}
|
|
107
|
-
`,
|
|
108
|
-
];
|
|
109
|
-
__decorate([
|
|
110
|
-
property({ type: String, reflect: true })
|
|
111
|
-
], Theme.prototype, "theme", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
property({ type: Boolean, reflect: true })
|
|
114
|
-
], Theme.prototype, "background", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
property({ type: Boolean, reflect: true })
|
|
117
|
-
], Theme.prototype, "color", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
property({ type: Boolean, reflect: true })
|
|
120
|
-
], Theme.prototype, "font", void 0);
|
|
121
|
-
Theme = Theme_1 = __decorate([
|
|
122
|
-
customElement(tagName)
|
|
123
|
-
], Theme);
|
|
124
|
-
export { Theme };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
import { Message } from "@supersoniks/concorde/la-billetterie/_types/swagger";
|
|
3
|
-
type APIResult = {
|
|
4
|
-
data?: object | string;
|
|
5
|
-
message?: string;
|
|
6
|
-
public_message?: string;
|
|
7
|
-
success?: boolean;
|
|
8
|
-
messages?: Message[];
|
|
9
|
-
status?: boolean;
|
|
10
|
-
};
|
|
11
|
-
declare const MessageSubscriber_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<APIResult>) & typeof LitElement;
|
|
12
|
-
export declare class MessageSubscriber extends MessageSubscriber_base {
|
|
13
|
-
_messages: Array<Message>;
|
|
14
|
-
get messages(): Message[];
|
|
15
|
-
set messages(value: Message[]);
|
|
16
|
-
render(): symbol;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,40 +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 { LitElement, nothing } from "lit";
|
|
8
|
-
import { customElement, property } from "lit/decorators.js";
|
|
9
|
-
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
10
|
-
import { SonicToast } from "@supersoniks/concorde/core/components/ui/toast/toast";
|
|
11
|
-
const tagName = "sonic-toast-message-subscriber";
|
|
12
|
-
//Superbe mix de multples versions d'api.
|
|
13
|
-
let MessageSubscriber = class MessageSubscriber extends Subscriber(LitElement, {}) {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this._messages = [];
|
|
17
|
-
}
|
|
18
|
-
get messages() {
|
|
19
|
-
return this._messages;
|
|
20
|
-
}
|
|
21
|
-
set messages(value) {
|
|
22
|
-
this._messages = value;
|
|
23
|
-
if (!this.messages)
|
|
24
|
-
return;
|
|
25
|
-
value.forEach((message) => {
|
|
26
|
-
if (message.type == "public")
|
|
27
|
-
SonicToast.add({ text: message.content || "", status: message.status });
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
render() {
|
|
31
|
-
return nothing;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
__decorate([
|
|
35
|
-
property({ type: Array })
|
|
36
|
-
], MessageSubscriber.prototype, "messages", null);
|
|
37
|
-
MessageSubscriber = __decorate([
|
|
38
|
-
customElement(tagName)
|
|
39
|
-
], MessageSubscriber);
|
|
40
|
-
export { MessageSubscriber };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { LitElement, nothing } from "lit";
|
|
2
|
-
import "@supersoniks/concorde/core/components/ui/toast/types";
|
|
3
|
-
import { ToastStatus } from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
4
|
-
export declare class SonicToastItem extends LitElement {
|
|
5
|
-
static styles: import("lit").CSSResult[];
|
|
6
|
-
title: string;
|
|
7
|
-
id: string;
|
|
8
|
-
text: string;
|
|
9
|
-
status: ToastStatus;
|
|
10
|
-
ghost: boolean;
|
|
11
|
-
preserve: boolean;
|
|
12
|
-
dismissForever: boolean;
|
|
13
|
-
maxHeight: string;
|
|
14
|
-
visible: boolean;
|
|
15
|
-
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
16
|
-
hide(): void;
|
|
17
|
-
show(): void;
|
|
18
|
-
autoHide(): void;
|
|
19
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { LitElement, nothing } from "lit";
|
|
2
|
-
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
-
import "@supersoniks/concorde/core/components/ui/toast/toast-item";
|
|
4
|
-
import { Toast } from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
5
|
-
export declare class SonicToast extends LitElement {
|
|
6
|
-
toasts: Toast[];
|
|
7
|
-
static delegateToasts: boolean;
|
|
8
|
-
createRenderRoot(): this;
|
|
9
|
-
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
10
|
-
static removeAll(): void;
|
|
11
|
-
static instance?: SonicToast;
|
|
12
|
-
static getInstance(): SonicToast;
|
|
13
|
-
static add(conf: Toast): {
|
|
14
|
-
id: string | number;
|
|
15
|
-
text: string;
|
|
16
|
-
title: string | undefined;
|
|
17
|
-
status: import("@supersoniks/concorde/core/components/ui/toast/types").ToastStatus;
|
|
18
|
-
preserve: boolean | undefined;
|
|
19
|
-
ghost: boolean | undefined;
|
|
20
|
-
dismissForever: boolean | undefined;
|
|
21
|
-
} | null | undefined;
|
|
22
|
-
static handleExistingToastDelegation(): void;
|
|
23
|
-
static removeItem(toastToRemove?: Toast): void;
|
|
24
|
-
removeItem(toastToRemove?: Toast): void;
|
|
25
|
-
}
|
|
@@ -1,226 +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
|
-
var SonicToast_1;
|
|
8
|
-
import { html, LitElement, nothing } from "lit";
|
|
9
|
-
import { customElement, property } from "lit/decorators.js";
|
|
10
|
-
import { repeat } from "lit/directives/repeat.js";
|
|
11
|
-
import { animate } from "@lit-labs/motion";
|
|
12
|
-
import Objects from "@supersoniks/concorde/core/utils/Objects";
|
|
13
|
-
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
14
|
-
import { ifDefined } from "lit/directives/if-defined.js";
|
|
15
|
-
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
16
|
-
import { styleMap } from "lit/directives/style-map.js";
|
|
17
|
-
import "@supersoniks/concorde/core/components/ui/toast/toast-item";
|
|
18
|
-
import { Theme } from "@supersoniks/concorde/core/components/ui/theme/theme";
|
|
19
|
-
const tagName = "sonic-toast";
|
|
20
|
-
let SonicToast = SonicToast_1 = class SonicToast extends LitElement {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
this.toasts = [];
|
|
24
|
-
}
|
|
25
|
-
createRenderRoot() {
|
|
26
|
-
return this;
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
29
|
-
const isIframe = !(window.parent == window);
|
|
30
|
-
let styles = {
|
|
31
|
-
pointerEvents: "none",
|
|
32
|
-
gap: "1rem",
|
|
33
|
-
display: "flex",
|
|
34
|
-
margin: "1rem",
|
|
35
|
-
};
|
|
36
|
-
if (!isIframe) {
|
|
37
|
-
styles = {
|
|
38
|
-
...styles,
|
|
39
|
-
margin: "0",
|
|
40
|
-
width: "calc(100% - 2.5rem)",
|
|
41
|
-
position: "fixed",
|
|
42
|
-
bottom: "1.25rem",
|
|
43
|
-
right: "1.25rem",
|
|
44
|
-
zIndex: "10000",
|
|
45
|
-
maxWidth: "64ch",
|
|
46
|
-
flexDirection: "column-reverse",
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
// ${window.parent == window ? "fixed-area" : ""}
|
|
50
|
-
SonicToast_1.handleExistingToastDelegation();
|
|
51
|
-
if (!this.toasts)
|
|
52
|
-
return nothing;
|
|
53
|
-
return html `<div aria-live="polite" style=${styleMap(styles)}>
|
|
54
|
-
${repeat(this.toasts, (item) => item.id, (item) => html `
|
|
55
|
-
<sonic-toast-item
|
|
56
|
-
maxHeight=${isIframe ? "none" : "10rem"}
|
|
57
|
-
status=${ifDefined(item.status)}
|
|
58
|
-
title=${ifDefined(item.title)}
|
|
59
|
-
?ghost=${item.ghost}
|
|
60
|
-
?dismissForever=${item.dismissForever}
|
|
61
|
-
?preserve=${item.preserve}
|
|
62
|
-
id=${ifDefined(item.id)}
|
|
63
|
-
@hide=${() => this.removeItem(item)}
|
|
64
|
-
${animate({
|
|
65
|
-
keyframeOptions: {
|
|
66
|
-
duration: 250,
|
|
67
|
-
easing: `cubic-bezier(0.250, 0.250, 0.420, 1.225)`,
|
|
68
|
-
},
|
|
69
|
-
in: [{ transform: "translateY(0) scale(1.25)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }],
|
|
70
|
-
out: [
|
|
71
|
-
{
|
|
72
|
-
transform: "scale(.90) ",
|
|
73
|
-
opacity: 0,
|
|
74
|
-
duration: 3000,
|
|
75
|
-
easing: `ease-in-out`,
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
stabilizeOut: true,
|
|
79
|
-
})}
|
|
80
|
-
>
|
|
81
|
-
<!-- Le texte est passé dans le slot et non pas en propriété pour contrer des problèmatiques de shadow-dom et d'appel exterieur (exemple: fancybox) -->
|
|
82
|
-
${item.text ? unsafeHTML(item.text) : ""}
|
|
83
|
-
</sonic-toast-item>
|
|
84
|
-
`)}
|
|
85
|
-
</div>`;
|
|
86
|
-
}
|
|
87
|
-
static removeAll() {
|
|
88
|
-
if (SonicToast_1.delegateToasts) {
|
|
89
|
-
SonicToast_1.handleExistingToastDelegation();
|
|
90
|
-
window.parent.postMessage({ type: "removeAllToasts" }, "*");
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const toastComponent = SonicToast_1.getInstance();
|
|
94
|
-
if (!toastComponent)
|
|
95
|
-
return;
|
|
96
|
-
toastComponent.toasts = toastComponent.toasts.filter((item) => item.ghost);
|
|
97
|
-
}
|
|
98
|
-
static getInstance() {
|
|
99
|
-
if (SonicToast_1.instance)
|
|
100
|
-
return SonicToast_1.instance;
|
|
101
|
-
SonicToast_1.instance = document.createElement("sonic-toast");
|
|
102
|
-
Theme.getPopContainer().prepend(SonicToast_1.instance);
|
|
103
|
-
return SonicToast_1.instance;
|
|
104
|
-
}
|
|
105
|
-
static add(conf) {
|
|
106
|
-
if (SonicToast_1.delegateToasts) {
|
|
107
|
-
SonicToast_1.handleExistingToastDelegation();
|
|
108
|
-
window.parent.postMessage({ type: "addToast", toast: conf }, "*");
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
// Init toast area si absente (au <sonic-theme> ou <body< à défaut)
|
|
112
|
-
const toastComponent = SonicToast_1.getInstance();
|
|
113
|
-
// Ajoute le toast à la liste
|
|
114
|
-
const nextId = conf.id ?? new Date().valueOf();
|
|
115
|
-
const interactiveRegExp = new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>");
|
|
116
|
-
const hasInteractive = interactiveRegExp.test(conf.text);
|
|
117
|
-
const currentToast = {
|
|
118
|
-
id: nextId,
|
|
119
|
-
text: conf.text,
|
|
120
|
-
title: conf.title,
|
|
121
|
-
status: conf.status,
|
|
122
|
-
preserve: hasInteractive ? true : conf.preserve,
|
|
123
|
-
ghost: conf.ghost,
|
|
124
|
-
dismissForever: conf.dismissForever,
|
|
125
|
-
};
|
|
126
|
-
// check if the toast is dismissed
|
|
127
|
-
if (conf.dismissForever && conf.id) {
|
|
128
|
-
const dismissed = localStorage.getItem("sonic-toast-dismissed") || "{}";
|
|
129
|
-
const dismissedObj = JSON.parse(dismissed);
|
|
130
|
-
if (dismissedObj[conf.id]) {
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
if (toastComponent?.toasts.length) {
|
|
135
|
-
const toastA = { ...currentToast };
|
|
136
|
-
for (const toast of toastComponent.toasts) {
|
|
137
|
-
const toastB = { ...toast };
|
|
138
|
-
toastA.id = toastB.id = 0;
|
|
139
|
-
if ( /*!currentToast.preserve && */Objects.shallowEqual(toastA, toastB)) {
|
|
140
|
-
return null;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
if (toastComponent) {
|
|
145
|
-
toastComponent.toasts = [...toastComponent.toasts, currentToast];
|
|
146
|
-
}
|
|
147
|
-
return currentToast;
|
|
148
|
-
}
|
|
149
|
-
static handleExistingToastDelegation() {
|
|
150
|
-
if (!this.delegateToasts)
|
|
151
|
-
return;
|
|
152
|
-
const toastComponent = SonicToast_1.getInstance();
|
|
153
|
-
window.parent.postMessage({ type: "addToasts", toasts: toastComponent.toasts }, "*");
|
|
154
|
-
toastComponent.toasts = [];
|
|
155
|
-
}
|
|
156
|
-
static removeItem(toastToRemove) {
|
|
157
|
-
if (SonicToast_1.delegateToasts) {
|
|
158
|
-
SonicToast_1.handleExistingToastDelegation();
|
|
159
|
-
window.parent.postMessage({ type: "removeToast", toast: toastToRemove }, "*");
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
const toastComponent = SonicToast_1.getInstance();
|
|
163
|
-
if (!toastComponent)
|
|
164
|
-
return;
|
|
165
|
-
toastComponent.removeItem(toastToRemove);
|
|
166
|
-
}
|
|
167
|
-
// Remove Toast
|
|
168
|
-
removeItem(toastToRemove) {
|
|
169
|
-
if (!toastToRemove)
|
|
170
|
-
return;
|
|
171
|
-
this.toasts = this.toasts.filter((toast) => {
|
|
172
|
-
toast = { ...toast };
|
|
173
|
-
delete toast.id;
|
|
174
|
-
return !Objects.shallowEqual(toast, toastToRemove, false);
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
SonicToast.delegateToasts = false;
|
|
179
|
-
__decorate([
|
|
180
|
-
property({ type: Array })
|
|
181
|
-
], SonicToast.prototype, "toasts", void 0);
|
|
182
|
-
SonicToast = SonicToast_1 = __decorate([
|
|
183
|
-
customElement(tagName)
|
|
184
|
-
], SonicToast);
|
|
185
|
-
export { SonicToast };
|
|
186
|
-
if (typeof window !== "undefined") {
|
|
187
|
-
window.SonicToast = SonicToast;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Handles the context of iframes and performs necessary actions based on received messages.
|
|
191
|
-
*/
|
|
192
|
-
function handleIframeContexts() {
|
|
193
|
-
const onPostMessage = (e) => {
|
|
194
|
-
if (e.data.type == "querySonicToastAvailability") {
|
|
195
|
-
e.source.postMessage({ type: "sonicToastAvailable" }, "*");
|
|
196
|
-
}
|
|
197
|
-
if (e.data.type == "sonicToastAvailable") {
|
|
198
|
-
SonicToast.delegateToasts = true;
|
|
199
|
-
SonicToast.handleExistingToastDelegation();
|
|
200
|
-
}
|
|
201
|
-
if (e.data.type == "addToasts") {
|
|
202
|
-
SonicToast.getInstance().toasts = [...SonicToast.getInstance().toasts, ...e.data.toasts];
|
|
203
|
-
}
|
|
204
|
-
if (e.data.type == "removeAllToasts") {
|
|
205
|
-
SonicToast.removeAll();
|
|
206
|
-
}
|
|
207
|
-
if (e.data.type == "removeToast") {
|
|
208
|
-
SonicToast.removeItem(e.data.toast);
|
|
209
|
-
}
|
|
210
|
-
if (e.data.type == "addToast") {
|
|
211
|
-
SonicToast.add(e.data.toast);
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
const isIframe = !(window.parent == window);
|
|
215
|
-
window.addEventListener("message", onPostMessage, false);
|
|
216
|
-
if (isIframe) {
|
|
217
|
-
window.parent.postMessage({ type: "querySonicToastAvailability" }, "*");
|
|
218
|
-
}
|
|
219
|
-
// tell iframes that sonic-toast is available
|
|
220
|
-
if (!isIframe) {
|
|
221
|
-
for (const iframe of document.querySelectorAll("iframe")) {
|
|
222
|
-
iframe.contentWindow?.postMessage({ type: "sonicToastAvailable" }, "*");
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
handleIframeContexts();
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Message } from "@supersoniks/concorde/la-billetterie/_types/swagger";
|
|
2
|
-
export type ToastStatus = Message["status"] | "" | "success";
|
|
3
|
-
export type Toast = {
|
|
4
|
-
id?: string | number;
|
|
5
|
-
text: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
status?: ToastStatus;
|
|
8
|
-
preserve?: boolean;
|
|
9
|
-
ghost?: boolean;
|
|
10
|
-
dismissForever?: boolean;
|
|
11
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
export declare class Tooltip extends LitElement {
|
|
3
|
-
static styles: import("lit").CSSResult[];
|
|
4
|
-
label: string;
|
|
5
|
-
placement?: "top" | "top-start" | "top-end" | "bottom" | "left" | "right";
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
focusable: boolean;
|
|
8
|
-
connectedCallback(): void;
|
|
9
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import "./theme/theme";
|
|
2
|
-
import "./badge/badge";
|
|
3
|
-
import "./button/button";
|
|
4
|
-
import "./link/link";
|
|
5
|
-
import "./progress/progress";
|
|
6
|
-
import "./form/input/input";
|
|
7
|
-
import "./form/input-autocomplete/input-autocomplete";
|
|
8
|
-
import "./form/input/password-helper";
|
|
9
|
-
import "./form/input/same-value-helper";
|
|
10
|
-
import "./form/checkbox/checkbox";
|
|
11
|
-
import "./form/radio/radio";
|
|
12
|
-
import "./form/select/select";
|
|
13
|
-
import "./form/textarea/textarea";
|
|
14
|
-
import "./form/fieldset/fieldset";
|
|
15
|
-
import "./form/fieldset/legend";
|
|
16
|
-
import "./form/form-layout/form-layout";
|
|
17
|
-
import "./form/form-actions/form-actions";
|
|
18
|
-
import "./group/group";
|
|
19
|
-
import "./icon/icon";
|
|
20
|
-
import "./image/image";
|
|
21
|
-
import "./loader/loader";
|
|
22
|
-
import "./menu/menu";
|
|
23
|
-
import "./modal/modal";
|
|
24
|
-
import "./alert/alert";
|
|
25
|
-
import "./toast/toast";
|
|
26
|
-
import "./toast/message-subscriber";
|
|
27
|
-
import "./tooltip/tooltip";
|
|
28
|
-
import "./pop/pop";
|
|
29
|
-
import "./divider/divider";
|
|
30
|
-
import "./card/card";
|
|
31
|
-
import "./table/table";
|
|
32
|
-
import "./captcha/captcha";
|
package/core/core.d.ts
DELETED
package/core/core.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import "./components/functional/functional";
|
|
2
|
-
import "./components/ui/ui";
|
|
3
|
-
import "./mixins/mixins";
|
|
4
|
-
import "./utils/url-pattern";
|
|
5
|
-
import { PublisherManager } from "@supersoniks/concorde/core/utils/PublisherProxy";
|
|
6
|
-
import DataBindObserver from "./utils/DataBindObserver";
|
|
7
|
-
if (!window.SonicPublisherManager)
|
|
8
|
-
window.SonicPublisherManager = PublisherManager;
|
|
9
|
-
if (!window.SonicDataBindObserver)
|
|
10
|
-
window.SonicDataBindObserver = DataBindObserver;
|
|
11
|
-
window.queueMicrotask =
|
|
12
|
-
window.queueMicrotask ||
|
|
13
|
-
function (callback) {
|
|
14
|
-
Promise.resolve()
|
|
15
|
-
.then(callback)
|
|
16
|
-
.catch((e) => setTimeout(() => {
|
|
17
|
-
throw e;
|
|
18
|
-
}));
|
|
19
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function bind(path: string): (target: unknown, propertyKey: string) => void;
|
|
2
|
-
export declare function onAssign(...values: Array<string>): (target: unknown, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
3
|
-
export declare function autoSubscribe(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
4
|
-
export declare function autoFill(values: string[]): (target: unknown) => void;
|