@supersoniks/concorde 1.1.31 → 1.1.35

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 (202) 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 +102 -115
  6. package/concorde-core.es.js +7589 -55
  7. package/core/components/functional/configuration/configuration.d.ts +0 -0
  8. package/core/components/functional/configuration/configuration.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 +0 -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/list/list.d.ts +0 -0
  20. package/core/components/functional/list/list.js +0 -0
  21. package/core/components/functional/queue/queue.d.ts +4 -1
  22. package/core/components/functional/queue/queue.js +16 -3
  23. package/core/components/functional/router/redirect.d.ts +0 -0
  24. package/core/components/functional/router/redirect.js +0 -0
  25. package/core/components/functional/router/router.d.ts +0 -0
  26. package/core/components/functional/router/router.js +0 -0
  27. package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -0
  28. package/core/components/functional/sonic-scope/sonic-scope.js +0 -0
  29. package/core/components/functional/states/states.d.ts +0 -0
  30. package/core/components/functional/states/states.js +0 -0
  31. package/core/components/functional/submit/submit.d.ts +0 -0
  32. package/core/components/functional/submit/submit.js +35 -21
  33. package/core/components/functional/subscriber/subscriber.d.ts +0 -0
  34. package/core/components/functional/subscriber/subscriber.js +0 -0
  35. package/core/components/ui/_css/scroll.d.ts +0 -0
  36. package/core/components/ui/_css/scroll.js +0 -0
  37. package/core/components/ui/_css/size.d.ts +0 -0
  38. package/core/components/ui/_css/size.js +0 -0
  39. package/core/components/ui/_css/type.d.ts +0 -0
  40. package/core/components/ui/_css/type.js +0 -0
  41. package/core/components/ui/alert/alert.d.ts +0 -0
  42. package/core/components/ui/alert/alert.js +0 -0
  43. package/core/components/ui/badge/badge.d.ts +0 -0
  44. package/core/components/ui/badge/badge.js +0 -0
  45. package/core/components/ui/button/button.d.ts +3 -2
  46. package/core/components/ui/button/button.js +0 -0
  47. package/core/components/ui/captcha/captcha.d.ts +1 -0
  48. package/core/components/ui/captcha/captcha.js +14 -2
  49. package/core/components/ui/card/card-footer.d.ts +0 -0
  50. package/core/components/ui/card/card-footer.js +0 -0
  51. package/core/components/ui/card/card-header-descripton.d.ts +0 -0
  52. package/core/components/ui/card/card-header-descripton.js +0 -0
  53. package/core/components/ui/card/card-header.d.ts +0 -0
  54. package/core/components/ui/card/card-header.js +0 -0
  55. package/core/components/ui/card/card-main.d.ts +0 -0
  56. package/core/components/ui/card/card-main.js +0 -0
  57. package/core/components/ui/card/card.d.ts +0 -0
  58. package/core/components/ui/card/card.js +0 -0
  59. package/core/components/ui/divider/divider.d.ts +0 -0
  60. package/core/components/ui/divider/divider.js +0 -0
  61. package/core/components/ui/form/checkbox/checkbox.d.ts +11 -44
  62. package/core/components/ui/form/checkbox/checkbox.js +28 -35
  63. package/core/components/ui/form/css/form-control.d.ts +0 -0
  64. package/core/components/ui/form/css/form-control.js +0 -0
  65. package/core/components/ui/form/fieldset/fieldset.d.ts +0 -0
  66. package/core/components/ui/form/fieldset/fieldset.js +0 -0
  67. package/core/components/ui/form/fieldset/legend-description.d.ts +0 -0
  68. package/core/components/ui/form/fieldset/legend-description.js +0 -0
  69. package/core/components/ui/form/fieldset/legend.d.ts +7 -2
  70. package/core/components/ui/form/fieldset/legend.js +34 -8
  71. package/core/components/ui/form/form-actions/form-actions.d.ts +0 -0
  72. package/core/components/ui/form/form-actions/form-actions.js +0 -0
  73. package/core/components/ui/form/form-layout/form-layout.d.ts +0 -0
  74. package/core/components/ui/form/form-layout/form-layout.js +0 -0
  75. package/core/components/ui/form/input/input.d.ts +6 -2
  76. package/core/components/ui/form/input/input.js +4 -13
  77. package/core/components/ui/form/radio/radio.d.ts +0 -0
  78. package/core/components/ui/form/radio/radio.js +0 -0
  79. package/core/components/ui/form/select/select.d.ts +7 -2
  80. package/core/components/ui/form/select/select.js +32 -7
  81. package/core/components/ui/form/textarea/textarea.d.ts +6 -2
  82. package/core/components/ui/form/textarea/textarea.js +2 -7
  83. package/core/components/ui/group/group.d.ts +0 -0
  84. package/core/components/ui/group/group.js +0 -0
  85. package/core/components/ui/icon/icon.d.ts +0 -0
  86. package/core/components/ui/icon/icon.js +0 -0
  87. package/core/components/ui/icon/icons.d.ts +0 -0
  88. package/core/components/ui/icon/icons.js +0 -0
  89. package/core/components/ui/icon/icons.json +0 -0
  90. package/core/components/ui/image/image.d.ts +0 -0
  91. package/core/components/ui/image/image.js +0 -0
  92. package/core/components/ui/link/link.d.ts +0 -0
  93. package/core/components/ui/link/link.js +0 -0
  94. package/core/components/ui/loader/loader.d.ts +0 -0
  95. package/core/components/ui/loader/loader.js +0 -0
  96. package/core/components/ui/loader/styles/fixed.d.ts +0 -0
  97. package/core/components/ui/loader/styles/fixed.js +0 -0
  98. package/core/components/ui/loader/styles/inline.d.ts +0 -0
  99. package/core/components/ui/loader/styles/inline.js +0 -0
  100. package/core/components/ui/menu/menu-item.d.ts +0 -0
  101. package/core/components/ui/menu/menu-item.js +0 -0
  102. package/core/components/ui/menu/menu.d.ts +0 -0
  103. package/core/components/ui/menu/menu.js +0 -0
  104. package/core/components/ui/modal/modal-actions.d.ts +0 -0
  105. package/core/components/ui/modal/modal-actions.js +0 -0
  106. package/core/components/ui/modal/modal-close.d.ts +0 -0
  107. package/core/components/ui/modal/modal-close.js +0 -0
  108. package/core/components/ui/modal/modal-content.d.ts +0 -0
  109. package/core/components/ui/modal/modal-content.js +0 -0
  110. package/core/components/ui/modal/modal-subtitle.d.ts +0 -0
  111. package/core/components/ui/modal/modal-subtitle.js +0 -0
  112. package/core/components/ui/modal/modal-title.d.ts +0 -0
  113. package/core/components/ui/modal/modal-title.js +0 -0
  114. package/core/components/ui/modal/modal.d.ts +0 -0
  115. package/core/components/ui/modal/modal.js +0 -0
  116. package/core/components/ui/pop/pop.d.ts +0 -0
  117. package/core/components/ui/pop/pop.js +0 -0
  118. package/core/components/ui/progress/progress.d.ts +0 -0
  119. package/core/components/ui/progress/progress.js +0 -0
  120. package/core/components/ui/table/table-caption.d.ts +0 -0
  121. package/core/components/ui/table/table-caption.js +0 -0
  122. package/core/components/ui/table/table-tbody.d.ts +0 -0
  123. package/core/components/ui/table/table-tbody.js +0 -0
  124. package/core/components/ui/table/table-td.d.ts +0 -0
  125. package/core/components/ui/table/table-td.js +0 -0
  126. package/core/components/ui/table/table-tfoot.d.ts +0 -0
  127. package/core/components/ui/table/table-tfoot.js +0 -0
  128. package/core/components/ui/table/table-th.d.ts +0 -0
  129. package/core/components/ui/table/table-th.js +0 -0
  130. package/core/components/ui/table/table-thead.d.ts +0 -0
  131. package/core/components/ui/table/table-thead.js +0 -0
  132. package/core/components/ui/table/table-tr.d.ts +0 -0
  133. package/core/components/ui/table/table-tr.js +0 -0
  134. package/core/components/ui/table/table.d.ts +0 -0
  135. package/core/components/ui/table/table.js +0 -0
  136. package/core/components/ui/tabs/tab.d.ts +0 -0
  137. package/core/components/ui/tabs/tab.js +0 -0
  138. package/core/components/ui/tabs/tabs.d.ts +0 -0
  139. package/core/components/ui/tabs/tabs.js +0 -0
  140. package/core/components/ui/taxonomy/taxonomy.d.ts +0 -0
  141. package/core/components/ui/taxonomy/taxonomy.js +0 -0
  142. package/core/components/ui/theme/css/tailwind.css +0 -0
  143. package/core/components/ui/theme/css/tailwind.d.ts +0 -0
  144. package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -0
  145. package/core/components/ui/theme/theme-collection/core-variables.js +0 -0
  146. package/core/components/ui/theme/theme-collection/dark.d.ts +0 -0
  147. package/core/components/ui/theme/theme-collection/dark.js +0 -0
  148. package/core/components/ui/theme/theme-collection/light.d.ts +0 -0
  149. package/core/components/ui/theme/theme-collection/light.js +0 -0
  150. package/core/components/ui/theme/theme.d.ts +0 -0
  151. package/core/components/ui/theme/theme.js +0 -0
  152. package/core/components/ui/toast/message-subscriber.d.ts +0 -0
  153. package/core/components/ui/toast/message-subscriber.js +0 -0
  154. package/core/components/ui/toast/toast-item.d.ts +0 -0
  155. package/core/components/ui/toast/toast-item.js +0 -0
  156. package/core/components/ui/toast/toast.d.ts +0 -0
  157. package/core/components/ui/toast/toast.js +0 -0
  158. package/core/components/ui/toast/types.d.ts +0 -0
  159. package/core/components/ui/toast/types.js +0 -0
  160. package/core/components/ui/tooltip/tooltip.d.ts +0 -0
  161. package/core/components/ui/tooltip/tooltip.js +0 -0
  162. package/core/components/ui/ui.d.ts +0 -0
  163. package/core/components/ui/ui.js +0 -0
  164. package/core/core.d.ts +0 -0
  165. package/core/core.js +0 -0
  166. package/core/mixins/Fetcher.d.ts +0 -0
  167. package/core/mixins/Fetcher.js +0 -0
  168. package/core/mixins/FormCheckable.d.ts +3 -5
  169. package/core/mixins/FormCheckable.js +4 -15
  170. package/core/mixins/FormElement.d.ts +0 -0
  171. package/core/mixins/FormElement.js +7 -0
  172. package/core/mixins/FormInput.d.ts +8 -5
  173. package/core/mixins/FormInput.js +39 -2
  174. package/core/mixins/Subscriber.d.ts +0 -0
  175. package/core/mixins/Subscriber.js +4 -0
  176. package/core/mixins/TemplatesContainer.d.ts +0 -0
  177. package/core/mixins/TemplatesContainer.js +0 -0
  178. package/core/mixins/mixins.d.ts +0 -0
  179. package/core/mixins/mixins.js +0 -0
  180. package/core/utils/Arrays.d.ts +0 -0
  181. package/core/utils/Arrays.js +0 -0
  182. package/core/utils/DataBindObserver.d.ts +0 -0
  183. package/core/utils/DataBindObserver.js +0 -0
  184. package/core/utils/Electron.d.ts +0 -0
  185. package/core/utils/Electron.js +0 -0
  186. package/core/utils/Format.d.ts +0 -0
  187. package/core/utils/Format.js +0 -0
  188. package/core/utils/HTML.d.ts +0 -0
  189. package/core/utils/HTML.js +0 -0
  190. package/core/utils/LocationHandler.d.ts +0 -0
  191. package/core/utils/LocationHandler.js +0 -0
  192. package/core/utils/Objects.d.ts +0 -0
  193. package/core/utils/Objects.js +0 -0
  194. package/core/utils/PublisherProxy.d.mts +0 -0
  195. package/core/utils/PublisherProxy.mjs +0 -0
  196. package/core/utils/api.d.ts +4 -0
  197. package/core/utils/api.js +25 -1
  198. package/mixins.d.ts +9 -2
  199. package/mixins.js +0 -0
  200. package/package.json +1 -1
  201. package/utils.d.ts +0 -0
  202. package/utils.js +0 -0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  import { LitElement, nothing } from "lit";
