@supersoniks/concorde 1.1.41 → 1.1.43

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 (234) 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 +2 -3
  5. package/concorde-core.bundle.js +37 -42
  6. package/concorde-core.es.js +5702 -4823
  7. package/core/_types/types.d.ts +26 -0
  8. package/core/_types/types.js +1 -0
  9. package/core/components/functional/date/date.d.ts +13 -5
  10. package/core/components/functional/date/date.js +48 -29
  11. package/core/components/functional/example/example.d.ts +1 -1
  12. package/core/components/functional/example/example.js +1 -1
  13. package/core/components/functional/fetch/fetch.d.ts +40 -3
  14. package/core/components/functional/fetch/fetch.js +2 -6
  15. package/core/components/functional/functional.d.ts +2 -0
  16. package/core/components/functional/functional.js +2 -0
  17. package/core/components/functional/if/if.d.ts +3 -0
  18. package/core/components/functional/if/if.js +6 -12
  19. package/core/components/functional/if/if.test.d.ts +1 -0
  20. package/core/components/functional/if/if.test.js +44 -0
  21. package/core/components/functional/list/list.d.ts +32 -8
  22. package/core/components/functional/list/list.js +33 -40
  23. package/core/components/functional/mix/mix.d.ts +22 -0
  24. package/core/components/functional/mix/mix.js +99 -0
  25. package/core/components/functional/queue/queue.d.ts +16 -3
  26. package/core/components/functional/queue/queue.js +71 -15
  27. package/core/components/functional/router/redirect.d.ts +10 -1
  28. package/core/components/functional/router/redirect.js +5 -6
  29. package/core/components/functional/router/router.d.ts +15 -1
  30. package/core/components/functional/router/router.js +1 -6
  31. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +1 -1
  32. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +24 -12
  33. package/core/components/functional/sdui/default-library.json +108 -0
  34. package/core/components/functional/sdui/sdui-utils.d.ts +5 -0
  35. package/core/components/functional/sdui/sdui-utils.js +63 -0
  36. package/core/components/functional/sdui/sdui.d.ts +20 -9
  37. package/core/components/functional/sdui/sdui.js +64 -24
  38. package/core/components/functional/sdui/types.d.ts +4 -2
  39. package/core/components/functional/sdui/types.js +0 -0
  40. package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -0
  41. package/core/components/functional/sonic-scope/sonic-scope.js +0 -0
  42. package/core/components/functional/states/states.d.ts +19 -3
  43. package/core/components/functional/states/states.js +7 -12
  44. package/core/components/functional/submit/submit.d.ts +16 -1
  45. package/core/components/functional/submit/submit.js +87 -17
  46. package/core/components/functional/subscriber/subscriber.d.ts +4 -1
  47. package/core/components/functional/subscriber/subscriber.js +1 -6
  48. package/core/components/functional/value/value.d.ts +7 -0
  49. package/core/components/functional/value/value.js +26 -0
  50. package/core/components/ui/_css/scroll.d.ts +0 -0
  51. package/core/components/ui/_css/scroll.js +6 -7
  52. package/core/components/ui/_css/size.d.ts +1 -0
  53. package/core/components/ui/_css/size.js +3 -1
  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 +2 -2
  57. package/core/components/ui/alert/alert.js +11 -16
  58. package/core/components/ui/badge/badge.d.ts +3 -1
  59. package/core/components/ui/badge/badge.js +36 -22
  60. package/core/components/ui/button/button.d.ts +23 -20
  61. package/core/components/ui/button/button.js +59 -42
  62. package/core/components/ui/captcha/captcha.d.ts +14 -2
  63. package/core/components/ui/captcha/captcha.js +17 -12
  64. package/core/components/ui/card/card-footer.d.ts +0 -0
  65. package/core/components/ui/card/card-footer.js +1 -8
  66. package/core/components/ui/card/card-header-descripton.d.ts +0 -0
  67. package/core/components/ui/card/card-header-descripton.js +3 -9
  68. package/core/components/ui/card/card-header.d.ts +0 -0
  69. package/core/components/ui/card/card-header.js +1 -6
  70. package/core/components/ui/card/card-main.d.ts +0 -0
  71. package/core/components/ui/card/card-main.js +0 -5
  72. package/core/components/ui/card/card.d.ts +1 -1
  73. package/core/components/ui/card/card.js +28 -12
  74. package/core/components/ui/divider/divider.d.ts +2 -0
  75. package/core/components/ui/divider/divider.js +44 -17
  76. package/core/components/ui/form/checkbox/checkbox.d.ts +53 -16
  77. package/core/components/ui/form/checkbox/checkbox.js +54 -29
  78. package/core/components/ui/form/css/form-control.d.ts +2 -0
  79. package/core/components/ui/form/css/form-control.js +145 -67
  80. package/core/components/ui/form/fieldset/fieldset.d.ts +8 -1
  81. package/core/components/ui/form/fieldset/fieldset.js +45 -8
  82. package/core/components/ui/form/fieldset/legend-description.d.ts +0 -0
  83. package/core/components/ui/form/fieldset/legend-description.js +0 -5
  84. package/core/components/ui/form/fieldset/legend.d.ts +0 -0
  85. package/core/components/ui/form/fieldset/legend.js +4 -7
  86. package/core/components/ui/form/form-actions/form-actions.d.ts +2 -0
  87. package/core/components/ui/form/form-actions/form-actions.js +26 -11
  88. package/core/components/ui/form/form-layout/form-layout.d.ts +5 -2
  89. package/core/components/ui/form/form-layout/form-layout.js +31 -9
  90. package/core/components/ui/form/input/input.d.ts +15 -18
  91. package/core/components/ui/form/input/input.js +89 -54
  92. package/core/components/ui/form/input/password-helper.d.ts +7 -1
  93. package/core/components/ui/form/input/password-helper.js +33 -10
  94. package/core/components/ui/form/input/same-value-helper.d.ts +1 -1
  95. package/core/components/ui/form/input/same-value-helper.js +1 -0
  96. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +34 -0
  97. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +133 -0
  98. package/core/components/ui/form/radio/radio.d.ts +6 -0
  99. package/core/components/ui/form/radio/radio.js +7 -12
  100. package/core/components/ui/form/select/select.d.ts +23 -7
  101. package/core/components/ui/form/select/select.js +71 -40
  102. package/core/components/ui/form/textarea/textarea.d.ts +13 -13
  103. package/core/components/ui/form/textarea/textarea.js +31 -38
  104. package/core/components/ui/group/group.d.ts +11 -1
  105. package/core/components/ui/group/group.js +79 -17
  106. package/core/components/ui/icon/icon.d.ts +10 -3
  107. package/core/components/ui/icon/icon.js +16 -15
  108. package/core/components/ui/icon/icons.d.ts +0 -0
  109. package/core/components/ui/icon/icons.js +11 -8
  110. package/core/components/ui/icon/icons.json +1 -1
  111. package/core/components/ui/image/image.d.ts +0 -0
  112. package/core/components/ui/image/image.js +0 -5
  113. package/core/components/ui/link/link.d.ts +1 -1
  114. package/core/components/ui/link/link.js +2 -6
  115. package/core/components/ui/loader/loader.d.ts +0 -0
  116. package/core/components/ui/loader/loader.js +2 -8
  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 +4 -9
  123. package/core/components/ui/menu/menu.d.ts +9 -1
  124. package/core/components/ui/menu/menu.js +183 -27
  125. package/core/components/ui/modal/modal-actions.d.ts +0 -0
  126. package/core/components/ui/modal/modal-actions.js +1 -6
  127. package/core/components/ui/modal/modal-close.d.ts +1 -0
  128. package/core/components/ui/modal/modal-close.js +14 -10
  129. package/core/components/ui/modal/modal-content.d.ts +0 -0
  130. package/core/components/ui/modal/modal-content.js +0 -5
  131. package/core/components/ui/modal/modal-subtitle.d.ts +0 -0
  132. package/core/components/ui/modal/modal-subtitle.js +2 -6
  133. package/core/components/ui/modal/modal-title.d.ts +0 -0
  134. package/core/components/ui/modal/modal-title.js +0 -5
  135. package/core/components/ui/modal/modal.d.ts +7 -7
  136. package/core/components/ui/modal/modal.js +36 -36
  137. package/core/components/ui/pop/pop.d.ts +2 -1
  138. package/core/components/ui/pop/pop.js +11 -10
  139. package/core/components/ui/progress/progress.d.ts +0 -0
  140. package/core/components/ui/progress/progress.js +34 -32
  141. package/core/components/ui/table/table-caption.d.ts +0 -0
  142. package/core/components/ui/table/table-caption.js +5 -10
  143. package/core/components/ui/table/table-tbody.d.ts +0 -0
  144. package/core/components/ui/table/table-tbody.js +10 -14
  145. package/core/components/ui/table/table-td.d.ts +2 -0
  146. package/core/components/ui/table/table-td.js +8 -5
  147. package/core/components/ui/table/table-tfoot.d.ts +0 -0
  148. package/core/components/ui/table/table-tfoot.js +5 -7
  149. package/core/components/ui/table/table-th.d.ts +2 -0
  150. package/core/components/ui/table/table-th.js +12 -9
  151. package/core/components/ui/table/table-thead.d.ts +0 -0
  152. package/core/components/ui/table/table-thead.js +1 -6
  153. package/core/components/ui/table/table-tr.d.ts +0 -0
  154. package/core/components/ui/table/table-tr.js +4 -6
  155. package/core/components/ui/table/table.d.ts +0 -3
  156. package/core/components/ui/table/table.js +14 -31
  157. package/core/components/ui/taxonomy/taxonomy.d.ts +6 -3
  158. package/core/components/ui/taxonomy/taxonomy.js +9 -9
  159. package/core/components/ui/theme/css/tailwind.css +0 -0
  160. package/core/components/ui/theme/css/tailwind.d.ts +0 -0
  161. package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -0
  162. package/core/components/ui/theme/theme-collection/core-variables.js +13 -11
  163. package/core/components/ui/theme/theme-collection/dark.d.ts +0 -0
  164. package/core/components/ui/theme/theme-collection/dark.js +1 -1
  165. package/core/components/ui/theme/theme-collection/light.d.ts +0 -0
  166. package/core/components/ui/theme/theme-collection/light.js +0 -0
  167. package/core/components/ui/theme/theme.d.ts +1 -6
  168. package/core/components/ui/theme/theme.js +7 -36
  169. package/core/components/ui/toast/message-subscriber.d.ts +13 -7
  170. package/core/components/ui/toast/message-subscriber.js +0 -0
  171. package/core/components/ui/toast/toast-item.d.ts +0 -0
  172. package/core/components/ui/toast/toast-item.js +1 -1
  173. package/core/components/ui/toast/toast.d.ts +2 -1
  174. package/core/components/ui/toast/toast.js +29 -14
  175. package/core/components/ui/toast/types.d.ts +0 -0
  176. package/core/components/ui/toast/types.js +0 -0
  177. package/core/components/ui/tooltip/tooltip.d.ts +1 -0
  178. package/core/components/ui/tooltip/tooltip.js +35 -14
  179. package/core/components/ui/ui.d.ts +1 -0
  180. package/core/components/ui/ui.js +1 -3
  181. package/core/core.d.ts +0 -0
  182. package/core/core.js +5 -6
  183. package/core/mixins/Fetcher.d.ts +19 -10
  184. package/core/mixins/Fetcher.js +26 -10
  185. package/core/mixins/FormCheckable.d.ts +17 -8
  186. package/core/mixins/FormCheckable.js +177 -22
  187. package/core/mixins/FormElement.d.ts +12 -7
  188. package/core/mixins/FormElement.js +42 -26
  189. package/core/mixins/FormInput.d.ts +8 -4
  190. package/core/mixins/FormInput.js +4 -3
  191. package/core/mixins/Subscriber.d.ts +7 -5
  192. package/core/mixins/Subscriber.js +34 -32
  193. package/core/mixins/TemplatesContainer.d.ts +0 -0
  194. package/core/mixins/TemplatesContainer.js +0 -0
  195. package/core/mixins/mixins.d.ts +0 -0
  196. package/core/mixins/mixins.js +0 -0
  197. package/core/utils/Arrays.d.ts +15 -15
  198. package/core/utils/Arrays.js +0 -0
  199. package/core/utils/DataBindObserver.d.ts +16 -9
  200. package/core/utils/DataBindObserver.js +23 -28
  201. package/core/utils/Electron.d.ts +5 -1
  202. package/core/utils/Electron.js +4 -2
  203. package/core/utils/Format.d.ts +0 -0
  204. package/core/utils/Format.js +0 -0
  205. package/core/utils/HTML.d.ts +9 -2
  206. package/core/utils/HTML.js +22 -3
  207. package/core/utils/LocationHandler.d.ts +6 -5
  208. package/core/utils/LocationHandler.js +19 -8
  209. package/core/utils/Objects.d.ts +7 -4
  210. package/core/utils/Objects.js +28 -6
  211. package/core/utils/{PublisherProxy.d.mts → PublisherProxy.d.ts} +40 -31
  212. package/core/utils/{PublisherProxy.mjs → PublisherProxy.js} +54 -28
  213. package/core/utils/Utils.d.ts +3 -0
  214. package/core/utils/Utils.js +18 -0
  215. package/core/utils/api.d.ts +39 -7
  216. package/core/utils/api.js +45 -32
  217. package/img/concorde-logo.svg +1 -0
  218. package/img/concorde.png +0 -0
  219. package/img/concorde_def.png +0 -0
  220. package/mixins.d.ts +36 -18
  221. package/mixins.js +3 -4
  222. package/package.json +47 -10
  223. package/svg/regular/plane.svg +1 -0
  224. package/svg/solid/plane.svg +1 -0
  225. package/test-utils/TestUtils.d.ts +4 -0
  226. package/test-utils/TestUtils.js +12 -0
  227. package/utils.d.ts +3 -1
  228. package/utils.js +7 -5
  229. package/core/components/functional/configuration/configuration.d.ts +0 -5
  230. package/core/components/functional/configuration/configuration.js +0 -22
  231. package/core/components/ui/tabs/tab.d.ts +0 -6
  232. package/core/components/ui/tabs/tab.js +0 -46
  233. package/core/components/ui/tabs/tabs.d.ts +0 -15
  234. package/core/components/ui/tabs/tabs.js +0 -129
