@supersoniks/concorde 1.1.49 → 2.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.
Files changed (230) hide show
  1. package/README.md +0 -0
  2. package/cli.js +0 -0
  3. package/components.d.ts +0 -0
  4. package/components.js +0 -0
  5. package/concorde-core.bundle.js +3288 -36
  6. package/concorde-core.es.js +13149 -9458
  7. package/core/_types/types.d.ts +0 -0
  8. package/core/_types/types.js +0 -0
  9. package/core/components/functional/date/date.d.ts +0 -0
  10. package/core/components/functional/date/date.js +0 -0
  11. package/core/components/functional/example/example.d.ts +0 -0
  12. package/core/components/functional/example/example.js +0 -0
  13. package/core/components/functional/fetch/fetch.d.ts +2 -0
  14. package/core/components/functional/fetch/fetch.js +0 -0
  15. package/core/components/functional/functional.d.ts +0 -0
  16. package/core/components/functional/functional.js +0 -0
  17. package/core/components/functional/if/if.d.ts +0 -0
  18. package/core/components/functional/if/if.js +0 -0
  19. package/core/components/functional/if/if.test.d.ts +0 -0
  20. package/core/components/functional/if/if.test.js +12 -21
  21. package/core/components/functional/list/list.d.ts +4 -0
  22. package/core/components/functional/list/list.js +24 -11
  23. package/core/components/functional/mix/mix.d.ts +0 -0
  24. package/core/components/functional/mix/mix.js +0 -0
  25. package/core/components/functional/queue/queue.d.ts +0 -0
  26. package/core/components/functional/queue/queue.js +38 -70
  27. package/core/components/functional/router/redirect.d.ts +0 -0
  28. package/core/components/functional/router/redirect.js +0 -0
  29. package/core/components/functional/router/router.d.ts +0 -0
  30. package/core/components/functional/router/router.js +1 -2
  31. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -0
  32. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +28 -43
  33. package/core/components/functional/sdui/default-library.json +0 -0
  34. package/core/components/functional/sdui/sdui-utils.d.ts +0 -0
  35. package/core/components/functional/sdui/sdui-utils.js +0 -0
  36. package/core/components/functional/sdui/sdui.d.ts +2 -0
  37. package/core/components/functional/sdui/sdui.js +24 -40
  38. package/core/components/functional/sdui/types.d.ts +0 -0
  39. package/core/components/functional/sdui/types.js +0 -0
  40. package/core/components/functional/sonic-scope/sonic-scope.d.ts +1 -1
  41. package/core/components/functional/sonic-scope/sonic-scope.js +0 -0
  42. package/core/components/functional/states/states.d.ts +0 -0
  43. package/core/components/functional/states/states.js +2 -4
  44. package/core/components/functional/submit/submit.d.ts +0 -0
  45. package/core/components/functional/submit/submit.js +106 -121
  46. package/core/components/functional/subscriber/subscriber.d.ts +0 -0
  47. package/core/components/functional/subscriber/subscriber.js +0 -0
  48. package/core/components/functional/value/value.d.ts +0 -0
  49. package/core/components/functional/value/value.js +0 -0
  50. package/core/components/ui/_css/scroll.d.ts +0 -0
  51. package/core/components/ui/_css/scroll.js +0 -0
  52. package/core/components/ui/_css/size.d.ts +0 -0
  53. package/core/components/ui/_css/size.js +0 -0
  54. package/core/components/ui/_css/type.d.ts +0 -0
  55. package/core/components/ui/_css/type.js +0 -0
  56. package/core/components/ui/alert/alert.d.ts +0 -0
  57. package/core/components/ui/alert/alert.js +0 -0
  58. package/core/components/ui/badge/badge.d.ts +0 -0
  59. package/core/components/ui/badge/badge.js +0 -0
  60. package/core/components/ui/button/button.d.ts +2 -2
  61. package/core/components/ui/button/button.js +24 -41
  62. package/core/components/ui/captcha/captcha.d.ts +0 -0
  63. package/core/components/ui/captcha/captcha.js +3 -5
  64. package/core/components/ui/card/card-footer.d.ts +0 -0
  65. package/core/components/ui/card/card-footer.js +0 -0
  66. package/core/components/ui/card/card-header-descripton.d.ts +0 -0
  67. package/core/components/ui/card/card-header-descripton.js +0 -0
  68. package/core/components/ui/card/card-header.d.ts +0 -0
  69. package/core/components/ui/card/card-header.js +0 -0
  70. package/core/components/ui/card/card-main.d.ts +0 -0
  71. package/core/components/ui/card/card-main.js +0 -0
  72. package/core/components/ui/card/card.d.ts +0 -0
  73. package/core/components/ui/card/card.js +0 -0
  74. package/core/components/ui/divider/divider.d.ts +1 -1
  75. package/core/components/ui/divider/divider.js +6 -6
  76. package/core/components/ui/form/checkbox/checkbox.d.ts +3 -23
  77. package/core/components/ui/form/checkbox/checkbox.js +7 -12
  78. package/core/components/ui/form/css/form-control.d.ts +0 -0
  79. package/core/components/ui/form/css/form-control.js +0 -0
  80. package/core/components/ui/form/fieldset/fieldset.d.ts +0 -0
  81. package/core/components/ui/form/fieldset/fieldset.js +0 -0
  82. package/core/components/ui/form/fieldset/legend-description.d.ts +0 -0
  83. package/core/components/ui/form/fieldset/legend-description.js +0 -0
  84. package/core/components/ui/form/fieldset/legend.d.ts +0 -0
  85. package/core/components/ui/form/fieldset/legend.js +0 -0
  86. package/core/components/ui/form/form-actions/form-actions.d.ts +0 -0
  87. package/core/components/ui/form/form-actions/form-actions.js +0 -0
  88. package/core/components/ui/form/form-layout/form-layout.d.ts +1 -1
  89. package/core/components/ui/form/form-layout/form-layout.js +1 -1
  90. package/core/components/ui/form/input/input.d.ts +4 -6
  91. package/core/components/ui/form/input/input.js +12 -18
  92. package/core/components/ui/form/input/password-helper.d.ts +0 -0
  93. package/core/components/ui/form/input/password-helper.js +0 -0
  94. package/core/components/ui/form/input/same-value-helper.d.ts +0 -0
  95. package/core/components/ui/form/input/same-value-helper.js +0 -0
  96. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +5 -20
  97. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +27 -93
  98. package/core/components/ui/form/radio/radio.d.ts +0 -0
  99. package/core/components/ui/form/radio/radio.js +0 -0
  100. package/core/components/ui/form/select/select.d.ts +1 -1
  101. package/core/components/ui/form/select/select.js +15 -25
  102. package/core/components/ui/form/textarea/textarea.d.ts +3 -3
  103. package/core/components/ui/form/textarea/textarea.js +8 -17
  104. package/core/components/ui/group/group.d.ts +0 -0
  105. package/core/components/ui/group/group.js +7 -15
  106. package/core/components/ui/icon/icon.d.ts +6 -12
  107. package/core/components/ui/icon/icon.js +20 -53
  108. package/core/components/ui/icon/icons.d.ts +0 -0
  109. package/core/components/ui/icon/icons.js +28 -22
  110. package/core/components/ui/icon/icons.json +0 -0
  111. package/core/components/ui/image/image.d.ts +1 -1
  112. package/core/components/ui/image/image.js +3 -3
  113. package/core/components/ui/link/link.d.ts +0 -0
  114. package/core/components/ui/link/link.js +0 -0
  115. package/core/components/ui/loader/loader.d.ts +0 -0
  116. package/core/components/ui/loader/loader.js +0 -0
  117. package/core/components/ui/loader/styles/fixed.d.ts +0 -0
  118. package/core/components/ui/loader/styles/fixed.js +0 -0
  119. package/core/components/ui/loader/styles/inline.d.ts +0 -0
  120. package/core/components/ui/loader/styles/inline.js +0 -0
  121. package/core/components/ui/menu/menu-item.d.ts +0 -0
  122. package/core/components/ui/menu/menu-item.js +0 -0
  123. package/core/components/ui/menu/menu.d.ts +0 -0
  124. package/core/components/ui/menu/menu.js +2 -4
  125. package/core/components/ui/modal/modal-actions.d.ts +1 -1
  126. package/core/components/ui/modal/modal-actions.js +4 -4
  127. package/core/components/ui/modal/modal-close.d.ts +0 -0
  128. package/core/components/ui/modal/modal-close.js +0 -0
  129. package/core/components/ui/modal/modal-content.d.ts +0 -0
  130. package/core/components/ui/modal/modal-content.js +0 -0
  131. package/core/components/ui/modal/modal-subtitle.d.ts +0 -0
  132. package/core/components/ui/modal/modal-subtitle.js +0 -0
  133. package/core/components/ui/modal/modal-title.d.ts +0 -0
  134. package/core/components/ui/modal/modal-title.js +0 -0
  135. package/core/components/ui/modal/modal.d.ts +0 -0
  136. package/core/components/ui/modal/modal.js +10 -12
  137. package/core/components/ui/pop/pop.d.ts +0 -0
  138. package/core/components/ui/pop/pop.js +3 -4
  139. package/core/components/ui/progress/progress.d.ts +0 -0
  140. package/core/components/ui/progress/progress.js +0 -0
  141. package/core/components/ui/table/table-caption.d.ts +0 -0
  142. package/core/components/ui/table/table-caption.js +0 -0
  143. package/core/components/ui/table/table-tbody.d.ts +0 -0
  144. package/core/components/ui/table/table-tbody.js +0 -0
  145. package/core/components/ui/table/table-td.d.ts +0 -0
  146. package/core/components/ui/table/table-td.js +5 -6
  147. package/core/components/ui/table/table-tfoot.d.ts +0 -0
  148. package/core/components/ui/table/table-tfoot.js +0 -0
  149. package/core/components/ui/table/table-th.d.ts +0 -0
  150. package/core/components/ui/table/table-th.js +5 -6
  151. package/core/components/ui/table/table-thead.d.ts +0 -0
  152. package/core/components/ui/table/table-thead.js +0 -0
  153. package/core/components/ui/table/table-tr.d.ts +0 -0
  154. package/core/components/ui/table/table-tr.js +8 -1
  155. package/core/components/ui/table/table.d.ts +1 -0
  156. package/core/components/ui/table/table.js +9 -1
  157. package/core/components/ui/theme/css/tailwind.css +0 -0
  158. package/core/components/ui/theme/css/tailwind.d.ts +0 -0
  159. package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -0
  160. package/core/components/ui/theme/theme-collection/core-variables.js +0 -0
  161. package/core/components/ui/theme/theme-collection/dark.d.ts +0 -0
  162. package/core/components/ui/theme/theme-collection/dark.js +0 -0
  163. package/core/components/ui/theme/theme-collection/light.d.ts +0 -0
  164. package/core/components/ui/theme/theme-collection/light.js +0 -0
  165. package/core/components/ui/theme/theme.d.ts +0 -0
  166. package/core/components/ui/theme/theme.js +5 -6
  167. package/core/components/ui/toast/message-subscriber.d.ts +0 -0
  168. package/core/components/ui/toast/message-subscriber.js +6 -8
  169. package/core/components/ui/toast/toast-item.d.ts +0 -0
  170. package/core/components/ui/toast/toast-item.js +0 -0
  171. package/core/components/ui/toast/toast.d.ts +0 -0
  172. package/core/components/ui/toast/toast.js +15 -6
  173. package/core/components/ui/toast/types.d.ts +0 -0
  174. package/core/components/ui/toast/types.js +0 -0
  175. package/core/components/ui/tooltip/tooltip.d.ts +1 -1
  176. package/core/components/ui/tooltip/tooltip.js +0 -0
  177. package/core/components/ui/ui.d.ts +0 -0
  178. package/core/components/ui/ui.js +0 -0
  179. package/core/core.d.ts +0 -0
  180. package/core/core.js +9 -0
  181. package/core/decorators/Subscriber.d.ts +0 -0
  182. package/core/decorators/Subscriber.js +0 -0
  183. package/core/directives/DataProvider.d.ts +0 -14
  184. package/core/directives/DataProvider.js +1 -16
  185. package/core/mixins/Fetcher.d.ts +2 -0
  186. package/core/mixins/Fetcher.js +67 -79
  187. package/core/mixins/FormCheckable.d.ts +0 -0
  188. package/core/mixins/FormCheckable.js +2 -3
  189. package/core/mixins/FormElement.d.ts +0 -0
  190. package/core/mixins/FormElement.js +5 -7
  191. package/core/mixins/FormInput.d.ts +1 -1
  192. package/core/mixins/FormInput.js +1 -2
  193. package/core/mixins/Subscriber.d.ts +0 -0
  194. package/core/mixins/Subscriber.js +39 -54
  195. package/core/mixins/TemplatesContainer.d.ts +0 -0
  196. package/core/mixins/TemplatesContainer.js +0 -0
  197. package/core/mixins/mixins.d.ts +0 -0
  198. package/core/mixins/mixins.js +0 -0
  199. package/core/utils/Arrays.d.ts +0 -0
  200. package/core/utils/Arrays.js +2 -1
  201. package/core/utils/DataBindObserver.d.ts +0 -0
  202. package/core/utils/DataBindObserver.js +5 -6
  203. package/core/utils/Electron.d.ts +0 -0
  204. package/core/utils/Electron.js +1 -1
  205. package/core/utils/Format.d.ts +0 -0
  206. package/core/utils/Format.js +0 -0
  207. package/core/utils/HTML.d.ts +0 -0
  208. package/core/utils/HTML.js +18 -31
  209. package/core/utils/LocationHandler.d.ts +0 -0
  210. package/core/utils/LocationHandler.js +8 -13
  211. package/core/utils/Objects.d.ts +0 -0
  212. package/core/utils/Objects.js +0 -0
  213. package/core/utils/PublisherProxy.d.ts +0 -0
  214. package/core/utils/PublisherProxy.js +108 -132
  215. package/core/utils/Utils.d.ts +0 -0
  216. package/core/utils/Utils.js +3 -14
  217. package/core/utils/api.d.ts +0 -0
  218. package/core/utils/api.js +137 -165
  219. package/img/concorde-logo.svg +0 -0
  220. package/img/concorde.png +0 -0
  221. package/img/concorde_def.png +0 -0
  222. package/mixins.d.ts +5 -3
  223. package/mixins.js +0 -0
  224. package/package.json +13 -12
  225. package/svg/regular/plane.svg +0 -0
  226. package/svg/solid/plane.svg +0 -0
  227. package/test-utils/TestUtils.d.ts +0 -0
  228. package/test-utils/TestUtils.js +0 -0
  229. package/utils.d.ts +0 -0
  230. package/utils.js +0 -0
