@supersoniks/concorde 1.1.41 → 1.1.42

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 (214) 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 +21 -28
  6. package/concorde-core.es.js +1006 -891
  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 +0 -0
  22. package/core/components/functional/queue/queue.js +0 -0
  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/sdui/SDUIDescriptorTransformer.d.ts +0 -0
  28. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +0 -0
  29. package/core/components/functional/sdui/sdui.d.ts +4 -0
  30. package/core/components/functional/sdui/sdui.js +13 -0
  31. package/core/components/functional/sdui/types.d.ts +0 -0
  32. package/core/components/functional/sdui/types.js +0 -0
  33. package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -0
  34. package/core/components/functional/sonic-scope/sonic-scope.js +0 -0
  35. package/core/components/functional/states/states.d.ts +0 -0
  36. package/core/components/functional/states/states.js +0 -0
  37. package/core/components/functional/submit/submit.d.ts +0 -0
  38. package/core/components/functional/submit/submit.js +0 -0
  39. package/core/components/functional/subscriber/subscriber.d.ts +0 -0
  40. package/core/components/functional/subscriber/subscriber.js +0 -0
  41. package/core/components/ui/_css/scroll.d.ts +0 -0
  42. package/core/components/ui/_css/scroll.js +0 -0
  43. package/core/components/ui/_css/size.d.ts +0 -0
  44. package/core/components/ui/_css/size.js +0 -0
  45. package/core/components/ui/_css/type.d.ts +0 -0
  46. package/core/components/ui/_css/type.js +0 -0
  47. package/core/components/ui/alert/alert.d.ts +0 -0
  48. package/core/components/ui/alert/alert.js +0 -0
  49. package/core/components/ui/badge/badge.d.ts +0 -0
  50. package/core/components/ui/badge/badge.js +0 -0
  51. package/core/components/ui/button/button.d.ts +0 -0
  52. package/core/components/ui/button/button.js +0 -0
  53. package/core/components/ui/captcha/captcha.d.ts +0 -0
  54. package/core/components/ui/captcha/captcha.js +0 -0
  55. package/core/components/ui/card/card-footer.d.ts +0 -0
  56. package/core/components/ui/card/card-footer.js +0 -0
  57. package/core/components/ui/card/card-header-descripton.d.ts +0 -0
  58. package/core/components/ui/card/card-header-descripton.js +0 -0
  59. package/core/components/ui/card/card-header.d.ts +0 -0
  60. package/core/components/ui/card/card-header.js +0 -0
  61. package/core/components/ui/card/card-main.d.ts +0 -0
  62. package/core/components/ui/card/card-main.js +0 -0
  63. package/core/components/ui/card/card.d.ts +0 -0
  64. package/core/components/ui/card/card.js +0 -0
  65. package/core/components/ui/divider/divider.d.ts +0 -0
  66. package/core/components/ui/divider/divider.js +1 -1
  67. package/core/components/ui/form/checkbox/checkbox.d.ts +0 -0
  68. package/core/components/ui/form/checkbox/checkbox.js +2 -2
  69. package/core/components/ui/form/css/form-control.d.ts +0 -0
  70. package/core/components/ui/form/css/form-control.js +0 -0
  71. package/core/components/ui/form/fieldset/fieldset.d.ts +0 -0
  72. package/core/components/ui/form/fieldset/fieldset.js +0 -0
  73. package/core/components/ui/form/fieldset/legend-description.d.ts +0 -0
  74. package/core/components/ui/form/fieldset/legend-description.js +0 -0
  75. package/core/components/ui/form/fieldset/legend.d.ts +0 -0
  76. package/core/components/ui/form/fieldset/legend.js +1 -1
  77. package/core/components/ui/form/form-actions/form-actions.d.ts +0 -0
  78. package/core/components/ui/form/form-actions/form-actions.js +0 -0
  79. package/core/components/ui/form/form-layout/form-layout.d.ts +0 -0
  80. package/core/components/ui/form/form-layout/form-layout.js +0 -0
  81. package/core/components/ui/form/input/input.d.ts +0 -0
  82. package/core/components/ui/form/input/input.js +2 -2
  83. package/core/components/ui/form/input/password-helper.d.ts +6 -0
  84. package/core/components/ui/form/input/password-helper.js +30 -8
  85. package/core/components/ui/form/input/same-value-helper.d.ts +0 -0
  86. package/core/components/ui/form/input/same-value-helper.js +0 -0
  87. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +35 -0
  88. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +137 -0
  89. package/core/components/ui/form/radio/radio.d.ts +0 -0
  90. package/core/components/ui/form/radio/radio.js +0 -0
  91. package/core/components/ui/form/select/select.d.ts +0 -0
  92. package/core/components/ui/form/select/select.js +2 -2
  93. package/core/components/ui/form/textarea/textarea.d.ts +0 -0
  94. package/core/components/ui/form/textarea/textarea.js +2 -2
  95. package/core/components/ui/group/group.d.ts +0 -0
  96. package/core/components/ui/group/group.js +0 -0
  97. package/core/components/ui/icon/icon.d.ts +0 -0
  98. package/core/components/ui/icon/icon.js +0 -0
  99. package/core/components/ui/icon/icons.d.ts +0 -0
  100. package/core/components/ui/icon/icons.js +0 -0
  101. package/core/components/ui/icon/icons.json +0 -0
  102. package/core/components/ui/image/image.d.ts +0 -0
  103. package/core/components/ui/image/image.js +0 -0
  104. package/core/components/ui/link/link.d.ts +0 -0
  105. package/core/components/ui/link/link.js +0 -0
  106. package/core/components/ui/loader/loader.d.ts +0 -0
  107. package/core/components/ui/loader/loader.js +0 -0
  108. package/core/components/ui/loader/styles/fixed.d.ts +0 -0
  109. package/core/components/ui/loader/styles/fixed.js +0 -0
  110. package/core/components/ui/loader/styles/inline.d.ts +0 -0
  111. package/core/components/ui/loader/styles/inline.js +0 -0
  112. package/core/components/ui/menu/menu-item.d.ts +0 -0
  113. package/core/components/ui/menu/menu-item.js +0 -0
  114. package/core/components/ui/menu/menu.d.ts +0 -0
  115. package/core/components/ui/menu/menu.js +0 -0
  116. package/core/components/ui/modal/modal-actions.d.ts +0 -0
  117. package/core/components/ui/modal/modal-actions.js +0 -0
  118. package/core/components/ui/modal/modal-close.d.ts +0 -0
  119. package/core/components/ui/modal/modal-close.js +0 -0
  120. package/core/components/ui/modal/modal-content.d.ts +0 -0
  121. package/core/components/ui/modal/modal-content.js +0 -0
  122. package/core/components/ui/modal/modal-subtitle.d.ts +0 -0
  123. package/core/components/ui/modal/modal-subtitle.js +0 -0
  124. package/core/components/ui/modal/modal-title.d.ts +0 -0
  125. package/core/components/ui/modal/modal-title.js +0 -0
  126. package/core/components/ui/modal/modal.d.ts +0 -0
  127. package/core/components/ui/modal/modal.js +0 -0
  128. package/core/components/ui/pop/pop.d.ts +4 -4
  129. package/core/components/ui/pop/pop.js +43 -42
  130. package/core/components/ui/progress/progress.d.ts +0 -0
  131. package/core/components/ui/progress/progress.js +0 -0
  132. package/core/components/ui/table/table-caption.d.ts +0 -0
  133. package/core/components/ui/table/table-caption.js +0 -0
  134. package/core/components/ui/table/table-tbody.d.ts +0 -0
  135. package/core/components/ui/table/table-tbody.js +0 -0
  136. package/core/components/ui/table/table-td.d.ts +0 -0
  137. package/core/components/ui/table/table-td.js +0 -0
  138. package/core/components/ui/table/table-tfoot.d.ts +0 -0
  139. package/core/components/ui/table/table-tfoot.js +0 -0
  140. package/core/components/ui/table/table-th.d.ts +0 -0
  141. package/core/components/ui/table/table-th.js +0 -0
  142. package/core/components/ui/table/table-thead.d.ts +0 -0
  143. package/core/components/ui/table/table-thead.js +0 -0
  144. package/core/components/ui/table/table-tr.d.ts +0 -0
  145. package/core/components/ui/table/table-tr.js +0 -0
  146. package/core/components/ui/table/table.d.ts +0 -0
  147. package/core/components/ui/table/table.js +0 -0
  148. package/core/components/ui/tabs/tab.d.ts +0 -0
  149. package/core/components/ui/tabs/tab.js +0 -0
  150. package/core/components/ui/tabs/tabs.d.ts +0 -0
  151. package/core/components/ui/tabs/tabs.js +0 -0
  152. package/core/components/ui/taxonomy/taxonomy.d.ts +0 -0
  153. package/core/components/ui/taxonomy/taxonomy.js +0 -0
  154. package/core/components/ui/theme/css/tailwind.css +0 -0
  155. package/core/components/ui/theme/css/tailwind.d.ts +0 -0
  156. package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -0
  157. package/core/components/ui/theme/theme-collection/core-variables.js +0 -0
  158. package/core/components/ui/theme/theme-collection/dark.d.ts +0 -0
  159. package/core/components/ui/theme/theme-collection/dark.js +0 -0
  160. package/core/components/ui/theme/theme-collection/light.d.ts +0 -0
  161. package/core/components/ui/theme/theme-collection/light.js +0 -0
  162. package/core/components/ui/theme/theme.d.ts +0 -0
  163. package/core/components/ui/theme/theme.js +0 -0
  164. package/core/components/ui/toast/message-subscriber.d.ts +0 -0
  165. package/core/components/ui/toast/message-subscriber.js +0 -0
  166. package/core/components/ui/toast/toast-item.d.ts +0 -0
  167. package/core/components/ui/toast/toast-item.js +0 -0
  168. package/core/components/ui/toast/toast.d.ts +0 -0
  169. package/core/components/ui/toast/toast.js +0 -0
  170. package/core/components/ui/toast/types.d.ts +0 -0
  171. package/core/components/ui/toast/types.js +0 -0
  172. package/core/components/ui/tooltip/tooltip.d.ts +0 -0
  173. package/core/components/ui/tooltip/tooltip.js +0 -0
  174. package/core/components/ui/ui.d.ts +1 -0
  175. package/core/components/ui/ui.js +1 -0
  176. package/core/core.d.ts +0 -0
  177. package/core/core.js +0 -0
  178. package/core/mixins/Fetcher.d.ts +0 -0
  179. package/core/mixins/Fetcher.js +0 -0
  180. package/core/mixins/FormCheckable.d.ts +0 -0
  181. package/core/mixins/FormCheckable.js +0 -0
  182. package/core/mixins/FormElement.d.ts +0 -0
  183. package/core/mixins/FormElement.js +0 -0
  184. package/core/mixins/FormInput.d.ts +0 -0
  185. package/core/mixins/FormInput.js +0 -0
  186. package/core/mixins/Subscriber.d.ts +0 -0
  187. package/core/mixins/Subscriber.js +0 -0
  188. package/core/mixins/TemplatesContainer.d.ts +0 -0
  189. package/core/mixins/TemplatesContainer.js +0 -0
  190. package/core/mixins/mixins.d.ts +0 -0
  191. package/core/mixins/mixins.js +0 -0
  192. package/core/utils/Arrays.d.ts +0 -0
  193. package/core/utils/Arrays.js +0 -0
  194. package/core/utils/DataBindObserver.d.ts +0 -0
  195. package/core/utils/DataBindObserver.js +0 -0
  196. package/core/utils/Electron.d.ts +0 -0
  197. package/core/utils/Electron.js +0 -0
  198. package/core/utils/Format.d.ts +0 -0
  199. package/core/utils/Format.js +0 -0
  200. package/core/utils/HTML.d.ts +0 -0
  201. package/core/utils/HTML.js +0 -0
  202. package/core/utils/LocationHandler.d.ts +0 -0
  203. package/core/utils/LocationHandler.js +0 -0
  204. package/core/utils/Objects.d.ts +0 -0
  205. package/core/utils/Objects.js +0 -0
  206. package/core/utils/PublisherProxy.d.mts +0 -0
  207. package/core/utils/PublisherProxy.mjs +0 -0
  208. package/core/utils/api.d.ts +0 -0
  209. package/core/utils/api.js +0 -0
  210. package/mixins.d.ts +0 -0
  211. package/mixins.js +0 -0
  212. package/package.json +3 -1
  213. package/utils.d.ts +0 -0
  214. 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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -82,6 +82,10 @@ export declare class SonicSDUI extends SonicSDUI_base {
82
82
  * Transformation de la data fournie via props si il y a un attribut transformation
83
83
  * */
84
84
  private transformSDUIDescriptor;
85
+ /**
86
+ * Charge la library à utiliser
87
+ * */
88
+ private loadLibrary;
85
89
  /**
86
90
  * Point d'entrée : transformation des noeuds fournis en éléments graphiques
87
91
  **/
@@ -63,6 +63,7 @@ let SonicSDUI = class SonicSDUI extends Fetcher(Subscriber(LitElement)) {
63
63
  if (!this.props)
64
64
  return;
65
65
  this.loadAssets();
66
+ yield this.loadLibrary();
66
67
  yield this.transformSDUIDescriptor();
67
68
  this.parseRootNodes();
68
69
  });