package/core/utils/api.js CHANGED
@@ -8,9 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import HTML from "@supersoniks/concorde/core/utils/HTML";
11
- import Objects from "./Objects";
11
+ import Objects from "@supersoniks/concorde/core/utils/Objects";
12
12
  class API {
13
13
  constructor(config) {
14
+ /**
15
+ * Le endPoint pour obtenir le bearer token qui sera concaténé à l'url du service
16
+ */
17
+ this.addHTTPResponse = false;
14
18
  this.serviceURL = config.serviceURL;
15
19
  if (!this.serviceURL)
16
20
  this.serviceURL = document.location.origin;
@@ -18,6 +22,32 @@ class API {
18
22
  this.password = config.password;
19
23
  this.token = config.token;
20
24
  this.tokenProvider = config.tokenProvider;
25
+ this.addHTTPResponse = config.addHTTPResponse || false;
26
+ this.credentials = config.credentials;
27
+ }
28
+ handleResult(fetchResult) {
29
+ var _a;
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ this.lastResult = fetchResult;
32
+ const contentType = (_a = fetchResult.headers.get("content-type")) === null || _a === void 0 ? void 0 : _a.toLowerCase();
33
+ let result = {};
34
+ if (contentType && contentType.indexOf("text/") == 0) {
35
+ let str = yield fetchResult.text();
36
+ result = { text: str };
37
+ }
38
+ else {
39
+ try {
40
+ result = yield fetchResult.json();
41
+ }
42
+ catch (e) {
43
+ result = {};
44
+ }
45
+ }
46
+ if (this.addHTTPResponse && Objects.isObject(result)) {
47
+ result._sonic_http_response_ = fetchResult;
48
+ }
49
+ return result;
50
+ });
21
51
  }
