@supersoniks/concorde 1.1.42 → 1.1.44

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.
Files changed (189) hide show
  1. package/components.js +2 -3
  2. package/concorde-core.bundle.js +37 -35
  3. package/concorde-core.es.js +5283 -4453
  4. package/core/_types/types.d.ts +31 -0
  5. package/core/_types/types.js +2 -0
  6. package/core/components/functional/date/date.d.ts +13 -5
  7. package/core/components/functional/date/date.js +57 -38
  8. package/core/components/functional/example/example.d.ts +1 -1
  9. package/core/components/functional/example/example.js +1 -1
  10. package/core/components/functional/fetch/fetch.d.ts +45 -6
  11. package/core/components/functional/fetch/fetch.js +2 -6
  12. package/core/components/functional/functional.d.ts +2 -0
  13. package/core/components/functional/functional.js +2 -0
  14. package/core/components/functional/if/if.d.ts +3 -0
  15. package/core/components/functional/if/if.js +6 -12
  16. package/core/components/functional/if/if.test.d.ts +1 -0
  17. package/core/components/functional/if/if.test.js +44 -0
  18. package/core/components/functional/list/list.d.ts +44 -12
  19. package/core/components/functional/list/list.js +54 -49
  20. package/core/components/functional/mix/mix.d.ts +22 -0
  21. package/core/components/functional/mix/mix.js +102 -0
  22. package/core/components/functional/queue/queue.d.ts +27 -5
  23. package/core/components/functional/queue/queue.js +88 -26
  24. package/core/components/functional/router/redirect.d.ts +11 -2
  25. package/core/components/functional/router/redirect.js +7 -12
  26. package/core/components/functional/router/router.d.ts +15 -1
  27. package/core/components/functional/router/router.js +11 -16
  28. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +1 -2
  29. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +56 -45
  30. package/core/components/functional/sdui/default-library.json +108 -0
  31. package/core/components/functional/sdui/sdui-utils.d.ts +5 -0
  32. package/core/components/functional/sdui/sdui-utils.js +63 -0
  33. package/core/components/functional/sdui/sdui.d.ts +21 -13
  34. package/core/components/functional/sdui/sdui.js +70 -44
  35. package/core/components/functional/sdui/types.d.ts +10 -8
  36. package/core/components/functional/states/states.d.ts +20 -4
  37. package/core/components/functional/states/states.js +15 -20
  38. package/core/components/functional/submit/submit.d.ts +16 -1
  39. package/core/components/functional/submit/submit.js +95 -25
  40. package/core/components/functional/subscriber/subscriber.d.ts +4 -1
  41. package/core/components/functional/subscriber/subscriber.js +1 -6
  42. package/core/components/functional/value/value.d.ts +7 -0
  43. package/core/components/functional/value/value.js +26 -0
  44. package/core/components/ui/_css/scroll.js +6 -7
  45. package/core/components/ui/_css/size.d.ts +1 -0
  46. package/core/components/ui/_css/size.js +3 -1
  47. package/core/components/ui/alert/alert.d.ts +2 -2
  48. package/core/components/ui/alert/alert.js +11 -16
  49. package/core/components/ui/badge/badge.d.ts +3 -1
  50. package/core/components/ui/badge/badge.js +36 -22
  51. package/core/components/ui/button/button.d.ts +28 -23
  52. package/core/components/ui/button/button.js +60 -43
  53. package/core/components/ui/captcha/captcha.d.ts +14 -2
  54. package/core/components/ui/captcha/captcha.js +18 -13
  55. package/core/components/ui/card/card-footer.js +1 -8
  56. package/core/components/ui/card/card-header-descripton.js +3 -9
  57. package/core/components/ui/card/card-header.js +6 -7
  58. package/core/components/ui/card/card-main.js +0 -5
  59. package/core/components/ui/card/card.d.ts +1 -1
  60. package/core/components/ui/card/card.js +30 -12
  61. package/core/components/ui/divider/divider.d.ts +2 -0
  62. package/core/components/ui/divider/divider.js +43 -16
  63. package/core/components/ui/form/checkbox/checkbox.d.ts +86 -25
  64. package/core/components/ui/form/checkbox/checkbox.js +53 -28
  65. package/core/components/ui/form/css/form-control.d.ts +2 -0
  66. package/core/components/ui/form/css/form-control.js +145 -67
  67. package/core/components/ui/form/fieldset/fieldset.d.ts +8 -1
  68. package/core/components/ui/form/fieldset/fieldset.js +45 -8
  69. package/core/components/ui/form/fieldset/legend-description.js +0 -5
  70. package/core/components/ui/form/fieldset/legend.js +3 -6
  71. package/core/components/ui/form/form-actions/form-actions.d.ts +2 -0
  72. package/core/components/ui/form/form-actions/form-actions.js +26 -11
  73. package/core/components/ui/form/form-layout/form-layout.d.ts +5 -2
  74. package/core/components/ui/form/form-layout/form-layout.js +31 -9
  75. package/core/components/ui/form/input/input.d.ts +26 -24
  76. package/core/components/ui/form/input/input.js +87 -52
  77. package/core/components/ui/form/input/password-helper.d.ts +1 -1
  78. package/core/components/ui/form/input/password-helper.js +4 -3
  79. package/core/components/ui/form/input/same-value-helper.d.ts +1 -1
  80. package/core/components/ui/form/input/same-value-helper.js +3 -2
  81. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +2 -3
  82. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +2 -6
  83. package/core/components/ui/form/radio/radio.d.ts +6 -0
  84. package/core/components/ui/form/radio/radio.js +7 -12
  85. package/core/components/ui/form/select/select.d.ts +25 -8
  86. package/core/components/ui/form/select/select.js +72 -41
  87. package/core/components/ui/form/textarea/textarea.d.ts +21 -19
  88. package/core/components/ui/form/textarea/textarea.js +29 -36
  89. package/core/components/ui/group/group.d.ts +11 -1
  90. package/core/components/ui/group/group.js +79 -17
  91. package/core/components/ui/icon/icon.d.ts +10 -3
  92. package/core/components/ui/icon/icon.js +16 -15
  93. package/core/components/ui/icon/icons.js +25 -20
  94. package/core/components/ui/icon/icons.json +1 -1
  95. package/core/components/ui/image/image.js +0 -5
  96. package/core/components/ui/link/link.d.ts +1 -1
  97. package/core/components/ui/link/link.js +2 -6
  98. package/core/components/ui/loader/loader.d.ts +1 -1
  99. package/core/components/ui/loader/loader.js +3 -9
  100. package/core/components/ui/menu/menu-item.js +4 -9
  101. package/core/components/ui/menu/menu.d.ts +9 -1
  102. package/core/components/ui/menu/menu.js +182 -27
  103. package/core/components/ui/modal/modal-actions.js +1 -6
  104. package/core/components/ui/modal/modal-close.d.ts +1 -0
  105. package/core/components/ui/modal/modal-close.js +14 -10
  106. package/core/components/ui/modal/modal-content.js +0 -5
  107. package/core/components/ui/modal/modal-subtitle.js +2 -6
  108. package/core/components/ui/modal/modal-title.js +0 -5
  109. package/core/components/ui/modal/modal.d.ts +7 -7
  110. package/core/components/ui/modal/modal.js +37 -37
  111. package/core/components/ui/pop/pop.d.ts +6 -5
  112. package/core/components/ui/pop/pop.js +57 -57
  113. package/core/components/ui/progress/progress.js +34 -32
  114. package/core/components/ui/table/table-caption.js +5 -10
  115. package/core/components/ui/table/table-tbody.js +10 -14
  116. package/core/components/ui/table/table-td.d.ts +2 -0
  117. package/core/components/ui/table/table-td.js +8 -5
  118. package/core/components/ui/table/table-tfoot.js +5 -7
  119. package/core/components/ui/table/table-th.d.ts +2 -0
  120. package/core/components/ui/table/table-th.js +12 -9
  121. package/core/components/ui/table/table-thead.js +1 -6
  122. package/core/components/ui/table/table-tr.js +4 -6
  123. package/core/components/ui/table/table.d.ts +0 -3
  124. package/core/components/ui/table/table.js +14 -31
  125. package/core/components/ui/theme/theme-collection/core-variables.js +13 -11
  126. package/core/components/ui/theme/theme-collection/dark.js +1 -1
  127. package/core/components/ui/theme/theme.d.ts +1 -6
  128. package/core/components/ui/theme/theme.js +19 -46
  129. package/core/components/ui/toast/message-subscriber.d.ts +16 -7
  130. package/core/components/ui/toast/message-subscriber.js +10 -8
  131. package/core/components/ui/toast/toast-item.js +1 -1
  132. package/core/components/ui/toast/toast.d.ts +3 -2
  133. package/core/components/ui/toast/toast.js +33 -19
  134. package/core/components/ui/toast/types.d.ts +3 -2
  135. package/core/components/ui/tooltip/tooltip.d.ts +1 -0
  136. package/core/components/ui/tooltip/tooltip.js +36 -15
  137. package/core/components/ui/ui.d.ts +1 -1
  138. package/core/components/ui/ui.js +1 -4
  139. package/core/core.js +5 -6
  140. package/core/mixins/Fetcher.d.ts +20 -13
  141. package/core/mixins/Fetcher.js +44 -19
  142. package/core/mixins/FormCheckable.d.ts +25 -13
  143. package/core/mixins/FormCheckable.js +180 -23
  144. package/core/mixins/FormElement.d.ts +17 -9
  145. package/core/mixins/FormElement.js +56 -39
  146. package/core/mixins/FormInput.d.ts +22 -12
  147. package/core/mixins/FormInput.js +4 -3
  148. package/core/mixins/Subscriber.d.ts +12 -8
  149. package/core/mixins/Subscriber.js +51 -48
  150. package/core/mixins/TemplatesContainer.d.ts +2 -1
  151. package/core/mixins/TemplatesContainer.js +2 -2
  152. package/core/utils/Arrays.d.ts +15 -15
  153. package/core/utils/Arrays.js +12 -9
  154. package/core/utils/DataBindObserver.d.ts +18 -11
  155. package/core/utils/DataBindObserver.js +47 -54
  156. package/core/utils/Electron.d.ts +5 -1
  157. package/core/utils/Electron.js +4 -2
  158. package/core/utils/HTML.d.ts +9 -2
  159. package/core/utils/HTML.js +24 -5
  160. package/core/utils/LocationHandler.d.ts +6 -5
  161. package/core/utils/LocationHandler.js +27 -16
  162. package/core/utils/Objects.d.ts +7 -4
  163. package/core/utils/Objects.js +37 -9
  164. package/core/utils/{PublisherProxy.d.mts → PublisherProxy.d.ts} +49 -34
  165. package/core/utils/{PublisherProxy.mjs → PublisherProxy.js} +107 -77
  166. package/core/utils/Utils.d.ts +3 -0
  167. package/core/utils/Utils.js +18 -0
  168. package/core/utils/api.d.ts +26 -9
  169. package/core/utils/api.js +62 -45
  170. package/img/concorde-logo.svg +1 -0
  171. package/img/concorde.png +0 -0
  172. package/img/concorde_def.png +0 -0
  173. package/mixins.d.ts +53 -29
  174. package/mixins.js +3 -4
  175. package/package.json +51 -12
  176. package/svg/regular/plane.svg +1 -0
  177. package/svg/solid/plane.svg +1 -0
  178. package/test-utils/TestUtils.d.ts +4 -0
  179. package/test-utils/TestUtils.js +12 -0
  180. package/utils.d.ts +3 -1
  181. package/utils.js +7 -5
  182. package/core/components/functional/configuration/configuration.d.ts +0 -5
  183. package/core/components/functional/configuration/configuration.js +0 -22
  184. package/core/components/ui/tabs/tab.d.ts +0 -6
  185. package/core/components/ui/tabs/tab.js +0 -46
  186. package/core/components/ui/tabs/tabs.d.ts +0 -15
  187. package/core/components/ui/tabs/tabs.js +0 -129
  188. package/core/components/ui/taxonomy/taxonomy.d.ts +0 -41
  189. package/core/components/ui/taxonomy/taxonomy.js +0 -115