@@ -103,6 +104,18 @@ let SonicSDUI = class SonicSDUI extends Fetcher(Subscriber(LitElement)) {
103
104
  yield transformer.transform(this.props, json);
104
105
  });
105
106
  }
107
+ /**
108
+ * Charge la library à utiliser
109
+ * */
110
+ loadLibrary() {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ if (!this.hasAttribute("library"))
113
+ return;
114
+ let result = yield fetch(this.getAttribute("library"));
115
+ let json = yield result.json();
116
+ this.props.library = json;
117
+ });
118
+ }
106
119
  /**
107
120
  * Point d'entrée : transformation des noeuds fournis en éléments graphiques
108
121
  **/
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
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -22,7 +22,7 @@ let Divider = class Divider extends LitElement {
22
22
  }
23
23
  render() {
24
24
  return html `<div part="divider">
25
- <span class="text">${unsafeHTML(this.label)}<slot></slot></span>
25
+ <span class="text">${unsafeHTML(this.label ? this.label : "")}<slot></slot></span>
26
26
  </div>`;
27
27
  }
28
28
  };
File without changes
@@ -51,7 +51,7 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
51
51
  super.connectedCallback();
52
52
  }
53
53
  render() {
54
- let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
54
+ //let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
55
55
  return html `
56
56
  <label class="checkbox-container ${this.disabled ? "disabled" : ""}">
57
57
  <span class="icon-container">
@@ -69,7 +69,7 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
69
69
  <sonic-icon name="${this.iconName}" class="sc-input-icon"></sonic-icon>
70
70
  </span>
71
71
  <div class="checkbox-text">
72
- ${this.label ? unsafeHTML(this.label + labelStarSuffix) : ""}
72
+ ${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}
73
73
  <slot></slot>
74
74
  <slot name="description" class="${this.hasDescription ? "description" : "hidden"} ">
75
75
  ${this.description ? html `${unsafeHTML(this.description)}` : ""}
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -46,7 +46,7 @@ let Legend = class Legend extends LitElement {
46
46
  : ""}
47
47
 
48
48
  <div class="legend-content">
49
- ${unsafeHTML(this.label)}
49
+ ${unsafeHTML(this.label ? this.label : "")}
50
50
  ${this.description
51
51
  ? html `<sonic-legend-description>${unsafeHTML(this.description)}</sonic-legend-description>`
52
52
  : ""}
File without changes
@@ -71,10 +71,10 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
71
71
  "has-prefix": this.hasPrefix,
72
72
  "has-suffix": this.hasSuffix,
73
73
  };
74
- let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
74
+ //let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
75
75
  return html `
76
76
  <label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}"