@@ -5,8 +5,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { html, LitElement, css, nothing } from "lit";
8
- import { customElement, property, queryAssignedNodes, state, } from "lit/decorators.js";
9
- import { FormInput, FormElement, Subscriber, TemplatesContainer, } from "@supersoniks/concorde/mixins";
8
+ import { customElement, property, queryAssignedElements, state } from "lit/decorators.js";
9
+ import { FormInput, FormElement, Subscriber, TemplatesContainer } from "@supersoniks/concorde/mixins";
10
10
  import "@supersoniks/concorde/core/components/ui/form/input/input";
11
11
  import "@supersoniks/concorde/core/components/ui/pop/pop";
12
12
  import "@supersoniks/concorde/core/components/functional/queue/queue";
@@ -14,7 +14,7 @@ import "@supersoniks/concorde/core/components/ui/menu/menu-item";
14
14
  import { ifDefined } from "lit/directives/if-defined.js";
15
15
  import { PublisherManager } from "@supersoniks/concorde/utils";
16
16
  import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
17
- import { ResizeController } from "@lit-labs/observers/resize_controller.js";
17
+ import { ResizeController } from "@lit-labs/observers/resize-controller.js";
18
18
  /**
19
19
  * Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
20
20
  * L'input permet de filtrer les choix de valeurs dans le sonic-pop.
@@ -32,10 +32,7 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
32
32
  this.readonly = null;
33
33
  this.dataProviderExpression = "";
34
34
  this.key = "";
35
- /** The parameter name to use in dataProviderExpression route */
36
35
  this.searchParameter = "";