@@ -1,129 +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, query } from "lit/decorators.js";
9
- import { ResizeController } from "@lit-labs/observers/resize_controller.js";
10
- let Tabs = class Tabs extends LitElement {
11
- constructor() {
12
- super(...arguments);
13
- this.size = "md";
14
- this.direction = "column";
15
- this.icon = false;
16
- this.moreShape = "circle";
17
- this._resizeController = new ResizeController(this, {});
18
- }
19
- updated(_changedProperties) {
20
- super.updated(_changedProperties);
21
- this._setChildrenSize();
22
- }
23
- firstUpdated() {
24
- const tabsMenu = this.menu;
25
- let isDown = false;
26
- let startX;
27
- let scrollLeft;
28
- tabsMenu.addEventListener("mousedown", (e) => {
29
- isDown = true;
30
- tabsMenu.classList.add("active");
31
- startX = e.pageX - tabsMenu.offsetLeft;
32
- scrollLeft = tabsMenu.scrollLeft;
33
- });
34
- tabsMenu.addEventListener("mouseleave", () => {
35
- isDown = false;
36
- tabsMenu.classList.remove("active");
37
- });
38
- tabsMenu.addEventListener("mouseup", () => {
39
- isDown = false;
40
- tabsMenu.classList.remove("active");
41
- });
42
- tabsMenu.addEventListener("mousemove", (e) => {
43
- if (!isDown)
44
- return;
45
- e.preventDefault();
46
- const x = e.pageX - tabsMenu.offsetLeft;
47
- const walk = (x - startX) * 1.5; //scroll-fast
48
- tabsMenu.scrollLeft = scrollLeft - walk;
49
- });
50
- }
51
- _setChildrenSize() {
52
- if (this.size) {
53
- const children = this.querySelectorAll("sonic-button, sonic-tabs-item");
54
- children.forEach((elt) => {
55
- if (!elt.hasAttribute("size")) {
56
- elt.setAttribute("size", this.size);
57
- }
58
- });
59
- }
60
- }
61
- render() {
62
- return html `<menu part="tabs"
63
- ><slot></slot>
64
- <sonic-pop class="flex" >
65
- <sonic-menu-item shape="square">
66
- <sonic-icon class="my-auto" size="xl" name="more-vert"></sonic-icon>
67
- </sonic-menu-item>
68
- <sonic-menu slot="content"></sonic-menu>
69
- </sonic-pop>
70
- </menu>`;
71
- }
72
- };
73
- Tabs.styles = [
74
- css `
75
- :host {
76
- display: block;
77
- }
78
-
79
- menu::-webkit-scrollbar {
80
- display: none;
81
- }
82
-
83
- menu {
84
- -ms-overflow-style: none;
85
- scrollbar-width: none;
86
- overflow-x: scroll;
87
- display: flex;
88
- max-width: 100%;
89
- flex-direction: row;
90
- padding: 0.5em;
91
- margin: 0;
92
- gap: 0.15rem;
93
- }
94
-
95
- :host([icon]) {
96
- --sc-icon-size: 1.6em;
97
- }
98
-
99
- :host([icon]) ::slotted(sonic-tab) {
100
- font-size: 85em;
101
- border: 7px solid;
102
- text-transform: uppercase;
103
- }
104
- `,
105
- ];
106
- __decorate([
107
- property({ type: String, reflect: true })
108
- ], Tabs.prototype, "size", void 0);
109
- __decorate([
110
- property({ type: String, reflect: true })
111
- ], Tabs.prototype, "direction", void 0);
112
- __decorate([
113
- property({ type: Boolean })
114
- ], Tabs.prototype, "icon", void 0);
115
- __decorate([
116
- property({ type: String })
117
- ], Tabs.prototype, "moreShape", void 0);
118
- __decorate([
119
- query("menu")
120
- ], Tabs.prototype, "menu", void 0);
121
- Tabs = __decorate([
122
- customElement("sonic-tabs")
123
- ], Tabs);
124
- export { Tabs };
125
- //Ajout pour la creation du cem notamment pour Storybook
126
- try {
127
- customElements.define("sonic-tabs", Tabs);
128
- }
129
- catch (e) { }
@@ -1,41 +0,0 @@
1
- import { LitElement, nothing } from "lit";
2
- import "@supersoniks/concorde/core/components/ui/icon/icon";
3
- import "@supersoniks/concorde/core/components/ui/badge/badge";
4
- /**
5
- * Le composant taxonomy crée un badge (*sonic-badge*) contenant une liste de termes préfixés par une icone (*sonic-icon*) optionelle séparées par une chaine html séparatrice (*separator*)
6
- */
7
- export declare class Taxonomy extends LitElement {
8
- static styles: import("lit").CSSResult;
9
- /**
10
- * Identifiant d'icone passé en interne au composant *sonic-icon*
11
- */
12
- icon: any;
13
- /**
14
- * Tableau d'objets de la forme :{*key*_name:*"Une taxonomie"*} ou *key* correspond à la valeur fournie à la propriété *key*.
15
- * Dans ce cas *"une taxonomie"* sera un des termes affiches dans le composant.
16
- */
17
- taxonomy: never[];
18
- /**
19
- * Chaque terme sera séparé par la valeur contenue dans cette propriété
20
- */
21
- separator: string;
22
- /**
23
- * La clée utilisé pour extraire le terme de la donnée. (voir la propriété *taxonomy*)
24
- */
25
- key: string;
26
- /**
27
- * Le type change surtout la couleur composant : voir *Badge*, *Button*
28
- */
29
- type: "primary" | "warning" | "danger" | "success" | "info" | "default";
30
- /**
31
- * Le composant par defaut sans se paramètre à forte afordance
32
- * * gost : composant super léger visuellement
33
- * * outline : composant légé avec une bordure
34
- */
35
- variant: "default" | "outline";
36
- /**
37
- * Taille du composant, implique notamment des modifications de typo et de marge interne
38
- */
39
- size: "md" | "xs" | "sm" | "lg";
40
- render(): import("lit-html").TemplateResult<1> | typeof nothing;
41
- }
@@ -1,115 +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
- import { repeat } from "lit/directives/repeat.js";
10
- import "@supersoniks/concorde/core/components/ui/icon/icon";
11
- import "@supersoniks/concorde/core/components/ui/badge/badge";
12
- import { unsafeHTML } from "lit/directives/unsafe-html.js";
13
- import { ifDefined } from "lit/directives/if-defined.js";
14
- const tagName = "sonic-taxonomy";
15
- /**
16
- * Le composant taxonomy crée un badge (*sonic-badge*) contenant une liste de termes préfixés par une icone (*sonic-icon*) optionelle séparées par une chaine html séparatrice (*separator*)
17
- */
18
- let Taxonomy = class Taxonomy extends LitElement {
19
- constructor() {
20
- super(...arguments);
21
- /**
22
- * Identifiant d'icone passé en interne au composant *sonic-icon*
23
- */
24
- this.icon = {};
25
- /**
26
- * Tableau d'objets de la forme :{*key*_name:*"Une taxonomie"*} ou *key* correspond à la valeur fournie à la propriété *key*.
27
- * Dans ce cas *"une taxonomie"* sera un des termes affiches dans le composant.
28
- */
29
- this.taxonomy = [];
30
- /**
31
- * Chaque terme sera séparé par la valeur contenue dans cette propriété
32
- */
33
- this.separator = ",&nbsp;";
34
- /**
35
- * La clée utilisé pour extraire le terme de la donnée. (voir la propriété *taxonomy*)
36
- */
37
- this.key = "";
38
- /**
39
- * Le type change surtout la couleur composant : voir *Badge*, *Button*
40
- */
41
- this.type = "default";
42
- /**
43
- * Le composant par defaut sans se paramètre à forte afordance
44
- * * gost : composant super léger visuellement
45
- * * outline : composant légé avec une bordure
46
- */
47
- this.variant = "default";
48
- /**
49
- * Taille du composant, implique notamment des modifications de typo et de marge interne
50
- */
51
- this.size = "md";
52
- }
53
- render() {
54
- if (!this.taxonomy)
55
- return nothing;
56
- let key = this.key + "_display";
57
- let taxo = this.taxonomy.filter((elt) => elt != null && (elt[key] === true || elt[key] == "1" || !elt.hasOwnProperty(key)));
58
- if (taxo.length === 0) {
59
- this.style.display = "none";
60
- return nothing;
61
- }
62
- this.style.removeProperty("display");
63
- return html `
64
- <sonic-badge type=${this.type} variant=${this.variant} size=${this.size}>
65
- <sonic-icon slot="prefix" library=${ifDefined(this.icon.library)} prefix=${ifDefined(this.icon.prefix)} name=${ifDefined(this.icon.name)} ></sonic-icon>
66
- <span class="taxonomy-list">
67
- ${repeat(taxo, (item) => item[this.key + "_id"], (item) => {
68
- return html `<span> ${item[this.key + "_name"]}</span
69
- ><span class="sonic-taxonomy-separator">${unsafeHTML(this.separator)}</span>`;
70
- })}
71
- </span>
72
- </sonic-badge>
73
- `;
74
- }
75
- };
76
- Taxonomy.styles = css `
77
- :host .sonic-taxonomy-separator:last-child {
78
- display: none;
79
- }
80
-
81
- .taxonomy-list {
82
- display: flex;
83
- flex-wrap: wrap;
84
- }
85
- `;
86
- __decorate([
87
- property({ type: Object })
88
- ], Taxonomy.prototype, "icon", void 0);
89
- __decorate([
90
- property({ type: Array })
91
- ], Taxonomy.prototype, "taxonomy", void 0);
92
- __decorate([
93
- property({ type: String })
94
- ], Taxonomy.prototype, "separator", void 0);
95
- __decorate([
96
- property({ type: String })
97
- ], Taxonomy.prototype, "key", void 0);
98
- __decorate([
99
- property({ type: String, reflect: true })
100
- ], Taxonomy.prototype, "type", void 0);
101
- __decorate([
102
- property({ type: String, reflect: true })
103
- ], Taxonomy.prototype, "variant", void 0);
104
- __decorate([
105
- property({ type: String, reflect: true })
106
- ], Taxonomy.prototype, "size", void 0);
107
- Taxonomy = __decorate([
108
- customElement(tagName)
109
- ], Taxonomy);
110
- export { Taxonomy };
111
- //Ajout pour la creation du cem notamment pour Storybook
112
- try {
113
- customElements.define("sonic-taxonomy", Taxonomy);
114
- }
115
- catch (e) { }