77
- >${this.label ? unsafeHTML(this.label + labelStarSuffix) : ""}<slot
77
+ >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
78
78
  name="label"
79
79
  @slotchange=${this.onSlotChange}
80
80
  ></slot
@@ -10,6 +10,12 @@ export declare class SonicComponent extends SonicComponent_base {
10
10
  hasMajuscule: boolean;
11
11
  hasNumber: boolean;
12
12
  hasSpecialChar: boolean;
13
+ wording_password_helper_decription: string;
14
+ wording_password_helper_min_length: string;
15
+ wording_password_helper_lower_case: string;
16
+ wording_password_helper_upper_case: string;
17
+ wording_password_helper_number: string;
18
+ wording_password_helper_special_char: string;
13
19
  checkValue?: (v: string) => void;
14
20
  connectedCallback(): void;
15
21
  disconnectedCallback(): void;
@@ -10,7 +10,6 @@ import { Subscriber } from "@supersoniks/concorde/mixins";
10
10
  import { PublisherManager } from "@supersoniks/concorde/utils";
11
11
  import "@supersoniks/concorde/core/components/ui/icon/icon";
12
12
  const tagName = "sonic-password-helper"; // For Astro.build
13
- console.log("HEY");
14
13
  let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
15
14
  constructor() {
16
15
  super(...arguments);
@@ -21,6 +20,12 @@ let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
21
20
  this.hasMajuscule = false;
22
21
  this.hasNumber = false;
23
22
  this.hasSpecialChar = false;
23
+ this.wording_password_helper_decription = "Le mot de passe doit contenir au moins :";
24
+ this.wording_password_helper_min_length = "8 caractères";
25
+ this.wording_password_helper_lower_case = "1 minuscule";
26
+ this.wording_password_helper_upper_case = "1 majuscule";
27
+ this.wording_password_helper_number = "1 chiffre";
28
+ this.wording_password_helper_special_char = "1 caractère spécial";
24
29
  }
25
30
  connectedCallback() {
26
31
  super.connectedCallback();
@@ -52,17 +57,16 @@ let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
52
57
  ? html `<sonic-icon library="heroicons" , name="face-smile"></sonic-icon>`
53
58
  : html `<sonic-icon library="heroicons" , name="x-circle"></sonic-icon>`;
54
59
  }
55
- //TODO Multilangue
56
60
  render() {
57
61
  if (this.hasNoChar)
58
62
  return nothing;
59
63
  return html `
60
- <div>Le mot de passe doit contenir au moins :</div>
61
- <div>${this.getIcon(this.hasEnoughChars)} 8 caractères</div>
62
- <div>${this.getIcon(this.hasMinuscule)} 1 minuscule</div>
63
- <div>${this.getIcon(this.hasMajuscule)} 1 majuscule</div>
64
- <div>${this.getIcon(this.hasNumber)} 1 chiffre</div>
65
- <div>${this.getIcon(this.hasSpecialChar)} 1 caractère spécial parmi !"#$%&'()*+,-./:;<=>?@[]^_\`{|}~</div>
64
+ <div>${this.wording_password_helper_decription}</div>
65
+ <div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div>
66
+ <div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div>
67
+ <div>${this.getIcon(this.hasMajuscule)} ${this.wording_password_helper_upper_case}</div>
68
+ <div>${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}</div>
69
+ <div>${this.getIcon(this.hasSpecialChar)} ${this.wording_password_helper_special_char}</div>
66
70
  `;
67
71
  }
68
72
  };