37
- /** The property name to search in the dataProviderExpression result, use "_self" if result is a string list */
38
- this.propertyName = "";
39
36
  this.hasInputPrefix = false;
40
37
  this._resizeController = new ResizeController(this, {});
41
38
  /**
@@ -46,63 +43,33 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
46
43
  this.queueDataProvider = "";
47
44
  this.initQueueDataProvider = "";
48
45
  this.lastValidSearch = "";
49
- /**
50
- * Run when the formDataProvider's field is updated
51
- *
52
- * @param value
53
- */
54
46
  this.updateSearchParameter = (value) => {
55
- var _a;
56
47
  if (value == "") {
57
48
  this.lastValidSearch = "";
58
49
  return;
59
50
  }
60
- let found = this.queryQueueListItem(this.queueDataProvider, this.findSelection, this.setSearchFromSelection);
61
- // Si la liste de this.queueDataProvider est bien initialisée, mais qu'aucun item ne correspond à la recherche
62
- // On affiche quand même la valeur dans le champ de recherche, car il provient directement du formDataProvider
63
- if (found === false) {
64
- this.lastValidSearch = value;
65
- (_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.set(this.lastValidSearch);
66
- }
51
+ this.queryQueueListItem(this.queueDataProvider, this.findSelection, this.setSearchFromSelection);
67
52
  };
68
53
  this.initSearchParameter = () => {
69
54
  this.queryQueueListItem(this.initQueueDataProvider, this.findSelection, this.setSearchFromSelection);
70
55
  };
71
56
  this.selectListItem = (listItem) => {
72
- var _a;
73
- let value = this.propertyName === "_self"
74
- ? listItem
75
- : listItem[this.propertyName || this.name];
76
- (_a = this.formValuePublisher) === null || _a === void 0 ? void 0 : _a.set(value);
57
+ this.formValuePublisher?.set(listItem[this.name]);
77
58
  };
78
59
  this.findSearchedItem = (listItem) => {
79
- var _a;
80
- let value = this.propertyName === "_self"
81
- ? listItem
82
- : listItem[this.propertyName || this.searchParameter || this.name];
83
- return (value == ((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()));
60
+ return listItem[this.searchParameter || this.name] == this.searchPublisher?.get();
84
61
  };
85
62
  this.findSelection = (listItem) => {
86
- let value = this.propertyName === "_self"
87
- ? listItem
88
- : listItem[this.propertyName || this.name];
89
- return value == this.value;
63
+ return listItem[this.name] == this.value;
90
64
  };
91
65
  this.setSearchFromSelection = (listItem) => {
92
- var _a;
93
- this.lastValidSearch = this.propertyName === "_self"
94
- ? listItem
95
- : listItem[this.propertyName || this.searchParameter || this.name];
96
- (_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.set(this.lastValidSearch);
66
+ this.lastValidSearch = listItem[this.searchParameter || this.name];
67
+ this.searchPublisher?.set(this.lastValidSearch);
97
68
  };
98
69
  this.updateActiveSelection = () => {
99
- var _a, _b, _c;
100
70
  this.queryQueueListItem(this.queueDataProvider, this.findSearchedItem, this.selectListItem);
101
- if (!this.select &&
102
- this.lastValidSearch &&
103
- this.lastValidSearch != ((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()) &&
104
- ((_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.get())) {
105
- (_c = this.formValuePublisher) === null || _c === void 0 ? void 0 : _c.set("");
71
+ if (!this.select && this.lastValidSearch && this.lastValidSearch != this.searchPublisher?.get() && this.formValuePublisher?.get()) {
72
+ this.formValuePublisher?.set("");
106
73
  }
107
74
  };
108
75
  }
@@ -110,11 +77,9 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
110
77
  * Les fonctions de gestion
111
78
  */
112
79
  hasSlotOrProps() {
113
- var _a;
114
- this.hasInputPrefix = !!((_a = this.slotInputPrefixNodes) === null || _a === void 0 ? void 0 : _a.length);
80
+ this.hasInputPrefix = !!this.slotInputPrefixNodes?.length;
115
81
  }
116
82
  connectedCallback() {
117
- var _a, _b, _c;
118
83
  super.connectedCallback();
119
84
  /**
120
85
  * Nom de la valeur de recherche
@@ -125,8 +90,7 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
125
90
  * Nommage des différents dataProviders utilisés
126
91
  */
127
92
  const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
128
- // Create unique provider name with formProvider name + input name
129
- const dpPrefix = formDataProvider + "__" + this.name + "__autocomplete";
93
+ const dpPrefix = formDataProvider + "__autocomplete";
130
94
  this.initSearchDataProvider = `${dpPrefix}_init_search__`;
131
95
  this.initQueueDataProvider = `${dpPrefix}_init_queue__`;
132
96
  this.searchDataProvider = `${dpPrefix}_search__`;
@@ -146,36 +110,28 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
146
110
  if (this.value) {
147
111
  PublisherManager.get(this.initSearchDataProvider)[this.name] = this.value;
148
112
  }
149
- (_a = this.initCountPublisher) === null || _a === void 0 ? void 0 : _a.onAssign(this.initSearchParameter);
113
+ this.initCountPublisher?.onAssign(this.initSearchParameter);
150
114
  /**
151
115
  * Lorsque la sélection change, on met à jour la valeur de recherche
152
116
  */
153
- (_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.onAssign(this.updateSearchParameter);
117
+ this.formValuePublisher?.onAssign(this.updateSearchParameter);
154
118
  /**
155
119
  * Lorsque La valeur de recherche change, que le composant n'est pas en mode select
156
120
  * et qu'elle est différente de la derniere recherche valide on désactive la selection
157
121
  */
158
- (_c = this.countPublisher) === null || _c === void 0 ? void 0 : _c.onAssign(this.updateActiveSelection);
122
+ this.countPublisher?.onAssign(this.updateActiveSelection);
159
123
  }
160
124
  disconnectedCallback() {
161
- var _a, _b, _c;
162
125
  super.disconnectedCallback();
163
- (_a = this.initCountPublisher) === null || _a === void 0 ? void 0 : _a.offAssign(this.initSearchParameter);
164
- (_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.offAssign(this.updateSearchParameter);
165
- (_c = this.countPublisher) === null || _c === void 0 ? void 0 : _c.offAssign(this.updateActiveSelection);
126
+ this.initCountPublisher?.offAssign(this.initSearchParameter);
127
+ this.formValuePublisher?.offAssign(this.updateSearchParameter);
128
+ this.countPublisher?.offAssign(this.updateActiveSelection);
166
129
  const getPublisher = PublisherManager.get;
167
130
  getPublisher(this.initSearchDataProvider).delete();
168
131
  getPublisher(this.initQueueDataProvider).delete();
169
132
  getPublisher(this.searchDataProvider).delete();
170
133
  getPublisher(this.queueDataProvider).delete();
171
134
  }
172
- /**
173
- * @param queueDataProvider
174
- * @param itemFinder
175
- * @param itemMutator
176
- *
177
- * @return bool|undefined True if item found, false otherwise, undefined if result is not a list
178
- */
179
135
  queryQueueListItem(queueDataProvider, itemFinder, itemMutator) {
180
136
  const queuePublisher = PublisherManager.get(queueDataProvider);
181
137
  let listItem;
@@ -193,24 +149,20 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
193
149
  }
194
150
  if (listItem) {
195
151
  itemMutator(listItem);
196
- return true;
197
152
  }
198
- return false;
199
153
  }
200
154
  setSelectionRange(start, end) {
201
- var _a;
202
- (_a = this.querySelector("sonic-input")) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end);
155
+ this.querySelector("sonic-input")?.setSelectionRange(start, end);
203
156
  }
204
157
  handleHide() {
205
- var _a, _b, _c;
206
158
  if (!this.select)
207
159
  return;
208
- if (((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()) == "") {
160
+ if (this.searchPublisher?.get() == "") {
209
161
  this.lastValidSearch = "";
210
- (_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.set("");
162
+ this.formValuePublisher?.set("");
211
163
  return;
212
164
  }
213
- (_c = this.searchPublisher) === null || _c === void 0 ? void 0 : _c.set(this.lastValidSearch);
165
+ this.searchPublisher?.set(this.lastValidSearch);
214
166
  }
215
167
  render() {
216
168
  return html `
@@ -230,28 +182,13 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
230
182
  inlineContent
231
183
  size=${this.size}
232
184
  >
233
- <slot
234
- name="prefix"
235
- slot="prefix"
236
- @slotchange=${this.hasSlotOrProps}
237
- ></slot>
185
+ <slot name="prefix" slot="prefix" @slotchange=${this.hasSlotOrProps}></slot>
238
186
 
239
187
  ${this.select
240
- ? html `
241
- <sonic-icon
242
- slot="suffix"
243
- class="select-chevron"
244
- name="nav-arrow-down"
245
- .size=${this.size}
246
- ></sonic-icon>
247
- `
188
+ ? html ` <sonic-icon slot="suffix" class="select-chevron" name="nav-arrow-down" .size=${this.size}></sonic-icon> `
248
189
  : nothing}
249
190
  </sonic-input>
250
- <sonic-menu
251
- slot="content"
252
- class="custom-scroll"
253
- style="${this.offsetWidth ? `width: ${this.offsetWidth}px` : ""}"
254
- >
191
+ <sonic-menu slot="content" class="custom-scroll" style="${this.offsetWidth ? `width: ${this.offsetWidth}px` : ""}">
255
192
  <sonic-queue
256
193
  dataProvider="${this.queueDataProvider}"
257
194
  filteredFields=${this.filteredFields}
@@ -317,10 +254,7 @@ __decorate([
317
254
  property({ type: String })
318
255
  ], InputAutocomplete.prototype, "searchParameter", void 0);
319
256
  __decorate([
320
- property({ type: String })
321
- ], InputAutocomplete.prototype, "propertyName", void 0);
322
- __decorate([
323
- queryAssignedNodes({ slot: "prefix" })
257
+ queryAssignedElements({ slot: "prefix", flatten: true })
324
258
  ], InputAutocomplete.prototype, "slotInputPrefixNodes", void 0);
325
259
  __decorate([
326
260
  state()
File without changes
File without changes
@@ -26,7 +26,7 @@ export declare class Select extends Select_base {
26
26
  set options(options: Array<SelectOption>);
27
27
  get options(): Array<SelectOption>;
28
28
  hasDoneFirstUpdate: boolean;
29
- protected firstUpdated(): void;
29
+ protected firstUpdated(changedProperties: Map<string | number | symbol, unknown>): void;
30
30
  _value: string;
31
31
  set value(value: string);
32
32
  get value(): string;
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { html, LitElement, css } from "lit";
8
- import { customElement, property, queryAssignedNodes, state } from "lit/decorators.js";
8
+ import { customElement, property, queryAssignedElements, state } from "lit/decorators.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
10
10
  import { ifDefined } from "lit/directives/if-defined.js";
11
11
  import { repeat } from "lit/directives/repeat.js";
@@ -58,8 +58,9 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
58
58
  get options() {
59
59
  return this._options;
60
60
  }
61
- firstUpdated() {
61
+ firstUpdated(changedProperties) {
62
62
  this.hasDoneFirstUpdate = true;
63
+ super.firstUpdated(changedProperties);
63
64
  }
64
65
  set value(value) {
65
66
  if (value == null && !this.hasDoneFirstUpdate)
@@ -118,15 +119,13 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
118
119
  super.willUpdate(changedProperties);
119
120
  }
120
121
  hasSlotOrProps() {
121
- var _a, _b, _c, _d;
122
- this.hasLabel = this.label || ((_a = this.slotLabelNodes) === null || _a === void 0 ? void 0 : _a.length) ? true : false;
123
- this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) === null || _b === void 0 ? void 0 : _b.length) ? true : false;
124
- this.hasSuffix = ((_c = this.slotSuffixNodes) === null || _c === void 0 ? void 0 : _c.length) ? true : false;
125
- this.hasPrefix = ((_d = this.slotPrefixNodes) === null || _d === void 0 ? void 0 : _d.length) ? true : false;
122
+ this.hasLabel = this.label || this.slotLabelNodes?.length ? true : false;
123
+ this.hasDescription = this.description || this.slotDescriptionNodes?.length ? true : false;
124
+ this.hasSuffix = this.slotSuffixNodes?.length ? true : false;
125
+ this.hasPrefix = this.slotPrefixNodes?.length ? true : false;
126
126
  }
127
127
  validateFormElement() {
128
- var _a;
129
- const select = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("select");
128
+ const select = this.shadowRoot?.querySelector("select");
130
129
  if (!select || select.checkValidity())
131
130
  return;
132
131
  const formPublisher = this.getFormPublisher();
@@ -143,10 +142,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
143
142
  //let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
144
143
  return html `
145
144
  <label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}"
146
- >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
147
- name="label"
148
- @slotchange=${this.hasSlotOrProps}
149
- ></slot
145
+ >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
150
146
  ></label>
151
147
 
152
148
  <div class="form-control ${classMap(slotClasses)}">
@@ -168,9 +164,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
168
164
  >
169
165
  ${repeat(this.options, (option) => option[this.valueKey], (option) => {
170
166
  const isSelected = this.value == option[this.valueKey] ? true : false;
171
- return html `<option ?selected=${isSelected} value="${option[this.valueKey]}">
172
- ${option[this.wordingKey]}
173
- </option>`;
167
+ return html `<option ?selected=${isSelected} value="${option[this.valueKey]}">${option[this.wordingKey]}</option>`;
174
168
  })}
175
169
  <slot></slot>
176
170
  </select>
@@ -179,11 +173,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
179
173
  <slot name="suffix" @slotchange=${this.hasSlotOrProps}></slot>
180
174
  </div>
181
175
 
182
- <slot
183
- name="description"
184
- @slotchange=${this.hasSlotOrProps}
185
- class="${this.hasDescription ? "form-description" : "hidden"}"
186
- >
176
+ <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription ? "form-description" : "hidden"}">
187
177
  ${this.description ? html `${unsafeHTML(this.description)}` : ""}
188
178
  </slot>
189
179
  `;
@@ -272,16 +262,16 @@ __decorate([
272
262
  property()
273
263
  ], Select.prototype, "label", null);
274
264
  __decorate([
275
- queryAssignedNodes({ slot: "label" })
265
+ queryAssignedElements({ slot: "label", flatten: true })
276
266
  ], Select.prototype, "slotLabelNodes", void 0);
277
267
  __decorate([
278
- queryAssignedNodes({ slot: "description" })
268
+ queryAssignedElements({ slot: "description", flatten: true })
279
269
  ], Select.prototype, "slotDescriptionNodes", void 0);
280
270
  __decorate([
281
- queryAssignedNodes({ slot: "suffix" })
271
+ queryAssignedElements({ slot: "suffix", flatten: true })
282
272
  ], Select.prototype, "slotSuffixNodes", void 0);
283
273
  __decorate([
284
- queryAssignedNodes({ slot: "prefix" })
274
+ queryAssignedElements({ slot: "prefix", flatten: true })
285
275
  ], Select.prototype, "slotPrefixNodes", void 0);
286
276
  __decorate([
287
277
  state()
@@ -3,14 +3,14 @@ declare const Textarea_base: {
3
3
  new (...args: any[]): {
4
4
  validateFormElement(): void;
5
5
  forceAutoFill: boolean;
6
- _type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
7
- type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
6
+ _type: "number" | "search" | "time" | "file" | "button" | "url" | "color" | "hidden" | "image" | "text" | "reset" | "submit" | "email" | "tel" | "month" | "week" | "checkbox" | "radio" | "range" | "date" | "datetime-local" | "password";
7
+ type: "number" | "search" | "time" | "file" | "button" | "url" | "color" | "hidden" | "image" | "text" | "reset" | "submit" | "email" | "tel" | "month" | "week" | "checkbox" | "radio" | "range" | "date" | "datetime-local" | "password";
8
8
  _description?: string | undefined;
9
9
  description: string | undefined;
10
10
  _label?: string | undefined;
11
11
  label: string | undefined;
12
12
  tabindex?: number | undefined;
13
- autocomplete?: "url" | "name" | "language" | "on" | "tel" | "email" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo" | undefined;
13
+ autocomplete?: "url" | "name" | "on" | "additional-name" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "address-line1" | "address-line2" | "address-line3" | "bday-day" | "bday-month" | "bday-year" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-family-name" | "cc-given-name" | "cc-name" | "cc-number" | "cc-type" | "country" | "country-name" | "current-password" | "family-name" | "given-name" | "honorific-prefix" | "honorific-suffix" | "new-password" | "one-time-code" | "organization" | "postal-code" | "street-address" | "transaction-amount" | "transaction-currency" | "username" | "email" | "tel" | "tel-area-code" | "tel-country-code" | "tel-extension" | "tel-local" | "tel-national" | "language" | "nickname" | "organization-title" | "cc-additional-name" | "bday" | "sex" | "impp" | "photo" | undefined;
14
14
  getFormPublisher(): any;
15
15
  updateDataValue(): void;
16
16
  handleChange(e?: Event | undefined): void;
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { html, LitElement, css } from "lit";
8
- import { customElement, property, state, queryAssignedNodes } from "lit/decorators.js";
8
+ import { customElement, property, state, queryAssignedElements } from "lit/decorators.js";
9
9
  import { ifDefined } from "lit/directives/if-defined.js";
10
10
  import { formControl, label, description } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
11
11
  import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
@@ -35,13 +35,11 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
35
35
  super.willUpdate(changedProperties);
36
36
  }
37
37
  hasSlotOrProps() {
38
- var _a, _b;
39
- this.hasLabel = this.label || ((_a = this.slotLabelNodes) === null || _a === void 0 ? void 0 : _a.length) ? true : false;
40
- this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) === null || _b === void 0 ? void 0 : _b.length) ? true : false;
38
+ this.hasLabel = this.label || this.slotLabelNodes?.length ? true : false;
39
+ this.hasDescription = this.description || this.slotDescriptionNodes?.length ? true : false;
41
40
  }
42
41
  validateFormElement() {
43
- var _a;
44
- const textarea = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("textarea");
42
+ const textarea = this.shadowRoot?.querySelector("textarea");
45
43
  if (!textarea || textarea.checkValidity())
46
44
  return;
47
45
  const formPublisher = this.getFormPublisher();
@@ -54,10 +52,7 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
54
52
  // let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
55
53
  return html `
56
54
  <label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}"
57
- >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
58
- name="label"
59
- @slotchange=${this.hasSlotOrProps}
60
- ></slot
55
+ >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
61
56
  ></label>
62
57
 
63
58
  <div class="form-control">
@@ -86,11 +81,7 @@ ${this.value}</textarea
86
81
  >
87
82
  </div>
88
83
 
89
- <slot
90
- name="description"
91
- @slotchange=${this.hasSlotOrProps}
92
- class="${this.hasDescription ? "form-description" : "hidden"}"
93
- >
84
+ <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription ? "form-description" : "hidden"}">
94
85
  ${this.description ? html `${unsafeHTML(this.description)}` : ""}
95
86
  </slot>
96
87
  `;
@@ -133,10 +124,10 @@ __decorate([
133
124
  property({ type: String })
134
125
  ], Textarea.prototype, "placeholder", void 0);
135
126
  __decorate([
136
- queryAssignedNodes({ slot: "label" })
127
+ queryAssignedElements({ slot: "label", flatten: true })
137
128
  ], Textarea.prototype, "slotLabelNodes", void 0);
138
129
  __decorate([
139
- queryAssignedNodes({ slot: "description" })
130
+ queryAssignedElements({ slot: "description", flatten: true })
140
131
  ], Textarea.prototype, "slotDescriptionNodes", void 0);
141
132
  __decorate([
142
133
  state()
File without changes
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html, LitElement, css } from "lit";
8
8
  import { styleMap } from "lit/directives/style-map.js";
9
- import { customElement, property, state, queryAssignedNodes } from "lit/decorators.js";
9
+ import { customElement, property, state, queryAssignedElements } from "lit/decorators.js";
10
10
  import { label, description } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
11
11
  import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
12
12
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
@@ -50,26 +50,18 @@ let Group = class Group extends LitElement {
50
50
  super.willUpdate(changedProperties);
51
51
  }
52
52
  hasSlotOrProps() {
53
- var _a, _b;
54
- this.hasLabel = this.label || ((_a = this.slotLabelNodes) === null || _a === void 0 ? void 0 : _a.length) ? true : false;
55
- this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) === null || _b === void 0 ? void 0 : _b.length) ? true : false;
53
+ this.hasLabel = this.label || this.slotLabelNodes?.length ? true : false;
54
+ this.hasDescription = this.description || this.slotDescriptionNodes?.length ? true : false;
56
55
  }
57
56
  render() {
58
57
  const slotStyle = {
59
58
  alignItems: this.alignItems,
60
59
  };
61
60
  return html `<span class="${this.hasLabel ? "form-label" : "hidden"}"
62
- >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
63
- name="label"
64
- @slotchange=${this.hasSlotOrProps}
65
- ></slot
61
+ >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
66
62
  ></span>
67
63
  <slot class="main-slot" style=${styleMap(slotStyle)}></slot>
68
- <slot
69
- name="description"
70
- @slotchange=${this.hasSlotOrProps}
71
- class="${this.hasDescription ? "form-description" : "hidden"}"
72
- >
64
+ <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription ? "form-description" : "hidden"}">
73
65
  ${this.description ? html `${unsafeHTML(this.description)}` : ""}
74
66
  </slot>`;
75
67
  }
@@ -109,10 +101,10 @@ __decorate([
109
101
  property({ type: String })
110
102
  ], Group.prototype, "description", void 0);
111
103
  __decorate([
112
- queryAssignedNodes({ slot: "label" })
104
+ queryAssignedElements({ slot: "label", flatten: true })
113
105
  ], Group.prototype, "slotLabelNodes", void 0);
114
106
  __decorate([
115
- queryAssignedNodes({ slot: "description" })
107
+ queryAssignedElements({ slot: "description", flatten: true })
116
108
  ], Group.prototype, "slotDescriptionNodes", void 0);
117
109
  __decorate([
118
110
  state()
@@ -1,4 +1,4 @@
1
- import { LitElement } from "lit";
1
+ import { LitElement, PropertyValues } from "lit";
2
2
  import { DirectiveResult } from "lit/directive";
3
3
  import { UnsafeHTMLDirective } from "lit/directives/unsafe-html";
4
4
  /**
@@ -7,26 +7,20 @@ import { UnsafeHTMLDirective } from "lit/directives/unsafe-html";
7
7
  */
8
8
  export declare class Icon extends LitElement {
9
9
  static styles: import("lit").CSSResult;
10
- renderId: number;
11
- updateIcon(): void;
10
+ updateIcon(): Promise<void>;
12
11
  iconText: DirectiveResult<typeof UnsafeHTMLDirective> | string;
13
12
  /**
14
13
  * Nom identifiant l'icone ex : *info*
15
14
  */
16
- private _name;
17
- get name(): string;
18
- set name(newName: string);
15
+ name: string;
19
16
  /**
20
17
  * prefix de l'icone si nécessaire ex: *solid*. La valeur par défaut est "" qui est mappée sur *regular*
21
18
  */
22
- private _prefix;
23
- get prefix(): string;
24
- set prefix(newPrefix: string);
19
+ prefix: string;
25
20
  /**
26
21
  * library de l'icone url vers un dossier en lign conenant des icônes
27
22
  */
28
- private _library;
29
- get library(): string;
30
- set library(newLibrary: string);
23
+ library: string;
24
+ willUpdate(changedProperties: PropertyValues): void;
31
25
  render(): DirectiveResult<typeof UnsafeHTMLDirective>;
32
26
  }