22
52
  /**
23
53
  * Basic auth
@@ -35,7 +65,10 @@ class API {
35
65
  let headers = {
36
66
  Authorization: "Basic " + window.btoa(unescape(encodeURIComponent(this.userName + ":" + this.password))),
37
67
  };
38
- let result = yield fetch(this.computeURL(this.tokenProvider), { headers: headers });
68
+ let result = yield fetch(this.computeURL(this.tokenProvider), {
69
+ headers: headers,
70
+ credentials: this.credentials,
71
+ });
39
72
  try {
40
73
  let json = yield result.json();
41
74
  this.token = json.token;
@@ -50,17 +83,9 @@ class API {
50
83
  const url = this.computeURL(path);
51
84
  if (!API.loadingGetPromises.has(url)) {
52
85
  let promise = new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
53
- let result = yield fetch(url, { headers: headers });
54
- try {
55
- let json = yield result.json();
56
- if (Objects.isObject(json)) {
57
- json._sonic_http_response_ = result;
58
- }
59
- resolve(json);
60
- }
61
- catch (e) {
62
- resolve({ _sonic_http_response_: result });
63
- }
86
+ let result = yield fetch(url, { headers: headers, credentials: this.credentials });
87
+ let handledResult = yield this.handleResult(result);
88
+ resolve(handledResult);
64
89
  }));
65
90
  API.loadingGetPromises.set(url, promise);
66
91
  }
@@ -79,7 +104,6 @@ class API {
79
104
  let headers = {};
80
105
  if (this.token)
81
106
  headers.Authorization = "Bearer " + this.token;
82
- headers.credentials = "include";
83
107
  headers["Accept-Language"] = HTML.getLanguage();
84
108
  if (additionalHeaders) {
85
109
  Object.assign(headers, additionalHeaders);
@@ -103,17 +127,11 @@ class API {
103
127
  headers["Content-Type"] = "application/json";
104
128
  let result = yield fetch(this.computeURL(path), {
105
129
  headers: headers,
130
+ credentials: this.credentials,
106
131
  method: method,
107
132
  body: JSON.stringify(data),
108
133
  });
109
- try {
110
- let json = yield result.json();
111
- json._sonic_http_response_ = result;
112
- return json;
113
- }
114
- catch (e) {
115
- return { _sonic_http_response_: result };
116
- }
134
+ return yield this.handleResult(result);
117
135
  });
118
136
  }
119
137
  /**
@@ -124,21 +142,16 @@ class API {
124
142
  let headers = yield this.createHeaders(additionalHeaders);
125
143
  headers["Accept"] = "application/json";
126
144
  let formData = new FormData();
127
- for (let z in data)
128
- formData.set(z, data[z]);
145
+ const dynamicData = data;
146
+ for (let z in dynamicData)
147
+ formData.set(z, dynamicData[z]);
129
148
  let result = yield fetch(this.computeURL(path), {
130
149
  headers: headers,
150
+ credentials: this.credentials,
131
151
  method: method,
132
152
  body: formData,
133
153
  });
134
- try {
135
- let json = yield result.json();
136
- json._sonic_http_response_ = result;
137
- return json;
138
- }
139
- catch (e) {
140
- return { _sonic_http_response_: result };
141
- }
154
+ return yield this.handleResult(result);
142
155
  });
143
156
  }
144
157
  /**
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="222.442" height="47.558" viewBox="0 0 222.442 47.558"><g transform="translate(-51.885 -25)"><path d="M11.045.384A9.984,9.984,0,0,1,5.862-.9,8.546,8.546,0,0,1,2.538-4.474,11.519,11.519,0,0,1,1.381-9.741a11.462,11.462,0,0,1,1.17-5.3,8.651,8.651,0,0,1,3.33-3.567,9.872,9.872,0,0,1,5.139-1.285,10.228,10.228,0,0,1,4.5.933,7.522,7.522,0,0,1,3.055,2.621,7.7,7.7,0,0,1,1.24,3.963H14.676a4.017,4.017,0,0,0-1.144-2.371,3.328,3.328,0,0,0-2.423-.9,3.647,3.647,0,0,0-2.205.684A4.416,4.416,0,0,0,7.44-12.976a8.472,8.472,0,0,0-.524,3.158,8.75,8.75,0,0,0,.518,3.2A4.393,4.393,0,0,0,8.9-4.615a3.651,3.651,0,0,0,2.212.69,3.63,3.63,0,0,0,1.681-.384,3.279,3.279,0,0,0,1.24-1.119A4.261,4.261,0,0,0,14.676-7.2h5.139a8.049,8.049,0,0,1-1.221,3.957A7.443,7.443,0,0,1,15.584-.575,10.038,10.038,0,0,1,11.045.384Zm19.7,0A9.985,9.985,0,0,1,25.6-.888a8.6,8.6,0,0,1-3.343-3.554,11.411,11.411,0,0,1-1.176-5.3,11.469,11.469,0,0,1,1.176-5.325A8.6,8.6,0,0,1,25.6-18.62a9.985,9.985,0,0,1,5.146-1.272A9.985,9.985,0,0,1,35.9-18.62a8.6,8.6,0,0,1,3.343,3.554,11.469,11.469,0,0,1,1.176,5.325,11.411,11.411,0,0,1-1.176,5.3A8.6,8.6,0,0,1,35.9-.888,9.985,9.985,0,0,1,30.75.384Zm.026-4.219a3.367,3.367,0,0,0,2.263-.773,4.757,4.757,0,0,0,1.374-2.116A9.279,9.279,0,0,0,34.88-9.78a9.279,9.279,0,0,0-.467-3.055,4.8,4.8,0,0,0-1.374-2.122,3.35,3.35,0,0,0-2.263-.78,3.443,3.443,0,0,0-2.295.78,4.726,4.726,0,0,0-1.393,2.122,9.279,9.279,0,0,0-.467,3.055,9.279,9.279,0,0,0,.467,3.055,4.681,4.681,0,0,0,1.393,2.116A3.461,3.461,0,0,0,30.776-3.835Zm17.2-7.517V0H42.529V-19.636h5.19v3.464h.23a5.512,5.512,0,0,1,2.186-2.717,6.647,6.647,0,0,1,3.72-1A6.906,6.906,0,0,1,57.423-19a6.091,6.091,0,0,1,2.365,2.55,8.589,8.589,0,0,1,.844,3.944V0H55.185V-11.531a3.968,3.968,0,0,0-.92-2.819,3.315,3.315,0,0,0-2.57-1.016,3.87,3.87,0,0,0-1.937.473,3.253,3.253,0,0,0-1.3,1.374A4.769,4.769,0,0,0,47.975-11.352ZM72.346.384A9.985,9.985,0,0,1,67.162-.9a8.546,8.546,0,0,1-3.324-3.573,11.519,11.519,0,0,1-1.157-5.267,11.462,11.462,0,0,1,1.17-5.3,8.651,8.651,0,0,1,3.33-3.567,9.872,9.872,0,0,1,5.139-1.285,10.228,10.228,0,0,1,4.5.933,7.522,7.522,0,0,1,3.055,2.621,7.7,7.7,0,0,1,1.24,3.963H75.977a4.017,4.017,0,0,0-1.144-2.371,3.328,3.328,0,0,0-2.423-.9,3.647,3.647,0,0,0-2.205.684,4.416,4.416,0,0,0-1.464,1.988,8.472,8.472,0,0,0-.524,3.158,8.75,8.75,0,0,0,.518,3.2A4.393,4.393,0,0,0,70.2-4.615a3.651,3.651,0,0,0,2.212.69,3.63,3.63,0,0,0,1.681-.384,3.279,3.279,0,0,0,1.24-1.119A4.261,4.261,0,0,0,75.977-7.2h5.139A8.049,8.049,0,0,1,79.9-3.241,7.443,7.443,0,0,1,76.885-.575,10.038,10.038,0,0,1,72.346.384Zm19.7,0A9.985,9.985,0,0,1,86.905-.888a8.6,8.6,0,0,1-3.343-3.554,11.411,11.411,0,0,1-1.176-5.3,11.469,11.469,0,0,1,1.176-5.325,8.6,8.6,0,0,1,3.343-3.554,9.985,9.985,0,0,1,5.146-1.272A9.985,9.985,0,0,1,97.2-18.62a8.6,8.6,0,0,1,3.343,3.554,11.469,11.469,0,0,1,1.176,5.325,11.411,11.411,0,0,1-1.176,5.3A8.6,8.6,0,0,1,97.2-.888,9.985,9.985,0,0,1,92.051.384Zm.026-4.219a3.367,3.367,0,0,0,2.263-.773,4.757,4.757,0,0,0,1.374-2.116A9.279,9.279,0,0,0,96.18-9.78a9.279,9.279,0,0,0-.467-3.055,4.8,4.8,0,0,0-1.374-2.122,3.35,3.35,0,0,0-2.263-.78,3.443,3.443,0,0,0-2.295.78,4.726,4.726,0,0,0-1.393,2.122,9.278,9.278,0,0,0-.467,3.055,9.278,9.278,0,0,0,.467,3.055,4.681,4.681,0,0,0,1.393,2.116A3.461,3.461,0,0,0,92.077-3.835ZM103.83,0V-19.636h5.28v3.426h.2a5.1,5.1,0,0,1,1.8-2.768,4.76,4.76,0,0,1,2.915-.94,8.238,8.238,0,0,1,.882.051,6.212,6.212,0,0,1,.831.141v4.832a7.115,7.115,0,0,0-1.061-.2,9.532,9.532,0,0,0-1.24-.089,4.363,4.363,0,0,0-2.141.518,3.847,3.847,0,0,0-1.483,1.438,4.1,4.1,0,0,0-.543,2.122V0Zm19.59.32a7.351,7.351,0,0,1-4.046-1.157,7.876,7.876,0,0,1-2.864-3.413,13.041,13.041,0,0,1-1.055-5.542,12.858,12.858,0,0,1,1.087-5.619,7.829,7.829,0,0,1,2.9-3.362,7.4,7.4,0,0,1,3.969-1.119,6.1,6.1,0,0,1,2.755.556,5.484,5.484,0,0,1,1.79,1.381,7.22,7.22,0,0,1,1.042,1.617h.166v-9.844h5.433V0h-5.369V-3.145h-.23a7,7,0,0,1-1.08,1.617,5.443,5.443,0,0,1-1.8,1.323A6.249,6.249,0,0,1,123.42.32Zm1.726-4.334a3.487,3.487,0,0,0,2.231-.722,4.56,4.56,0,0,0,1.406-2.026,8.637,8.637,0,0,0,.492-3.055,8.632,8.632,0,0,0-.486-3.043,4.367,4.367,0,0,0-1.406-1.994,3.577,3.577,0,0,0-2.237-.7,3.532,3.532,0,0,0-2.263.729,4.456,4.456,0,0,0-1.393,2.02,8.677,8.677,0,0,0-.473,2.991,8.776,8.776,0,0,0,.479,3.023,4.56,4.56,0,0,0,1.393,2.045A3.485,3.485,0,0,0,125.146-4.014Zm21.418,4.4a10.412,10.412,0,0,1-5.21-1.234A8.345,8.345,0,0,1,138-4.353a11.538,11.538,0,0,1-1.176-5.376A11.479,11.479,0,0,1,138-15.047a8.681,8.681,0,0,1,3.317-3.567,9.628,9.628,0,0,1,5.031-1.278,10.393,10.393,0,0,1,3.624.62,8.169,8.169,0,0,1,2.94,1.86,8.473,8.473,0,0,1,1.962,3.113,12.434,12.434,0,0,1,.7,4.379v1.5H139V-11.8H150.45a4.172,4.172,0,0,0-.511-2.084,3.721,3.721,0,0,0-1.413-1.425,4.122,4.122,0,0,0-2.09-.518,4.193,4.193,0,0,0-2.192.569,4.08,4.08,0,0,0-1.489,1.521,4.333,4.333,0,0,0-.55,2.116v3.209a5.462,5.462,0,0,0,.543,2.518,3.889,3.889,0,0,0,1.54,1.636,4.653,4.653,0,0,0,2.365.575,5.15,5.15,0,0,0,1.662-.256,3.449,3.449,0,0,0,1.291-.767,3.335,3.335,0,0,0,.818-1.253l5.037.332A6.866,6.866,0,0,1,153.9-2.461a7.868,7.868,0,0,1-3.043,2.1A11.435,11.435,0,0,1,146.563.384Zm14.31-.051a2.954,2.954,0,0,1-2.167-.9,2.954,2.954,0,0,1-.9-2.167,2.919,2.919,0,0,1,.9-2.148,2.965,2.965,0,0,1,2.167-.895,2.985,2.985,0,0,1,2.148.895,2.889,2.889,0,0,1,.92,2.148,2.884,2.884,0,0,1-.428,1.54,3.286,3.286,0,0,1-1.119,1.112A2.9,2.9,0,0,1,160.873.332Z" transform="translate(110.385 62)" fill="#2a282d"/><g transform="translate(51.885 25)"><g transform="translate(2.6 2.209)"><path d="M52.661,65.423h-1.4l-.091-.468h-.208l-.078.351-.078.065H49.646l-.065-.169-.091-.338h-.221v.208l-.118.065-3.859-.326L44.5,64.4v-.871a7.436,7.436,0,0,1,.156-1.079c.182-.883.546-1.962,2.833-5.224s3.08-4.481,4.665-10.3l.078-.324c.468-1.975.806-3.132.936-3.547V34.524a25.625,25.625,0,0,1,.312-2.82h0c.143-.923.312-1.754.468-2.4a21.623,21.623,0,0,0,.195,43.218,41.171,41.171,0,0,1-.845-6.8.668.668,0,0,0-.637-.3Z" transform="translate(-33.181 -29.3)" fill="#2a282d"/><path d="M34.658,65.423h1.4l.091-.468h.209l.078.351.078.065h1.157l.065-.169.091-.338h.221v.208l.118.065,3.857-.326.793-.416v-.871a7.436,7.436,0,0,0-.156-1.079c-.182-.883-.546-1.962-2.833-5.224s-3.08-4.481-4.665-10.3l-.078-.324c-.468-1.975-.806-3.132-.936-3.547V34.524a25.63,25.63,0,0,0-.312-2.82h0c-.143-.923-.312-1.754-.468-2.4a21.623,21.623,0,0,1-.195,43.218,41.171,41.171,0,0,0,.845-6.8.668.668,0,0,1,.637-.3Z" transform="translate(-11.738 -29.3)" fill="#2a282d"/></g><path d="M23.779,1.169a22.61,22.61,0,1,0,22.61,22.61,22.61,22.61,0,0,0-22.61-22.61m0-1.169A23.779,23.779,0,1,1,0,23.779,23.779,23.779,0,0,1,23.779,0Z" transform="translate(0 0)" fill="#2a282d"/></g></g></svg>
Binary file
Binary file
package/mixins.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- export declare const Fetcher: <T extends new (...args: any[]) => mySubscriber.SubscriberInterface>(superClass: T) => {
1
+ /// <reference types="node" />
2
+ export declare const Fetcher: <PropsType = any, T extends new (...args: any[]) => mySubscriber.SubscriberInterface<PropsType> = any>(superClass: T, propsType?: PropsType | undefined) => {
2
3
  new (...args: any[]): {
3
- api: import("./core/utils/api").default | null;
4
+ api: import("./core/utils/api").default<any, any> | null;
4
5
  key: String;
5
6
  isFirstLoad: boolean;
6
7
  isLoading: boolean;
@@ -9,13 +10,16 @@ export declare const Fetcher: <T extends new (...args: any[]) => mySubscriber.Su
9
10
  isFetchEnabled: boolean;
10
11
  _endPoint: string;
11
12
  endPoint: string;
13
+ requestId: number;
14
+ refetchEveryMs: number;
15
+ refetchTimeOutId?: NodeJS.Timeout | undefined;
12
16
  _fetchData(): Promise<void>;
13
- onInvalidate: any;
17
+ onInvalidate?: (() => void) | undefined;
14
18
  disconnectedCallback(): void;
15
19
  connectedCallback(): void;
16
20
  firstUpdated(): void;
17
21
  onIntersection(entries: IntersectionObserverEntry[]): void;
18
- props: any;
22
+ props: PropsType | null;
19
23
  propertyMap: Object;
20
24
  isConnected: boolean;
21
25
  getAncestorAttributeValue(attributeName: string): string;
@@ -27,6 +31,7 @@ export declare const Fetcher: <T extends new (...args: any[]) => mySubscriber.Su
27
31
  debug: HTMLElement | null;
28
32
  defferedDebug: boolean | null;
29
33
  displayContents: boolean;
34
+ shadowRoot?: ShadowRoot | undefined;
30
35
  dispatchEvent(event: Event): void;
31
36
  setAttribute(name: string, value: string): void;
32
37
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
@@ -46,22 +51,32 @@ export declare const FormCheckable: <T extends new (...args: any[]) => myFormEle
46
51
  forceAutoFill: boolean;
47
52
  unique: true | null;
48
53
  radio: true | null;
49
- _checked: true | null;
50
- checked: true | null;
54
+ unCheckOnDisconnect: boolean;
55
+ _checked: true | "indeterminate" | null;
56
+ checked: true | "indeterminate" | null;
51
57
  validateFormElement(): void;
52
- setCheckedValue(checked: true | null): void;
58
+ checksAll(): boolean;
59
+ setCheckedValue(checked: true | "indeterminate" | null): void;
53
60
  handleChange(): void;
54
61
  getValueForFormPublisher(): any;
55
- setFormValueFromPublisher(value: any): void;
56
- initPublisher(): void;
62
+ setFormValueFromPublisher(value: string | (string | null)[] | null): void;
63
+ getCheckAllPublisher(): any;
64
+ updateAllChecked: () => void;
65
+ onChecksAllRequest: (value: string) => void;
66
+ disconnectedCallback(): void;
67
+ connectedCallback(): void;
57
68
  getFormPublisher(): any;
58
69
  updateDataValue(): void;
59
- handleBlur(e?: any): void;
70
+ handleBlur(e?: Event | undefined): void;
71
+ focus?: (() => void) | undefined;
72
+ shadowRoot?: ShadowRoot | undefined;
60
73
  error: boolean;
61
74
  autofocus: boolean;
62
75
  required: boolean;
63
76
  disabled: true | null;
64
77
  formDataProvider: string;
78
+ ariaLabelledby?: string | undefined;
79
+ ariaLabel?: string | undefined;
65
80
  _name: string;
66
81
  name: string;
67
82
  props: any;
@@ -81,16 +96,15 @@ export declare const FormCheckable: <T extends new (...args: any[]) => myFormEle
81
96
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
82
97
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
83
98
  removeAttribute(name: string): void;
99
+ initPublisher(): void;
84
100
  getApiConfiguration(): import("./core/utils/api").APIConfiguration;
85
- connectedCallback(): void;
86
101
  requestUpdate(): void;
87
102
  getAttribute(name: string): string;
88
103
  hasAttribute(attributeName: String): boolean;
89
- disconnectedCallback(): void;
90
104
  };
91
105
  } & T;
92
106
  import * as myFormElement from "@supersoniks/concorde/core/mixins/FormElement";
93
- export declare const FormElement: <T extends new (...args: any[]) => mySubscriber.SubscriberInterface>(superClass: T) => (new (...args: any[]) => myFormElement.FormElementInterface) & T;
107
+ export declare const FormElement: <T extends new (...args: any[]) => mySubscriber.SubscriberInterface<any>>(superClass: T) => (new (...args: any[]) => myFormElement.FormElementInterface) & T;
94
108
  export declare const FormInput: <T extends new (...args: any[]) => myFormElement.FormElementInterface>(superClass: T) => {
95
109
  new (...args: any[]): {
96
110
  validateFormElement(): void;
@@ -105,16 +119,20 @@ export declare const FormInput: <T extends new (...args: any[]) => myFormElement
105
119
  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;
106
120
  getFormPublisher(): any;
107
121
  updateDataValue(): void;
108
- handleChange(e?: any): void;
109
- handleBlur(e?: any): void;
122
+ handleChange(e?: Event | undefined): void;
123
+ handleBlur(e?: Event | undefined): void;
110
124
  getValueForFormPublisher(): any;
125
+ focus?: (() => void) | undefined;
126
+ shadowRoot?: ShadowRoot | undefined;
111
127
  error: boolean;
112
128
  autofocus: boolean;
113
129
  required: boolean;
114
130
  disabled: true | null;
115
131
  formDataProvider: string;
116
- _value: any;
117
- value: any;
132
+ ariaLabelledby?: string | undefined;
133
+ ariaLabel?: string | undefined;
134
+ _value: string | null;
135
+ value: string | null;
118
136
  _name: string;
119
137
  name: string;
120
138
  props: any;
@@ -144,6 +162,6 @@ export declare const FormInput: <T extends new (...args: any[]) => myFormElement
144
162
  };
145
163
  } & T;
146
164
  import * as mySubscriber from "@supersoniks/concorde/core/mixins/Subscriber";
147
- export declare const Subscriber: <T extends new (...args: any[]) => import("lit").LitElement>(superClass: T) => (new (...args: any[]) => mySubscriber.SubscriberInterface) & T;
165
+ export declare const Subscriber: <PropsType = any, T extends new (...args: any[]) => import("lit").LitElement = any>(superClass: T, type?: PropsType | undefined) => (new (...args: any[]) => mySubscriber.SubscriberInterface<PropsType>) & T;
148
166
  import * as myTemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
149
167
  export declare const TemplatesContainer: <T extends new (...args: any[]) => import("lit").LitElement>(superClass: T) => (new (...args: any[]) => myTemplatesContainer.TemplatesContainerInterface) & T;
package/mixins.js CHANGED
@@ -11,13 +11,12 @@ import * as mySubscriber from "@supersoniks/concorde/core/mixins/Subscriber";
11
11
  export const Subscriber = mySubscriber.default;
12
12
  import * as myTemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
13
13
  export const TemplatesContainer = myTemplatesContainer.default;
14
- let win = window;
15
- win["concorde-mixins"] = win["concorde-mixins"] || {};
16
- win["concorde-mixins"] = {
14
+ window["concorde-mixins"] = window["concorde-mixins"] || {};
15
+ window["concorde-mixins"] = {
17
16
  Fetcher: Fetcher,
18
17
  FormCheckable: FormCheckable,
19
18
  FormElement: FormElement,
20
19
  FormInput: FormInput,
21
20
  Subscriber: Subscriber,
22
- TemplatesContainer: TemplatesContainer
21
+ TemplatesContainer: TemplatesContainer,
23
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supersoniks/concorde",
3
- "version": "1.1.41",
3
+ "version": "1.1.43",
4
4
  "customElements": "custom-elements.json",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -9,25 +9,38 @@
9
9
  "dependencies": {
10
10
  "@lit-labs/motion": "^1.0.1",
11
11
  "@lit-labs/observers": "^1.0.1",
12
+ "@types/prismjs": "^1.26.0",
12
13
  "chart.js": "^3.9.1",
14
+ "intl": "^1.2.5",
13
15
  "jsbarcode": "^3.11.5",
14
16
  "lit": "^2.2.3",
17
+ "marked": "^4.2.2",
18
+ "prismjs": "^1.29.0",
15
19
  "url-pattern": "^1.0.3"
16
20
  },
17
21
  "devDependencies": {
18
22
  "@tailwindcss/typography": "^0.5.2",
23
+ "@types/intl": "^1.2.0",
24
+ "@types/jest": "^29.2.6",
25
+ "@types/node": "^18.11.18",
19
26
  "autoprefixer": "^10.4.5",
27
+ "intl": "^1.2.5",
28
+ "jest": "^29.3.1",
29
+ "jest-environment-jsdom": "^29.3.1",
20
30
  "postcss": "^8.4.12",
21
31
  "rollup-plugin-minify-html-literals": "^1.2.6",
22
32
  "rollup-plugin-postcss-lit": "^2.0.0",
33
+ "swagger-typescript-api": "^12.0.2",
23
34
  "tailwindcss": "^3.0.23",
35
+ "ts-jest": "^29.0.5",
36
+ "ts-node": "^10.9.1",
24
37
  "typescript": "^4.6.4",
25
- "vite": "^2.6.14"
38
+ "vite": "^2.6.14",
39
+ "vite-jest": "^0.1.4"
26
40
  },
27
41
  "exports": {
28
42
  "./components": "./components.js",
29
- "./core/components/functional/configuration/configuration": "./core/components/functional/configuration/configuration.js",
30
- "./functional/configuration": "./core/components/functional/configuration/configuration.js",
43
+ "./core/_types/types": "./core/_types/types.js",
31
44
  "./core/components/functional/date/date": "./core/components/functional/date/date.js",
32
45
  "./functional/date": "./core/components/functional/date/date.js",
33
46
  "./core/components/functional/example/example": "./core/components/functional/example/example.js",
@@ -36,10 +49,14 @@
36
49
  "./functional/fetch": "./core/components/functional/fetch/fetch.js",
37
50
  "./core/components/functional/functional": "./core/components/functional/functional.js",
38
51
  "./functional": "./core/components/functional/functional.js",
52
+ "./core/components/functional/if/if.test": "./core/components/functional/if/if.test.js",
53
+ "./functional/if/if.test": "./core/components/functional/if/if.test.js",
39
54
  "./core/components/functional/if/if": "./core/components/functional/if/if.js",
40
55
  "./functional/if": "./core/components/functional/if/if.js",
41
56
  "./core/components/functional/list/list": "./core/components/functional/list/list.js",
42
57
  "./functional/list": "./core/components/functional/list/list.js",
58
+ "./core/components/functional/mix/mix": "./core/components/functional/mix/mix.js",
59
+ "./functional/mix": "./core/components/functional/mix/mix.js",
43
60
  "./core/components/functional/queue/queue": "./core/components/functional/queue/queue.js",
44
61
  "./functional/queue": "./core/components/functional/queue/queue.js",
45
62
  "./core/components/functional/router/redirect": "./core/components/functional/router/redirect.js",
@@ -48,6 +65,10 @@
48
65
  "./functional/router": "./core/components/functional/router/router.js",
49
66
  "./core/components/functional/sdui/SDUIDescriptorTransformer": "./core/components/functional/sdui/SDUIDescriptorTransformer.js",
50
67
  "./functional/sdui/SDUIDescriptorTransformer": "./core/components/functional/sdui/SDUIDescriptorTransformer.js",
68
+ "./core/components/functional/sdui/default-library.json": "./core/components/functional/sdui/default-library.json",
69
+ "./functional/sdui/default-library.json": "./core/components/functional/sdui/default-library.json",
70
+ "./core/components/functional/sdui/sdui-utils": "./core/components/functional/sdui/sdui-utils.js",
71
+ "./functional/sdui/sdui-utils": "./core/components/functional/sdui/sdui-utils.js",
51
72
  "./core/components/functional/sdui/sdui": "./core/components/functional/sdui/sdui.js",
52
73
  "./functional/sdui": "./core/components/functional/sdui/sdui.js",
53
74
  "./core/components/functional/sdui/types": "./core/components/functional/sdui/types.js",
@@ -60,6 +81,8 @@
60
81
  "./functional/submit": "./core/components/functional/submit/submit.js",
61
82
  "./core/components/functional/subscriber/subscriber": "./core/components/functional/subscriber/subscriber.js",
62
83
  "./functional/subscriber": "./core/components/functional/subscriber/subscriber.js",
84
+ "./core/components/functional/value/value": "./core/components/functional/value/value.js",
85
+ "./functional/value": "./core/components/functional/value/value.js",
63
86
  "./core/components/ui/_css/scroll": "./core/components/ui/_css/scroll.js",
64
87
  "./ui/_css/scroll": "./core/components/ui/_css/scroll.js",
65
88
  "./core/components/ui/_css/size": "./core/components/ui/_css/size.js",
@@ -106,6 +129,8 @@
106
129
  "./ui/form/input/password-helper": "./core/components/ui/form/input/password-helper.js",
107
130
  "./core/components/ui/form/input/same-value-helper": "./core/components/ui/form/input/same-value-helper.js",
108
131
  "./ui/form/input/same-value-helper": "./core/components/ui/form/input/same-value-helper.js",
132
+ "./core/components/ui/form/input-autocomplete/input-autocomplete": "./core/components/ui/form/input-autocomplete/input-autocomplete.js",
133
+ "./ui/form/input-autocomplete": "./core/components/ui/form/input-autocomplete/input-autocomplete.js",
109
134
  "./core/components/ui/form/radio/radio": "./core/components/ui/form/radio/radio.js",
110
135
  "./ui/form/radio": "./core/components/ui/form/radio/radio.js",
111
136
  "./core/components/ui/form/select/select": "./core/components/ui/form/select/select.js",
@@ -166,10 +191,6 @@
166
191
  "./ui/table/table-tr": "./core/components/ui/table/table-tr.js",
167
192
  "./core/components/ui/table/table": "./core/components/ui/table/table.js",
168
193
  "./ui/table": "./core/components/ui/table/table.js",
169
- "./core/components/ui/tabs/tab": "./core/components/ui/tabs/tab.js",
170
- "./ui/tabs/tab": "./core/components/ui/tabs/tab.js",
171
- "./core/components/ui/tabs/tabs": "./core/components/ui/tabs/tabs.js",
172
- "./ui/tabs": "./core/components/ui/tabs/tabs.js",
173
194
  "./core/components/ui/taxonomy/taxonomy": "./core/components/ui/taxonomy/taxonomy.js",
174
195
  "./ui/taxonomy": "./core/components/ui/taxonomy/taxonomy.js",
175
196
  "./core/components/ui/theme/theme-collection/core-variables": "./core/components/ui/theme/theme-collection/core-variables.js",
@@ -222,13 +243,29 @@
222
243
  "./utils/LocationHandler": "./core/utils/LocationHandler.js",
223
244
  "./core/utils/Objects": "./core/utils/Objects.js",
224
245
  "./utils/Objects": "./core/utils/Objects.js",
225
- "./core/utils/PublisherProxy.mjs": "./core/utils/PublisherProxy.mjs",
226
- "./utils/PublisherProxy.mjs": "./core/utils/PublisherProxy.mjs",
246
+ "./core/utils/PublisherProxy": "./core/utils/PublisherProxy.js",
247
+ "./utils/PublisherProxy": "./core/utils/PublisherProxy.js",
248
+ "./core/utils/Utils": "./core/utils/Utils.js",
249
+ "./utils/Utils": "./core/utils/Utils.js",
227
250
  "./core/utils/api": "./core/utils/api.js",
228
251
  "./utils/api": "./core/utils/api.js",
252
+ "./docs/code": "./docs/code.js",
253
+ "./docs/docs": "./docs/docs.js",
254
+ "./docs": "./docs.js",
255
+ "./docs/example/users": "./docs/example/users.js",
256
+ "./docs/navigation/navigation": "./docs/navigation/navigation.js",
257
+ "./docs/navigation": "./docs/navigation/navigation.js",
258
+ "./docs/prism/index": "./docs/prism/index.js",
259
+ "./docs/search/doc-search.json": "./docs/search/doc-search.json",
260
+ "./docs/search/docs-search.json": "./docs/search/docs-search.json",
261
+ "./docs/search/markdown-renderer": "./docs/search/markdown-renderer.js",
262
+ "./docs/search/page": "./docs/search/page.js",
263
+ "./docs/search/search": "./docs/search/search.js",
264
+ "./docs/search": "./docs/search/search.js",
229
265
  "./index-billetterie": "./index-billetterie.js",
230
266
  "./index-shared": "./index-shared.js",
231
267
  "./index": "./index.js",
268
+ "./test-utils/TestUtils": "./test-utils/TestUtils.js",
232
269
  "./utils": "./utils.js",
233
270
  ".": "./core/core"
234
271
  },
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M576 256C576 305 502.1 336 464.2 336H382.2L282.4 496C276.4 506 266.4 512 254.4 512H189.5C179.5 512 169.5 508 163.5 500C157.6 492 155.6 480.1 158.6 471L201.5 336H152.5L113.6 388C107.6 396 98.61 400 88.62 400H31.7C22.72 400 12.73 396 6.74 388C.7485 380-1.248 370 1.747 360L31.7 256L.7488 152C-1.248 143 .7488 133 6.74 125C12.73 117 22.72 112 31.7 112H88.62C98.61 112 107.6 117 113.6 125L152.5 176H201.5L158.6 41C155.6 32 157.6 21 163.5 13C169.5 5 179.5 0 189.5 0H254.4C265.4 0 277.4 7 281.4 16L381.2 176H463.2C502.1 176 576 208 576 256H576zM527.1 256C525.1 246 489.1 224 463.2 224H355.3L245.4 48H211.5L266.4 224H128.6L80.63 160H53.67L81.63 256L53.67 352H80.63L128.6 288H266.4L211.5 464H245.4L355.3 288H463.2C490.1 288 526.1 267 527.1 256V256z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M482.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-116.6 0L265.2 495.9c-5.7 10-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.2-15.4-20.4l49-171.6L112 320 68.8 377.6c-3 4-7.8 6.4-12.8 6.4l-42 0c-7.8 0-14-6.3-14-14c0-1.3 .2-2.6 .5-3.9L32 256 .5 145.9c-.4-1.3-.5-2.6-.5-3.9c0-7.8 6.3-14 14-14l42 0c5 0 9.8 2.4 12.8 6.4L112 192l102.9 0-49-171.6C162.9 10.2 170.6 0 181.2 0l56.2 0c11.5 0 22.1 6.2 27.8 16.1L365.7 192l116.6 0z"/></svg>
@@ -0,0 +1,4 @@
1
+ import "intl/locale-data/jsonp/fr";
2
+ export default class TestUtils {
3
+ static bootstrap(html: string): HTMLCollection;
4
+ }
@@ -0,0 +1,12 @@
1
+ import { jest } from "@jest/globals";
2
+ import IntlPolyfill from "intl";
3
+ import "intl/locale-data/jsonp/fr";
4
+ export default class TestUtils {
5
+ static bootstrap(html) {
6
+ jest.spyOn(global.Intl, "DateTimeFormat").mockImplementation(() => new IntlPolyfill.DateTimeFormat());
7
+ const container = document.createElement("div");
8
+ container.innerHTML = html;
9
+ document.body.appendChild(container);
10
+ return container.children;
11
+ }
12
+ }
package/utils.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import * as myUtils from "@supersoniks/concorde/core/utils/Utils";
2
+ export declare const Utils: typeof myUtils.default;
1
3
  import * as myArrays from "@supersoniks/concorde/core/utils/Arrays";
2
4
  export declare const Arrays: typeof myArrays.default;
3
5
  import * as myDataBindObserver from "@supersoniks/concorde/core/utils/DataBindObserver";
@@ -10,7 +12,7 @@ import * as myLocationHandler from "@supersoniks/concorde/core/utils/LocationHan
10
12
  export declare const LocationHandler: typeof myLocationHandler.default;
11
13
  import * as myObjects from "@supersoniks/concorde/core/utils/Objects";
12
14
  export declare const Objects: typeof myObjects.default;
13
- import * as myPublisherProxy from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
15
+ import * as myPublisherProxy from "@supersoniks/concorde/core/utils/PublisherProxy";
14
16
  export declare const PublisherProxy: typeof myPublisherProxy.default;
15
17
  export declare const PublisherManager: typeof myPublisherProxy.PublisherManager;
16
18
  import * as myApi from "@supersoniks/concorde/core/utils/api";
package/utils.js CHANGED
@@ -1,5 +1,7 @@
1
1
  //
2
2
  //
3
+ import * as myUtils from "@supersoniks/concorde/core/utils/Utils";
4
+ export const Utils = myUtils.default;
3
5
  import * as myArrays from "@supersoniks/concorde/core/utils/Arrays";
4
6
  export const Arrays = myArrays.default;
5
7
  import * as myDataBindObserver from "@supersoniks/concorde/core/utils/DataBindObserver";
@@ -12,14 +14,14 @@ import * as myLocationHandler from "@supersoniks/concorde/core/utils/LocationHan
12
14
  export const LocationHandler = myLocationHandler.default;
13
15
  import * as myObjects from "@supersoniks/concorde/core/utils/Objects";
14
16
  export const Objects = myObjects.default;
15
- import * as myPublisherProxy from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
17
+ import * as myPublisherProxy from "@supersoniks/concorde/core/utils/PublisherProxy";
16
18
  export const PublisherProxy = myPublisherProxy.default;
17
19
  export const PublisherManager = myPublisherProxy.PublisherManager;
18
20
  import * as myApi from "@supersoniks/concorde/core/utils/api";
19
21
  export const api = myApi.default;
20
- let win = window;
21
- win["concorde-utils"] = win["concorde-utils"] || {};
22
- win["concorde-utils"] = {
22
+ window["concorde-utils"] = window["concorde-utils"] || {};
23
+ window["concorde-utils"] = {
24
+ Utils: Utils,
23
25
  Arrays: Arrays,
24
26
  DataBindObserver: DataBindObserver,
25
27
  Format: Format,
@@ -28,5 +30,5 @@ win["concorde-utils"] = {
28
30
  Objects: Objects,
29
31
  PublisherProxy: PublisherProxy,
30
32
  PublisherManager: PublisherManager,
31
- api: api
33
+ api: api,
32
34
  };
@@ -1,5 +0,0 @@
1
- import { LitElement } from "lit";
2
- export declare class SonicConfiguration extends LitElement {
3
- isSonicConfig: boolean;
4
- render(): import("lit-html").TemplateResult<1>;
5
- }
@@ -1,22 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, LitElement } from "lit";
8
- import { customElement } from "lit/decorators.js";
9
- const tagName = "sonic-radio";
10
- let SonicConfiguration = class SonicConfiguration extends LitElement {
11
- constructor() {
12
- super(...arguments);
13
- this.isSonicConfig = true;
14
- }
15
- render() {
16
- return html `<slot></slot>`;
17
- }
18
- };
19
- SonicConfiguration = __decorate([
20
- customElement(tagName)
21
- ], SonicConfiguration);
22
- export { SonicConfiguration };
@@ -1,6 +0,0 @@
1
- import { Button } from "@supersoniks/concorde/core/components/ui/button/button";
2
- export declare class Tab extends Button {
3
- static styles: (import("lit").CSSResult | import("lit").CSSResultGroup[])[];
4
- constructor();
5
- connectedCallback(): void;
6
- }
@@ -1,46 +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 } from "lit";
8
- import { customElement } from "lit/decorators.js";
9
- import { Button } from "@supersoniks/concorde/core/components/ui/button/button";
10
- let Tab = class Tab extends Button {
11
- constructor() {
12
- super();
13
- }
14
- connectedCallback() {
15
- if (!this.hasAttribute("variant")) {
16
- this.variant = "ghost";
17
- }
18
- super.connectedCallback();
19
- }
20
- };
21
- Tab.styles = [
22
- Button.styles,
23
- css `
24
- :host {
25
- --sc-tab-white-space : nowrap;
26
- --sc-tab-flex-wrap : nowrap ;
27
- flex-wrap:nowrap;
28
- scroll-snap-align: start;
29
- }
30
-
31
- button {
32
- flex-wrap:var(--sc-tab-flex-wrap) !important;
33
- white-space:var(--sc-tab-white-space);
34
- }
35
-
36
- `,
37
- ];
38
- Tab = __decorate([
39
- customElement("sonic-tab")
40
- ], Tab);
41
- export { Tab };
42
- //Ajout pour Storybook
43
- try {
44
- customElements.define("sonic-tab", Tab);
45
- }
46
- catch (e) { }
@@ -1,15 +0,0 @@
1
- import { LitElement, PropertyValues } from "lit";
2
- import { ResizeController } from "@lit-labs/observers/resize_controller.js";
3
- export declare class Tabs extends LitElement {
4
- static styles: import("lit").CSSResult[];
5
- size: "md" | "xs" | "sm" | "lg";
6
- direction: "" | "row" | "column";
7
- icon: boolean;
8
- moreShape: "square" | "circle";
9
- menu: HTMLElement;
10
- _resizeController: ResizeController;
11
- updated(_changedProperties: PropertyValues): void;
12
- firstUpdated(): void;
13
- _setChildrenSize(): void;
14
- render(): import("lit-html").TemplateResult<1>;
15
- }