@@ -90,6 +94,24 @@ __decorate([
90
94
  __decorate([
91
95
  state()
92
96
  ], SonicComponent.prototype, "hasSpecialChar", void 0);
97
+ __decorate([
98
+ property()
99
+ ], SonicComponent.prototype, "wording_password_helper_decription", void 0);
100
+ __decorate([
101
+ property()
102
+ ], SonicComponent.prototype, "wording_password_helper_min_length", void 0);
103
+ __decorate([
104
+ property()
105
+ ], SonicComponent.prototype, "wording_password_helper_lower_case", void 0);
106
+ __decorate([
107
+ property()
108
+ ], SonicComponent.prototype, "wording_password_helper_upper_case", void 0);
109
+ __decorate([
110
+ property()
111
+ ], SonicComponent.prototype, "wording_password_helper_number", void 0);
112
+ __decorate([
113
+ property()
114
+ ], SonicComponent.prototype, "wording_password_helper_special_char", void 0);
93
115
  SonicComponent = __decorate([
94
116
  customElement(tagName)
95
117
  ], SonicComponent);
@@ -0,0 +1,35 @@
1
+ import { LitElement } from "lit";
2
+ import "@supersoniks/concorde/core/components/ui/form/input/input";
3
+ import "@supersoniks/concorde/core/components/ui/pop/pop";
4
+ import "@supersoniks/concorde/core/components/functional/queue/queue";
5
+ import "@supersoniks/concorde/core/components/ui/menu/menu-item";
6
+ declare const InputAutocomplete_base: (new (...args: any[]) => import("../../../../mixins/TemplatesContainer").TemplatesContainerInterface) & (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface) & typeof LitElement;
7
+ /**
8
+ * TODO Améliorer et valider le fonctionnement avec JB et Julien. Puis possiblement merger sur concorde
9
+ * Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
10
+ * L'input permet de filtrer les choix de valeurs dans le sonic-pop.
11
+ * La valeur de cet input est ensuite retransmit au premier via un dataProvider.
12
+ */
13
+ export declare class InputAutocomplete extends InputAutocomplete_base {
14
+ static styles: import("lit").CSSResult[];
15
+ _name: string;
16
+ get name(): string;
17
+ set name(value: string);
18
+ forceAutoFill: boolean;
19
+ _description?: string;
20
+ get description(): string | undefined;
21
+ set description(value: string | undefined);
22
+ _label?: string;
23
+ get label(): string | undefined;
24
+ set label(value: string | undefined);
25
+ placeholder: string;
26
+ filteredFields: string;
27
+ readonly: boolean | null;
28
+ dataProviderExpression: string;
29
+ key: string;
30
+ value: string;
31
+ formDataProvider: string;
32
+ connectedCallback(): void;
33
+ render(): import("lit-html").TemplateResult<1>;
34
+ }
35
+ export {};
@@ -0,0 +1,137 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html, LitElement, css } from "lit";
8
+ import { customElement, property } from "lit/decorators.js";
9
+ import { Subscriber, TemplatesContainer } from "@supersoniks/concorde/mixins";
10
+ import "@supersoniks/concorde/core/components/ui/form/input/input";
11
+ import "@supersoniks/concorde/core/components/ui/pop/pop";
12
+ import "@supersoniks/concorde/core/components/functional/queue/queue";
13
+ import "@supersoniks/concorde/core/components/ui/menu/menu-item";
14
+ import { ifDefined } from "lit/directives/if-defined.js";
15
+ /**
16
+ * TODO Améliorer et valider le fonctionnement avec JB et Julien. Puis possiblement merger sur concorde
17
+ * Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
18
+ * L'input permet de filtrer les choix de valeurs dans le sonic-pop.
19
+ * La valeur de cet input est ensuite retransmit au premier via un dataProvider.
20
+ */
21
+ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(Subscriber(LitElement)) {
22
+ constructor() {
23
+ super(...arguments);
24
+ // Filtering input
25
+ this._name = "";
26
+ this.forceAutoFill = false;
27
+ this.placeholder = "";
28
+ this.filteredFields = "";
29
+ this.readonly = null;
30
+ this.dataProviderExpression = "";
31
+ this.key = "";
32
+ this.value = "";
33
+ this.formDataProvider = "";
34
+ }
35
+ get name() {
36
+ return this._name;
37
+ }
38
+ set name(value) {
39
+ if (this.hasAttribute("name") && !this.forceAutoFill)
40
+ value = this.getAttribute("name");
41
+ this._name = value;
42
+ this.requestUpdate();
43
+ }
44
+ get description() {
45
+ return this._description;
46
+ }
47
+ set description(value) {
48
+ if (this.hasAttribute("description") && !this.forceAutoFill)
49
+ value = this.getAttribute("description");
50
+ this._description = value;
51
+ this.requestUpdate();
52
+ }
53
+ get label() {
54
+ return this._label;
55
+ }
56
+ set label(value) {
57
+ if (this.hasAttribute("label") && !this.forceAutoFill)
58
+ value = this.getAttribute("label");
59
+ this._label = value;
60
+ this.requestUpdate();
61
+ }
62
+ connectedCallback() {
63
+ this.formDataProvider = this.getAncestorAttributeValue("formDataProvider");
64
+ super.connectedCallback();
65
+ }
66
+ render() {
67
+ return html `
68
+ <sonic-pop toggle="false" style="display:block;">
69
+ <sonic-input
70
+ type="text"
71
+ data-keyboard-nav="nav-autocomplete"
72
+ label="${ifDefined(this.label)}"
73
+ description="${ifDefined(this.description)}"
74
+ name="${ifDefined(this.name)}"
75
+ value="${ifDefined(this.value)}"
76
+ clearable
77
+ ></sonic-input>
78
+ <sonic-menu slot="content">
79
+ <sonic-queue
80
+ filteredFields=${this.filteredFields}
81
+ dataProviderExpression="${this.dataProviderExpression}"
82
+ dataFilterProvider="${this.formDataProvider}"
83
+ key="${this.key}"
84
+ .templates=${this.templateList}
85
+ displayContents
86
+ >
87
+ </sonic-queue>
88
+ </sonic-menu>
89
+ </sonic-pop>
90
+ `;
91
+ }
92
+ };
93
+ InputAutocomplete.styles = [
94
+ css `
95
+ :host {
96
+ display: block;
97
+ }
98
+ `,
99
+ ];
100
+ __decorate([
101
+ property()
102
+ ], InputAutocomplete.prototype, "name", null);
103
+ __decorate([
104
+ property()
105
+ ], InputAutocomplete.prototype, "forceAutoFill", void 0);
106
+ __decorate([
107
+ property()
108
+ ], InputAutocomplete.prototype, "description", null);
109
+ __decorate([
110
+ property()
111
+ ], InputAutocomplete.prototype, "label", null);
112
+ __decorate([
113
+ property({ type: String })
114
+ ], InputAutocomplete.prototype, "placeholder", void 0);
115
+ __decorate([
116
+ property()
117
+ ], InputAutocomplete.prototype, "filteredFields", void 0);
118
+ __decorate([
119
+ property({ type: Boolean })
120
+ ], InputAutocomplete.prototype, "readonly", void 0);
121
+ __decorate([
122
+ property({ type: String })
123
+ ], InputAutocomplete.prototype, "dataProviderExpression", void 0);
124
+ __decorate([
125
+ property({ type: String })
126
+ ], InputAutocomplete.prototype, "key", void 0);
127
+ __decorate([
128
+ property({ type: String })
129
+ ], InputAutocomplete.prototype, "value", void 0);
130
+ InputAutocomplete = __decorate([
131
+ customElement("sonic-input-autocomplete")
132
+ ], InputAutocomplete);
133
+ export { InputAutocomplete };
134
+ // //Ajout pour custom-elements-manifest pour storybook notamment
135
+ // try {
136
+ // customElements.define("sonic-input-autocomplete", InputAutocomplete);
137
+ // } catch (e) {}
File without changes
File without changes
File without changes
@@ -123,10 +123,10 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
123
123
  "has-prefix": this.hasPrefix,
124
124
  "has-suffix": this.hasSuffix,
125
125
  };
126
- let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
126
+ //let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
127
127
  return html `
128
128
  <label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}"
129
- >${this.label ? unsafeHTML(this.label + labelStarSuffix) : ""}<slot
129
+ >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
130
130
  name="label"
131
131
  @slotchange=${this.onSlotChange}
132
132
  ></slot
File without changes
@@ -48,10 +48,10 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
48
48
  textarea.reportValidity();
49
49
  }
50
50
  render() {
51
- let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
51
+ // let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
52
52
  return html `
53
53
  <label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}"
54
- >${this.label ? unsafeHTML(this.label + labelStarSuffix) : ""}<slot
54
+ >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
55
55
  name="label"
56
56
  @slotchange=${this.onSlotChange}
57
57
  ></slot
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
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