2
- import '@supersoniks/concorde/core/components/functional/list/list';
2
+ import "@supersoniks/concorde/core/components/functional/list/list";
3
3
  import { PublisherProxy } from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
4
4
  declare const Queue_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
5
5
  export default class Queue extends Queue_base {
@@ -14,6 +14,9 @@ export default class Queue extends Queue_base {
14
14
  limit: number;
15
15
  offset: number;
16
16
  filteredFields: string;
17
+ _displayContents: boolean;
18
+ set displayContents(value: boolean);
19
+ get displayContents(): boolean;
17
20
  static instanceCounter: number;
18
21
  connectedCallback(): void;
19
22
  filterPublisher: PublisherProxy | null;
@@ -8,10 +8,10 @@ var Queue_1;
8
8
  import { html, LitElement, nothing } from "lit";
9
9
  import { customElement, property } from "lit/decorators.js";
10
10
  import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
11
- import { repeat } from 'lit/directives/repeat.js';
11
+ import { repeat } from "lit/directives/repeat.js";
12
12
  import { PublisherManager } from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
13
13
  import { ifDefined } from "lit/directives/if-defined.js";
14
- import '@supersoniks/concorde/core/components/functional/list/list';
14
+ import "@supersoniks/concorde/core/components/functional/list/list";
15
15
  /**
16
16
  *### Une Queue charge du contenu par lot selon l'expression renseignée dans l'attribut *dataProviderExpression*.
17
17
  * * Chaque lot est chargé par un composant [List](./?path=/docs/core-components-functional-list-list--basic) dont le dataProvider créé à partir de l'attribut dataProviderExpression
@@ -39,6 +39,7 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
39
39
  this.limit = 5;
40
40
  this.offset = 0;
41
41
  this.filteredFields = "";
42
+ this._displayContents = false;
42
43
  this.filterPublisher = null;
43
44
  this.filterTimeoutId = undefined;
44
45
  /**
@@ -52,6 +53,12 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
52
53
  this.currentScrollPosition = undefined;
53
54
  this.listDataProviders = [];
54
55
  }
56
+ set displayContents(value) {
57
+ this._displayContents = value;
58
+ }
59
+ get displayContents() {
60
+ return this._displayContents;
61
+ }
55
62
  connectedCallback() {
56
63
  this.noShadowDom = "";
57
64
  this.defferedDebug = this.hasAttribute("debug") || null;
@@ -142,6 +149,8 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
142
149
  this.lastRequestTime = new Date().getTime();
143
150
  }
144
151
  render() {
152
+ let displayStyle = this.displayContents ? "contents" : "inline";
153
+ this.style.display = displayStyle;
145
154
  if (this.currentScrollPosition) {
146
155
  window.requestAnimationFrame(() => {
147
156
  if (document.scrollingElement)
@@ -154,10 +163,11 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
154
163
  return html `
155
164
  ${repeat(this.props, (item) => item.id, (item, index) => {
156
165
  var _a;
157
- let templates = index == 0 ? this.templates : (_a = this.templates) === null || _a === void 0 ? void 0 : _a.filter(elt => elt.getAttribute("data-value") != "no-item");
166
+ let templates = index == 0 ? this.templates : (_a = this.templates) === null || _a === void 0 ? void 0 : _a.filter((elt) => elt.getAttribute("data-value") != "no-item");
158
167
  return html `
159
168
  <sonic-list
160
169
  fetch
170
+ style=${displayStyle}
161
171
  .itemPropertyMap=${this.itemPropertyMap}
162
172
  debug=${ifDefined(this.defferedDebug)}
163
173
  @load=${this.next}
@@ -192,6 +202,9 @@ __decorate([
192
202
  __decorate([
193
203
  property()
194
204
  ], Queue.prototype, "filteredFields", void 0);
205
+ __decorate([
206
+ property()
207
+ ], Queue.prototype, "displayContents", null);
195
208
  __decorate([
196
209
  property({ type: String })
197
210
  ], Queue.prototype, "dataProviderExpression", void 0);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -55,7 +55,7 @@ let Submit = class Submit extends Subscriber(LitElement) {
55
55
  this.api = new API(this.getApiConfiguration());
56
56
  }
57
57
  submit() {
58
- var _a;
58
+ var _a, _b, _c;
59
59
  return __awaiter(this, void 0, void 0, function* () {
60
60
  const formPublisher = PublisherManager.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));
61
61
  //
@@ -70,30 +70,37 @@ let Submit = class Submit extends Subscriber(LitElement) {
70
70
  //
71
71
  //Recup données
72
72
  let method = ((_a = this.getAttribute("method")) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) || "post";
73
- let postData = formPublisher.get();
74
- delete postData.isFormValid;
75
- let headerData = PublisherManager.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();
73
+ let sendAsFormData = this.hasAttribute("sendAsFormData");
74
+ let formData = formPublisher.get();
75
+ delete formData.isFormValid;
76
+ const headerPublisher = PublisherManager.getInstance().get(this.getAncestorAttributeValue("headersDataProvider"));
77
+ let headerData = headerPublisher.get();
76
78
  let result = null;
77
79
  let dataProvider = this.getAncestorAttributeValue("dataProvider");
78
80
  let endPoint = this.endPoint || dataProvider;
79
81
  Loader.show();
80
82
  let sendData = () => __awaiter(this, void 0, void 0, function* () {
81
- var _b, _c, _d, _e;
83
+ var _d, _e, _f, _g, _h;
82
84
  //
83
85
  //envoi données
84
- switch (method) {
85
- case "put":
86
- result = yield ((_b = this.api) === null || _b === void 0 ? void 0 : _b.put(endPoint, postData, headerData));
87
- break;
88
- case "delete":
89
- result = yield ((_c = this.api) === null || _c === void 0 ? void 0 : _c.delete(endPoint, postData, headerData));
90
- break;
91
- case "get":
92
- result = yield ((_d = this.api) === null || _d === void 0 ? void 0 : _d.get(endPoint, headerData));
93
- break;
94
- default:
95
- result = yield ((_e = this.api) === null || _e === void 0 ? void 0 : _e.post(endPoint, postData, headerData));
96
- break;
86
+ if (sendAsFormData) {
87
+ result = yield ((_d = this.api) === null || _d === void 0 ? void 0 : _d.submitFormData(endPoint, formData, headerData));
88
+ }
89
+ else {
90
+ switch (method) {
91
+ case "put":
92
+ result = yield ((_e = this.api) === null || _e === void 0 ? void 0 : _e.put(endPoint, formData, headerData));
93
+ break;
94
+ case "delete":
95
+ result = yield ((_f = this.api) === null || _f === void 0 ? void 0 : _f.delete(endPoint, formData, headerData));
96
+ break;
97
+ case "get":
98
+ result = yield ((_g = this.api) === null || _g === void 0 ? void 0 : _g.get(endPoint, headerData));
99
+ break;
100
+ default:
101
+ result = yield ((_h = this.api) === null || _h === void 0 ? void 0 : _h.post(endPoint, formData, headerData));
102
+ break;
103
+ }
97
104
  }
98
105
  Loader.hide();
99
106
  //Je garde ça, mais normalement il y a toujours quelquechose
@@ -110,9 +117,16 @@ let Submit = class Submit extends Subscriber(LitElement) {
110
117
  if (this.publisher)
111
118
  this.publisher.disabled = false;
112
119
  });
113
- if (formPublisher.needsCaptchaValidation.get()) {
114
- formPublisher.captchaToken = "request_token";
115
- formPublisher.captchaToken.onAssign((token) => {
120
+ let captchaPublisher = headerPublisher.needsCaptchaValidation.get()
121
+ ? headerPublisher
122
+ : formPublisher.needsCaptchaValidation.get()
123
+ ? formPublisher
124
+ : null;
125
+ if (captchaPublisher) {
126
+ captchaPublisher.captchaMethod = method;
127
+ captchaPublisher.captchaAction = (_c = (_b = dataProvider === null || dataProvider === void 0 ? void 0 : dataProvider.split("?")[0]) !== null && _b !== void 0 ? _b : this.getAncestorAttributeValue("formDataProvider")) !== null && _c !== void 0 ? _c : "submit";
128
+ captchaPublisher.captchaToken = "request_token";
129
+ captchaPublisher.captchaToken.onAssign((token) => {
116
130
  if (token != "request_token")
117
131
  sendData();
118
132
  });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -3,8 +3,7 @@ declare const Button_base: {
3
3
  new (...args: any[]): {
4
4
  _value: string | null;
5
5
  value: string | null;
6
- _name: string;
7
- name: string;
6
+ forceAutoFill: boolean;
8
7
  unique: true | null;
9
8
  radio: true | null;
10
9
  _checked: true | null;
@@ -23,6 +22,8 @@ declare const Button_base: {
23
22
  required: boolean;
24
23
  disabled: true | null;
25
24
  formDataProvider: string;
25
+ _name: string;
26
+ name: string;
26
27
  props: any;
27
28
  isConnected: boolean;
28
29
  getAncestorAttributeValue(attributeName: string): string;
File without changes
@@ -8,6 +8,7 @@ declare const Captcha_base: (new (...args: any[]) => import("../../../mixins/Sub
8
8
  */
9
9
  export declare class Captcha extends Captcha_base {
10
10
  key: string;
11
+ action: string | null;
11
12
  formPublisher: any;
12
13
  connectedCallback(): void;
13
14
  requestToken(): void;
@@ -19,13 +19,15 @@ let Captcha = class Captcha extends Subscriber(LitElement) {
19
19
  constructor() {
20
20
  super(...arguments);
21
21
  this.key = "";
22
+ this.action = null;
22
23
  }
23
24
  connectedCallback() {
25
+ var _a;
24
26
  const script = document.createElement("script");
25
27
  script.src = "https://www.google.com/recaptcha/api.js?render=" + this.key;
26
28
  document.head.appendChild(script);
27
29
  super.connectedCallback();
28
- this.formPublisher = PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"));
30
+ this.formPublisher = PublisherManager.get((_a = this.getAncestorAttributeValue("headersDataProvider")) !== null && _a !== void 0 ? _a : this.getAncestorAttributeValue("formDataProvider"));
29
31
  this.formPublisher.needsCaptchaValidation = true;
30
32
  this.formPublisher.captchaToken.onAssign((v) => {
31
33
  if (v == "request_token") {
@@ -34,9 +36,16 @@ let Captcha = class Captcha extends Subscriber(LitElement) {
34
36
  });
35
37
  }
36
38
  requestToken() {
39
+ var _a, _b, _c, _d;
37
40
  const win = window;
41
+ // On récupère l'action liée au recaptcha,
42
+ // et on vérifie qu'il ne contienne que des caractères alpha-numériques, underscore et slash
43
+ let action = ((_c = (_a = this.action) !== null && _a !== void 0 ? _a : (_b = this.formPublisher.captchaAction) === null || _b === void 0 ? void 0 : _b.get()) !== null && _c !== void 0 ? _c : "submit").replace(/[^\w_\/]/g, "_");
44
+ let method = ((_d = this.formPublisher.captchaMethod.get()) !== null && _d !== void 0 ? _d : "POST").toUpperCase();
45
+ delete this.formPublisher.captchaAction;
46
+ delete this.formPublisher.captchaMethod;
38
47
  win.grecaptcha.ready(() => {
39
- win.grecaptcha.execute(this.key, { action: "submit" }).then((token) => {
48
+ win.grecaptcha.execute(this.key, { action: method + "//" + action }).then((token) => {
40
49
  this.formPublisher.captchaToken = token;
41
50
  });
42
51
  });
@@ -48,6 +57,9 @@ let Captcha = class Captcha extends Subscriber(LitElement) {
48
57
  __decorate([
49
58
  property()
50
59
  ], Captcha.prototype, "key", void 0);
60
+ __decorate([
61
+ property()
62
+ ], Captcha.prototype, "action", void 0);
51
63
  Captcha = __decorate([
52
64
  customElement(tagName)
53
65
  ], Captcha);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -4,8 +4,7 @@ declare const Checkbox_base: {
4
4
  new (...args: any[]): {
5
5
  _value: string | null;
6
6
  value: string | null;
7
- _name: string;
8
- name: string;
7
+ forceAutoFill: boolean;
9
8
  unique: true | null;
10
9
  radio: true | null;
11
10
  _checked: true | null;
@@ -24,26 +23,9 @@ declare const Checkbox_base: {
24
23
  required: boolean;
25
24
  disabled: true | null;
26
25
  formDataProvider: string;
27
- props: any; /**
28
- * ### Le composent sonic-checkbox étend les mixins FormCheckable, FormInput, FormElement et Subscriber
29
- * **FormElement :**
30
- * * La propriété value est remplie automatiquement a l'aide de l'attribut name renseigné, ceci en prenant la valeur de la propriété du même nom dans les données du dataprovider associé.
31
- * * Par défault lorsque modifie l'input, la valeur est également mise à jour via le même dataprovider
32
- * * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
33
- * * Par conséquent on peut par exemple le lier à un composant *queue* (via sa propriété *dataFilterProvider*) de manière à appeller en auto une api avec des filtres.
34
- * * **FormInput **
35
- * Uniquement des propriétés classiques d'un input HTML. La prise en compte est ici partielle, par exemple les propriétés *placeholder*, *readonly*, *pattern*, *min* et *max* n'ont pas de sens pour un checkbox.
36
- * **FormCheckable :**
37
- * * La propriété checked mise à true si la valeur de la propriété du même nom dans les données du dataprovider associé contient un propriété checked.
38
- * **Comportements :**
39
- * * multiple (par défaut):
40
- * - on peut cocher plusieurs checkbox ayant le même *name*.
41
- * - la valeur enregistrée dans la propriété nommé du même nom dans formDataProvider est un tableau avec les *value* des cases cochées ayant le même *name*.
42
- * * unique (Ajouter l'attribute unique au composant a l'intégration):
43
- * - on ne peut cocher qu'une seule checkbox ayant le même *name*.
44
- * * radio (Ajouter l'attribute radio au composant a l'intégration):
45
- * Comme unique, mais on ne peut pas décocher la case sauf en en cochant une autre, comme un bouton radio.
46
- */
26
+ _name: string;
27
+ name: string;
28
+ props: any;
47
29
  isConnected: boolean;
48
30
  getAncestorAttributeValue(attributeName: string): string;
49
31
  hasAncestorAttribute(attributeName: string): boolean;
@@ -68,7 +50,13 @@ declare const Checkbox_base: {
68
50
  } & {
69
51
  new (...args: any[]): {
70
52
  validateFormElement(): void;
53
+ forceAutoFill: boolean;
54
+ _type: "number" | "search" | "file" | "button" | "password" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local";
71
55
  type: "number" | "search" | "file" | "button" | "password" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local";
56
+ _description?: string | undefined;
57
+ description: string | undefined;
58
+ _label?: string | undefined;
59
+ label: string | undefined;
72
60
  tabindex?: number | undefined;
73
61
  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;
74
62
  getFormPublisher(): any;
@@ -85,26 +73,7 @@ declare const Checkbox_base: {
85
73
  value: any;
86
74
  _name: string;
87
75
  name: string;
88
- props: any; /**
89
- * ### Le composent sonic-checkbox étend les mixins FormCheckable, FormInput, FormElement et Subscriber
90
- * **FormElement :**
91
- * * La propriété value est remplie automatiquement a l'aide de l'attribut name renseigné, ceci en prenant la valeur de la propriété du même nom dans les données du dataprovider associé.
92
- * * Par défault lorsque modifie l'input, la valeur est également mise à jour via le même dataprovider
93
- * * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
94
- * * Par conséquent on peut par exemple le lier à un composant *queue* (via sa propriété *dataFilterProvider*) de manière à appeller en auto une api avec des filtres.
95
- * * **FormInput **
96
- * Uniquement des propriétés classiques d'un input HTML. La prise en compte est ici partielle, par exemple les propriétés *placeholder*, *readonly*, *pattern*, *min* et *max* n'ont pas de sens pour un checkbox.
97
- * **FormCheckable :**
98
- * * La propriété checked mise à true si la valeur de la propriété du même nom dans les données du dataprovider associé contient un propriété checked.
99
- * **Comportements :**
100
- * * multiple (par défaut):
101
- * - on peut cocher plusieurs checkbox ayant le même *name*.
102
- * - la valeur enregistrée dans la propriété nommé du même nom dans formDataProvider est un tableau avec les *value* des cases cochées ayant le même *name*.
103
- * * unique (Ajouter l'attribute unique au composant a l'intégration):
104
- * - on ne peut cocher qu'une seule checkbox ayant le même *name*.
105
- * * radio (Ajouter l'attribute radio au composant a l'intégration):
106
- * Comme unique, mais on ne peut pas décocher la case sauf en en cochant une autre, comme un bouton radio.
107
- */
76
+ props: any;
108
77
  isConnected: boolean;
109
78
  getAncestorAttributeValue(attributeName: string): string;
110
79
  hasAncestorAttribute(attributeName: string): boolean;
@@ -132,8 +101,6 @@ export declare class Checkbox extends Checkbox_base {
132
101
  static styles: CSSResultGroup[];
133
102
  touched: boolean;
134
103
  iconName: string;
135
- description?: string;
136
- label?: string;
137
104
  slotDescriptionNodes: Array<Node>;
138
105
  hasDescription: boolean;
139
106
  updated(): void;
@@ -51,40 +51,38 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
51
51
  }
52
52
  render() {
53
53
  return html `
54
- <label class="checkbox-container ${this.disabled ? "disabled" : ""}">
55
- <span class="icon-container">
56
- <input
57
- type="${this.type}"
58
- @change=${this.handleChange}
59
- @blur=${this.handleBlur}
60
- ?required=${this.required}
61
- .disabled=${ifDefined(this.disabled)}
62
- .checked=${ifDefined(this.checked)}
63
- .name=${this.name}
64
- .value=${this.value}
65
- ?autofocus=${this.autofocus}
66
-
67
- />
68
- <sonic-icon
69
- name="${this.iconName}" class="sc-input-icon"></sonic-icon>
70
- </span>
71
- <div class="checkbox-text">
72
- ${this.label ? this.label : ""}
73
- <slot></slot>
74
- <slot name="description" class="${this.hasDescription ? "description" : "hidden"} ">
75
- ${this.description ? html `${this.description}` : ""}
76
- </slot>
77
- </div>
78
- </label>
54
+ <label class="checkbox-container ${this.disabled ? "disabled" : ""}">
55
+ <span class="icon-container">
56
+ <input
57
+ type="${this.type}"
58
+ @change=${this.handleChange}
59
+ @blur=${this.handleBlur}
60
+ ?required=${this.required}
61
+ .disabled=${ifDefined(this.disabled)}
62
+ .checked=${ifDefined(this.checked)}
63
+ .name=${this.name}
64
+ .value=${this.value}
65
+ ?autofocus=${this.autofocus}
66
+ />
67
+ <sonic-icon name="${this.iconName}" class="sc-input-icon"></sonic-icon>
68
+ </span>
69
+ <div class="checkbox-text">
70
+ ${this.label ? this.label : ""}
71
+ <slot></slot>
72
+ <slot name="description" class="${this.hasDescription ? "description" : "hidden"} ">
73
+ ${this.description ? html `${this.description}` : ""}
74
+ </slot>
75
+ </div>
76
+ </label>
79
77
  `;
80
78
  }
81
79
  };
82
80
  Checkbox.styles = [
83
81
  fontSize,
84
82
  css `
85
- :host{
83
+ :host {
86
84
  --sc-checkbox-border-width: var(--sc-form-border-width);
87
- --sc-checkbox-border-color: transparent;
85
+ --sc-checkbox-border-color: transparent;
88
86
  }
89
87
 
90
88
  * {
@@ -119,7 +117,7 @@ Checkbox.styles = [
119
117
  outline: none;
120
118
  margin: 0;
121
119
  background-color: var(--sc-base-200);
122
- border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color);
120
+ border: var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color);
123
121
  }
124
122
 
125
123
  input:focus,
@@ -188,13 +186,14 @@ Checkbox.styles = [
188
186
  }
189
187
 
190
188
  /*ERROR*/
189
+ /*
191
190
  :host([touched]) .checkbox-container:has(input:not(:focus):invalid) {
192
191
  --sc-checkbox-border-color:var(--sc-danger);
193
192
  }
194
193
  :host([touched]) .checkbox-container:has(input:not(:focus):invalid) .checkbox-text{
195
194
  color:var(--sc-danger);
196
195
  }
197
-
196
+ */
198
197
  `,
199
198
  ];
200
199
  __decorate([
@@ -203,12 +202,6 @@ __decorate([
203
202
  __decorate([
204
203
  property({ type: String })
205
204
  ], Checkbox.prototype, "iconName", void 0);
206
- __decorate([
207
- property({ type: String })
208
- ], Checkbox.prototype, "description", void 0);
209
- __decorate([
210
- property({ type: String })
211
- ], Checkbox.prototype, "label", void 0);
212
205
  __decorate([
213
206
  queryAssignedNodes({ slot: "description" })
214
207
  ], Checkbox.prototype, "slotDescriptionNodes", void 0);
File without changes
File without changes
File without changes
File without changes
@@ -2,8 +2,13 @@ import { LitElement } from "lit";
2
2
  import "@supersoniks/concorde/core/components/ui/form/fieldset/legend-description";
3
3
  export declare class Legend extends LitElement {
4
4
  static styles: import("lit").CSSResult[];
5
- description?: string;
6
- label?: string;
5
+ forceAutoFill: boolean;
6
+ _description?: string;
7
+ get description(): string | undefined;
8
+ set description(value: string | undefined);
9
+ _label?: string;
10
+ get label(): string | undefined;
11
+ set label(value: string | undefined);
7
12
  iconName?: string;
8
13
  iconLibrary?: string;
9
14
  iconPrefix?: string;