@supersoniks/concorde 1.1.46 → 1.1.47

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 (46) hide show
  1. package/README.md +0 -0
  2. package/cli.js +0 -0
  3. package/concorde-core.bundle.js +20 -22
  4. package/concorde-core.es.js +777 -955
  5. package/concorde-customer.bundle.js +129 -0
  6. package/concorde-customer.es.js +22004 -0
  7. package/core/_types/types.d.ts +0 -1
  8. package/core/components/functional/date/date.js +15 -7
  9. package/core/components/functional/fetch/fetch.d.ts +1 -0
  10. package/core/components/functional/list/list.d.ts +33 -18
  11. package/core/components/functional/list/list.js +12 -22
  12. package/core/components/functional/queue/queue.d.ts +0 -2
  13. package/core/components/functional/queue/queue.js +11 -37
  14. package/core/components/functional/sdui/sdui.d.ts +1 -3
  15. package/core/components/functional/sdui/sdui.js +0 -3
  16. package/core/components/ui/_css/type.js +12 -12
  17. package/core/components/ui/button/button.d.ts +1 -0
  18. package/core/components/ui/button/button.js +37 -12
  19. package/core/components/ui/form/input/input.d.ts +0 -1
  20. package/core/components/ui/form/input/input.js +3 -10
  21. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +13 -93
  22. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +52 -181
  23. package/core/components/ui/image/image.d.ts +2 -0
  24. package/core/components/ui/image/image.js +28 -0
  25. package/core/components/ui/pop/pop.js +6 -17
  26. package/core/components/ui/theme/css/tailwind.css +0 -0
  27. package/core/components/ui/theme/css/tailwind.d.ts +0 -0
  28. package/core/components/ui/theme/theme.js +8 -6
  29. package/core/components/ui/toast/toast.d.ts +1 -1
  30. package/core/components/ui/toast/types.d.ts +1 -1
  31. package/core/components/ui/ui.d.ts +0 -1
  32. package/core/components/ui/ui.js +0 -1
  33. package/core/mixins/Fetcher.d.ts +1 -0
  34. package/core/mixins/Fetcher.js +9 -10
  35. package/core/mixins/FormElement.d.ts +0 -1
  36. package/core/mixins/FormElement.js +2 -6
  37. package/core/utils/LocationHandler.js +9 -3
  38. package/core/utils/PublisherProxy.d.ts +0 -1
  39. package/core/utils/PublisherProxy.js +0 -1
  40. package/img/concorde-logo.svg +0 -0
  41. package/img/concorde.png +0 -0
  42. package/img/concorde_def.png +0 -0
  43. package/mixins.d.ts +1 -0
  44. package/package.json +1 -1
  45. package/svg/regular/plane.svg +0 -0
  46. package/svg/solid/plane.svg +0 -0
@@ -3,67 +3,7 @@ import "@supersoniks/concorde/core/components/ui/form/input/input";
3
3
  import "@supersoniks/concorde/core/components/ui/pop/pop";
4
4
  import "@supersoniks/concorde/core/components/functional/queue/queue";
5
5
  import "@supersoniks/concorde/core/components/ui/menu/menu-item";
6
- import { Size } from "../../_css/size";
7
- type ListItem = Record<string, string>;
8
- declare const InputAutocomplete_base: (new (...args: any[]) => import("../../../../mixins/TemplatesContainer").TemplatesContainerInterface) & {
9
- new (...args: any[]): {
10
- validateFormElement(): void;
11
- forceAutoFill: boolean;
12
- _type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
13
- type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
14
- _description?: string | undefined;
15
- description: string | undefined;
16
- _label?: string | undefined;
17
- label: string | undefined;
18
- tabindex?: number | undefined;
19
- 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;
20
- getFormPublisher(): any;
21
- updateDataValue(): void;
22
- handleChange(e?: Event | undefined): void;
23
- handleBlur(e?: Event | undefined): void;
24
- getValueForFormPublisher(): string | object | string[] | null | undefined;
25
- focus?: (() => void) | undefined;
26
- shadowRoot?: ShadowRoot | undefined;
27
- error: boolean;
28
- autofocus: boolean;
29
- required: boolean;
30
- disabled: true | null;
31
- formDataProvider: string;
32
- ariaLabelledby?: string | undefined;
33
- ariaLabel?: string | undefined;
34
- _value: string | object | string[] | null | undefined;
35
- value: string | object | string[] | null | undefined;
36
- _name: string;
37
- name: string;
38
- props: import("../../../../_types/types").CoreJSType;
39
- propertyMap: object;
40
- isConnected: boolean;
41
- children: HTMLCollection;
42
- appendChild(node: Node): Node;
43
- getAncestorAttributeValue(attributeName: string): string;
44
- hasAncestorAttribute(attributeName: string): boolean;
45
- querySelectorAll(selector: string): NodeListOf<Element>;
46
- publisher: any;
47
- dataProvider: string | null;
48
- noShadowDom: string | null;
49
- debug: HTMLElement | null;
50
- defferedDebug: boolean | null;
51
- displayContents: boolean;
52
- dispatchEvent(event: Event): void;
53
- setAttribute(name: string, value: string): void;
54
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
55
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
56
- removeAttribute(name: string): void;
57
- initPublisher(): void;
58
- getApiConfiguration(): import("../../../../utils/api").APIConfiguration;
59
- connectedCallback(): void;
60
- requestUpdate(): void;
61
- getAttribute(name: string): string;
62
- hasAttribute(attributeName: string): boolean;
63
- disconnectedCallback(): void;
64
- getBoundingClientRect(): DOMRect;
65
- };
66
- } & (new (...args: any[]) => import("../../../../mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
6
+ declare const InputAutocomplete_base: (new (...args: any[]) => import("../../../../mixins/TemplatesContainer").TemplatesContainerInterface) & (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
67
7
  /**
68
8
  * Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
69
9
  * L'input permet de filtrer les choix de valeurs dans le sonic-pop.
@@ -71,44 +11,24 @@ declare const InputAutocomplete_base: (new (...args: any[]) => import("../../../
71
11
  */
72
12
  export declare class InputAutocomplete extends InputAutocomplete_base {
73
13
  static styles: import("lit").CSSResult[];
74
- /**
75
- * Possibles mutualisation avec text
76
- */
77
- size: Size;
14
+ _name: string;
15
+ get name(): string;
16
+ set name(value: string);
17
+ forceAutoFill: boolean;
18
+ _description?: string;
19
+ get description(): string | undefined;
20
+ set description(value: string | undefined);
21
+ _label?: string;
22
+ get label(): string | undefined;
23
+ set label(value: string | undefined);
78
24
  placeholder: string;
79
25
  filteredFields: string;
80
26
  readonly: boolean | null;
81
27
  dataProviderExpression: string;
82
- select?: boolean;
83
28
  key: string;
84
- searchParameter: string;
85
- /**
86
- * Les dataProviders
87
- */
88
- private searchDataProvider;
89
- private initSearchDataProvider;
90
- private queueDataProvider;
91
- private initQueueDataProvider;
92
- private lastValidSearch;
93
- private searchPublisher?;
94
- private countPublisher?;
95
- private initCountPublisher?;
96
- private formValuePublisher?;
97
- /**
98
- * Les fonctions de gestion
99
- */
100
- private updateSearchParameter;
101
- private initSearchParameter;
102
- private selectListItem;
103
- private findSearchedItem;
104
- private findSelection;
105
- private setSearchFromSelection;
106
- private updateActiveSelection;
29
+ value: string;
107
30
  connectedCallback(): void;
108
- disconnectedCallback(): void;
109
- queryQueueListItem(queueDataProvider: string, itemFinder: (listItem: ListItem) => boolean, itemMutator: (listItem: ListItem) => void): void;
110
- setSelectionRange(start: number, end: number): void;
111
- handleHide(): void;
31
+ formDataProvider: string;
112
32
  render(): import("lit-html").TemplateResult<1>;
113
33
  }
114
34
  export {};
@@ -4,222 +4,87 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
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
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { html, LitElement, css, nothing } from "lit";
7
+ import { html, LitElement, css } from "lit";
8
8
  import { customElement, property } from "lit/decorators.js";
9
- import { FormInput, FormElement, Subscriber, TemplatesContainer, } from "@supersoniks/concorde/mixins";
9
+ import { Subscriber, TemplatesContainer } from "@supersoniks/concorde/mixins";
10
10
  import "@supersoniks/concorde/core/components/ui/form/input/input";
11
11
  import "@supersoniks/concorde/core/components/ui/pop/pop";
12
12
  import "@supersoniks/concorde/core/components/functional/queue/queue";
13
13
  import "@supersoniks/concorde/core/components/ui/menu/menu-item";
14
14
  import { ifDefined } from "lit/directives/if-defined.js";
15
- import { PublisherManager } from "@supersoniks/concorde/utils";
16
15
  /**
17
16
  * Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
18
17
  * L'input permet de filtrer les choix de valeurs dans le sonic-pop.
19
18
  * La valeur de cet input est ensuite retransmit au premier via un dataProvider.
20
19
  */
21
- let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormInput(FormElement(Subscriber(LitElement)))) {
20
+ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(Subscriber(LitElement)) {
22
21
  constructor() {
23
22
  super(...arguments);
24
- /**
25
- * Possibles mutualisation avec text
26
- */
27
- this.size = "md";
23
+ // Filtering input
24
+ this._name = "";
25
+ this.forceAutoFill = false;
28
26
  this.placeholder = "";
29
27
  this.filteredFields = "";
30
28
  this.readonly = null;
31
29
  this.dataProviderExpression = "";
32
30
  this.key = "";
33
- this.searchParameter = "";
34
- /**
35
- * Les dataProviders
36
- */
37
- this.searchDataProvider = "";
38
- this.initSearchDataProvider = "";
39
- this.queueDataProvider = "";
40
- this.initQueueDataProvider = "";
41
- this.lastValidSearch = "";
42
- /**
43
- * Les fonctions de gestion
44
- */
45
- this.updateSearchParameter = (value) => {
46
- if (value == "") {
47
- this.lastValidSearch = "";
48
- return;
49
- }
50
- this.queryQueueListItem(this.queueDataProvider, this.findSelection, this.setSearchFromSelection);
51
- };
52
- this.initSearchParameter = () => {
53
- this.queryQueueListItem(this.initQueueDataProvider, this.findSelection, this.setSearchFromSelection);
54
- };
55
- this.selectListItem = (listItem) => {
56
- var _a;
57
- (_a = this.formValuePublisher) === null || _a === void 0 ? void 0 : _a.set(listItem[this.name]);
58
- };
59
- this.findSearchedItem = (listItem) => {
60
- var _a;
61
- return (listItem[this.searchParameter || this.name] == ((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()));
62
- };
63
- this.findSelection = (listItem) => {
64
- return listItem[this.name] == this.value;
65
- };
66
- this.setSearchFromSelection = (listItem) => {
67
- var _a;
68
- this.lastValidSearch = listItem[this.searchParameter || this.name];
69
- (_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.set(this.lastValidSearch);
70
- };
71
- this.updateActiveSelection = () => {
72
- var _a, _b, _c;
73
- this.queryQueueListItem(this.queueDataProvider, this.findSearchedItem, this.selectListItem);
74
- if (!this.select &&
75
- this.lastValidSearch &&
76
- this.lastValidSearch != ((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()) &&
77
- ((_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.get())) {
78
- (_c = this.formValuePublisher) === null || _c === void 0 ? void 0 : _c.set("");
79
- }
80
- };
31
+ this.value = "";
32
+ this.formDataProvider = "";
81
33
  }
82
- connectedCallback() {
83
- var _a, _b, _c;
84
- super.connectedCallback();
85
- /**
86
- * Nom de la valeur de recherche
87
- * Si non défini, on utilise name
88
- **/
89
- const searchParameter = this.searchParameter || this.name;
90
- /**
91
- * Nommage des différents dataProviders utilisés
92
- */
93
- const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
94
- const dpPrefix = formDataProvider + "__autocomplete";
95
- this.initSearchDataProvider = `${dpPrefix}_init_search__`;
96
- this.initQueueDataProvider = `${dpPrefix}_init_queue__`;
97
- this.searchDataProvider = `${dpPrefix}_search__`;
98
- this.queueDataProvider = `${dpPrefix}_queue__`;
99
- /**
100
- * Les publishers utilisés plusieurs fois dans la classe son miss en propriétés privées de la classe
101
- */
102
- const getPublisher = PublisherManager.get;
103
- this.searchPublisher = getPublisher(this.searchDataProvider)[searchParameter];
104
- this.formValuePublisher = getPublisher(formDataProvider)[this.name];
105
- this.countPublisher = getPublisher(this.queueDataProvider).resultCount;
106
- this.initCountPublisher = getPublisher(this.initQueueDataProvider).resultCount;
107
- /**
108
- * Si une valeur est fourrnie a l'initialisation, un queue spécifique appelle le service avec le name founi en paramètre
109
- * Pour récupérer la valeur de searchParameter correspondante et renseigner l'input
110
- **/
111
- if (this.value) {
112
- PublisherManager.get(this.initSearchDataProvider)[this.name] = this.value;
113
- }
114
- (_a = this.initCountPublisher) === null || _a === void 0 ? void 0 : _a.onAssign(this.initSearchParameter);
115
- /**
116
- * Lorsque la sélection change, on met à jour la valeur de recherche
117
- */
118
- (_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.onAssign(this.updateSearchParameter);
119
- /**
120
- * Lorsque La valeur de recherche change, que le composant n'est pas en mode select
121
- * et qu'elle est différente de la derniere recherche valide on désactive la selection
122
- */
123
- (_c = this.countPublisher) === null || _c === void 0 ? void 0 : _c.onAssign(this.updateActiveSelection);
34
+ get name() {
35
+ return this._name;
36
+ }
37
+ set name(value) {
38
+ if (this.hasAttribute("name") && !this.forceAutoFill)
39
+ value = this.getAttribute("name");
40
+ this._name = value;
41
+ this.requestUpdate();
124
42
  }
125
- disconnectedCallback() {
126
- var _a, _b, _c;
127
- super.disconnectedCallback();
128
- (_a = this.initCountPublisher) === null || _a === void 0 ? void 0 : _a.offAssign(this.initSearchParameter);
129
- (_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.offAssign(this.updateSearchParameter);
130
- (_c = this.countPublisher) === null || _c === void 0 ? void 0 : _c.offAssign(this.updateActiveSelection);
131
- const getPublisher = PublisherManager.get;
132
- getPublisher(this.initSearchDataProvider).delete();
133
- getPublisher(this.initQueueDataProvider).delete();
134
- getPublisher(this.searchDataProvider).delete();
135
- getPublisher(this.queueDataProvider).delete();
43
+ get description() {
44
+ return this._description;
136
45
  }
137
- queryQueueListItem(queueDataProvider, itemFinder, itemMutator) {
138
- const queuePublisher = PublisherManager.get(queueDataProvider);
139
- let listItem;
140
- const listsDescriptors = queuePublisher.get();
141
- if (!Array.isArray(listsDescriptors))
142
- return;
143
- for (const listDescriptor of listsDescriptors) {
144
- const list = PublisherManager.get(listDescriptor.dataProvider).get();
145
- if (!Array.isArray(list))
146
- continue;
147
- listItem = list.find(itemFinder);
148
- console.log(listItem);
149
- if (listItem) {
150
- break;
151
- }
152
- }
153
- if (listItem) {
154
- itemMutator(listItem);
155
- }
46
+ set description(value) {
47
+ if (this.hasAttribute("description") && !this.forceAutoFill)
48
+ value = this.getAttribute("description");
49
+ this._description = value;
50
+ this.requestUpdate();
156
51
  }
157
- setSelectionRange(start, end) {
158
- var _a;
159
- (_a = this.querySelector("sonic-input")) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end);
52
+ get label() {
53
+ return this._label;
160
54
  }
161
- handleHide() {
162
- var _a, _b, _c;
163
- if (!this.select)
164
- return;
165
- if (((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()) == "") {
166
- this.lastValidSearch = "";
167
- (_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.set("");
168
- return;
169
- }
170
- (_c = this.searchPublisher) === null || _c === void 0 ? void 0 : _c.set(this.lastValidSearch);
55
+ set label(value) {
56
+ if (this.hasAttribute("label") && !this.forceAutoFill)
57
+ value = this.getAttribute("label");
58
+ this._label = value;
59
+ this.requestUpdate();
60
+ }
61
+ connectedCallback() {
62
+ this.formDataProvider = this.getAncestorAttributeValue("formDataProvider");
63
+ super.connectedCallback();
171
64
  }
172
65
  render() {
173
66
  return html `
174
- <sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
67
+ <sonic-pop noToggle style="display:block;">
175
68
  <sonic-input
176
- debug
177
- dataProvider="${this.initSearchDataProvider + Math.random()}"
178
- formDataProvider="${this.searchDataProvider}"
179
69
  type="search"
180
- data-keyboard-nav="${this.getAttribute("data-keyboard-nav") || ""}"
70
+ data-keyboard-nav="nav-autocomplete"
181
71
  label="${ifDefined(this.label)}"
182
72
  description="${ifDefined(this.description)}"
183
- name="${ifDefined(this.searchParameter || this.name)}"
184
- placeholder="${ifDefined(this.placeholder)}"
185
- ?readonly="${this.readonly}"
73
+ name="${ifDefined(this.name)}"
74
+ value="${ifDefined(this.value)}"
186
75
  autocomplete="off"
187
76
  clearable
188
- inlineContent
189
- size=${this.size}
190
- >
191
- ${this.select
192
- ? html `
193
- <sonic-icon
194
- slot="suffix"
195
- class="select-chevron"
196
- name="nav-arrow-down"
197
- .size=${this.size}
198
- ></sonic-icon>
199
- `
200
- : nothing}
201
- </sonic-input>
77
+ ></sonic-input>
202
78
  <sonic-menu slot="content">
203
79
  <sonic-queue
204
- dataProvider="${this.queueDataProvider}"
205
80
  filteredFields=${this.filteredFields}
206
81
  dataProviderExpression="${this.dataProviderExpression}"
207
- dataFilterProvider="${this.searchDataProvider}"
82
+ dataFilterProvider="${this.formDataProvider}"
208
83
  key="${this.key}"
209
84
  .templates=${this.templateList}
210
85
  displayContents
211
86
  >
212
87
  </sonic-queue>
213
- <sonic-queue
214
- noLazyload
215
- dataProvider="${this.initQueueDataProvider}"
216
- filteredFields=${this.filteredFields}
217
- dataProviderExpression="${this.dataProviderExpression}"
218
- dataFilterProvider="${this.initSearchDataProvider}"
219
- key="${this.key}"
220
- displayContents
221
- >
222
- </sonic-queue>
223
88
  </sonic-menu>
224
89
  </sonic-pop>
225
90
  `;
@@ -233,8 +98,17 @@ InputAutocomplete.styles = [
233
98
  `,
234
99
  ];
235
100
  __decorate([
236
- property({ type: String })
237
- ], InputAutocomplete.prototype, "size", void 0);
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);
238
112
  __decorate([
239
113
  property({ type: String })
240
114
  ], InputAutocomplete.prototype, "placeholder", void 0);
@@ -247,15 +121,12 @@ __decorate([
247
121
  __decorate([
248
122
  property({ type: String })
249
123
  ], InputAutocomplete.prototype, "dataProviderExpression", void 0);
250
- __decorate([
251
- property({ type: Boolean })
252
- ], InputAutocomplete.prototype, "select", void 0);
253
124
  __decorate([
254
125
  property({ type: String })
255
126
  ], InputAutocomplete.prototype, "key", void 0);
256
127
  __decorate([
257
128
  property({ type: String })
258
- ], InputAutocomplete.prototype, "searchParameter", void 0);
129
+ ], InputAutocomplete.prototype, "value", void 0);
259
130
  InputAutocomplete = __decorate([
260
131
  customElement("sonic-input-autocomplete")
261
132
  ], InputAutocomplete);
@@ -5,9 +5,11 @@ export declare class Image extends LitElement {
5
5
  src: string;
6
6
  alt: string;
7
7
  loading: "eager" | "lazy";
8
+ transition?: "fade" | "fade-scale-out";
8
9
  ratio: string;
9
10
  objectPosition: string;
10
11
  imageRendering: string;
11
12
  cover: boolean;
13
+ firstUpdated(): void;
12
14
  render(): import("lit-html").TemplateResult<1>;
13
15
  }
@@ -20,6 +20,17 @@ let Image = class Image extends LitElement {
20
20
  this.imageRendering = "auto";
21
21
  this.cover = false;
22
22
  }
23
+ firstUpdated() {
24
+ var _a;
25
+ if (this.transition) {
26
+ const img = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("img");
27
+ if (!img)
28
+ return;
29
+ img.onload = function () {
30
+ img.classList.add("loaded");
31
+ };
32
+ }
33
+ }
23
34
  render() {
24
35
  const imgStyles = {
25
36
  aspectRatio: this.cover ? "auto" : this.ratio,
@@ -93,6 +104,20 @@ Image.styles = [
93
104
  height: 100% !important;
94
105
  width: 100% !important;
95
106
  }
107
+
108
+ :host([transition]) img {
109
+ opacity: 0;
110
+ transition: 0.25s;
111
+ }
112
+
113
+ :host([transition="fade-scale-out"]) img {
114
+ scale: 1.08;
115
+ transition: opacity 0.3s linear, scale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
116
+ }
117
+ :host([transition]) img.loaded {
118
+ opacity: 1;
119
+ scale: 1;
120
+ }
96
121
  `,
97
122
  ];
98
123
  __decorate([
@@ -107,6 +132,9 @@ __decorate([
107
132
  __decorate([
108
133
  property({ type: String })
109
134
  ], Image.prototype, "loading", void 0);
135
+ __decorate([
136
+ property({ type: String, reflect: true })
137
+ ], Image.prototype, "transition", void 0);
110
138
  __decorate([
111
139
  property({ type: String })
112
140
  ], Image.prototype, "ratio", void 0);
@@ -51,13 +51,11 @@ let Pop = Pop_1 = class Pop extends LitElement {
51
51
  this.lastContentY = 0;
52
52
  this.runPositioningLoop();
53
53
  }
54
- this.dispatchEvent(new CustomEvent("show"));
55
54
  }
56
55
  _hide() {
57
56
  this.open = false;
58
57
  this.popContent.setAttribute("tabindex", "-1");
59
58
  this.positioningRuns = false;
60
- this.dispatchEvent(new CustomEvent("hide"));
61
59
  }
62
60
  _handleClosePop(e) {
63
61
  const path = e.composedPath();
@@ -68,8 +66,7 @@ let Pop = Pop_1 = class Pop extends LitElement {
68
66
  const isCloseManual = HTML.getAncestorAttributeValue(target, "data-on-select") === "keep";
69
67
  if (e.type == "pointerdown" && popContainsTarget)
70
68
  return;
71
- if (e.type == "click" &&
72
- ((popContainsTarget && isCloseManual) || !popContentContainsTarget))
69
+ if (e.type == "click" && ((popContainsTarget && isCloseManual) || !popContentContainsTarget))
73
70
  return;
74
71
  pop._hide();
75
72
  });
@@ -146,11 +143,9 @@ let Pop = Pop_1 = class Pop extends LitElement {
146
143
  x = xRight;
147
144
  if (contentRect.y < shiftPadding && placement == "top")
148
145
  y = yBottom;
149
- if (contentRect.x + contentRect.width > window.innerWidth - shiftPadding &&
150
- placement == "right")
146
+ if (contentRect.x + contentRect.width > window.innerWidth - shiftPadding && placement == "right")
151
147
  x = xLeft;
152
- if (contentRect.y + contentRect.height > window.innerHeight - shiftPadding &&
153
- placement == "bottom")
148
+ if (contentRect.y + contentRect.height > window.innerHeight - shiftPadding && placement == "bottom")
154
149
  y = yTop;
155
150
  this.lastContentX += x - contentRect.x;
156
151
  this.lastContentY += y - contentRect.y;
@@ -166,12 +161,10 @@ let Pop = Pop_1 = class Pop extends LitElement {
166
161
  this.lastContentY += -contentRect.y;
167
162
  }
168
163
  if (contentRect.x + contentRect.width > window.innerWidth) {
169
- this.lastContentX +=
170
- window.innerWidth - (contentRect.x + contentRect.width);
164
+ this.lastContentX += window.innerWidth - (contentRect.x + contentRect.width);
171
165
  }
172
166
  if (contentRect.y + contentRect.height > window.innerHeight) {
173
- this.lastContentY +=
174
- window.innerHeight - (contentRect.y + contentRect.height);
167
+ this.lastContentY += window.innerHeight - (contentRect.y + contentRect.height);
175
168
  }
176
169
  Object.assign(this.popContent.style, {
177
170
  left: `${this.lastContentX}px`,
@@ -180,11 +173,7 @@ let Pop = Pop_1 = class Pop extends LitElement {
180
173
  }
181
174
  render() {
182
175
  return html `
183
- <slot
184
- @click=${this._toggle}
185
- @keydown=${this._toggle}
186
- class="contents"
187
- ></slot>
176
+ <slot @click=${this._toggle} @keydown=${this._toggle} class="contents"></slot>
188
177
  <slot
189
178
  name="content"
190
179
  tabindex="-1"
File without changes
File without changes
@@ -10,6 +10,7 @@ import { customElement, property } from "lit/decorators.js";
10
10
  import { coreVariables } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/core-variables";
11
11
  import { light } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/light";
12
12
  import { dark } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/dark";
13
+ import { PublisherManager } from "@supersoniks/concorde/utils";
13
14
  const tagName = "sonic-theme";
14
15
  let Theme = Theme_1 = class Theme extends LitElement {
15
16
  constructor() {
@@ -25,6 +26,7 @@ let Theme = Theme_1 = class Theme extends LitElement {
25
26
  this.postCSSVars();
26
27
  }
27
28
  postCSSVars() {
29
+ var _a;
28
30
  const stylesheets = document.styleSheets;
29
31
  const ssLength = stylesheets.length;
30
32
  const fontUrls = [];
@@ -34,13 +36,14 @@ let Theme = Theme_1 = class Theme extends LitElement {
34
36
  (ss.href.includes("googleapis") || ss.href.includes("typekit.net")))
35
37
  fontUrls.push(ss.href);
36
38
  }
39
+ const theme = {
40
+ variables: this.getCssVariables(),
41
+ fonts: fontUrls,
42
+ };
43
+ (_a = PublisherManager.get("sonic-theme")) === null || _a === void 0 ? void 0 : _a.set(theme);
37
44
  document.querySelectorAll("iframe").forEach((elt) => {
38
45
  var _a;
39
- return (_a = elt.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
40
- type: "SonicTheme",
41
- variables: this.getCssVariables(),
42
- fonts: fontUrls,
43
- }, "*");
46
+ return (_a = elt.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: "SonicTheme" }, theme), "*");
44
47
  });
45
48
  }
46
49
  receiveMessage(event) {
@@ -55,7 +58,6 @@ let Theme = Theme_1 = class Theme extends LitElement {
55
58
  ...Theme_1.styles.map((s) => s.styleSheet),
56
59
  ...Array.from(document.styleSheets),
57
60
  ];
58
- console.log(stylesheets);
59
61
  for (const stylesheet of stylesheets) {
60
62
  try {
61
63
  if (!stylesheet)
@@ -8,7 +8,7 @@ export declare class SonicToast extends LitElement {
8
8
  render(): import("lit-html").TemplateResult<1> | typeof nothing;
9
9
  static removeAll(): void;
10
10
  static add(conf: Toast): {
11
- id: number;
11
+ id: string | number;
12
12
  text: string;
13
13
  title: string | undefined;
14
14
  status: import("@supersoniks/concorde/core/components/ui/toast/types").ToastStatus;
@@ -1,7 +1,7 @@
1
1
  import { Message } from "@supersoniks/concorde/la-billetterie/_types/swagger";
2
2
  export type ToastStatus = Message["status"] | "" | "success";
3
3
  export type Toast = {
4
- id?: number;
4
+ id?: string | number;
5
5
  text: string;
6
6
  title?: string;
7
7
  status?: ToastStatus;
@@ -19,7 +19,6 @@ import "./group/group";
19
19
  import "./icon/icon";
20
20
  import "./image/image";
21
21
  import "./loader/loader";
22
- import "../../../la-billetterie/components/event/atoms/taxonomy/taxonomy";
23
22
  import "./menu/menu";
24
23
  import "./modal/modal";
25
24
  import "./alert/alert";
@@ -23,7 +23,6 @@ import "./group/group";
23
23
  import "./icon/icon";
24
24
  import "./image/image";
25
25
  import "./loader/loader";
26
- import "../../../la-billetterie/components/event/atoms/taxonomy/taxonomy";
27
26
  //Menu
28
27
  import "./menu/menu";
29
28
  // Misc
@@ -54,6 +54,7 @@ declare const Fetcher: <T extends Constructor<SubscriberInterface<PropsType>>, P
54
54
  /**
55
55
  * Première update, le comportement de lazyload est géré ici a l'aide d'un intersection observer.
56
56
  */
57
+ lazyLoadSpan?: HTMLSpanElement | undefined;
57
58
  handleLazyLoad(): void;
58
59
  onIntersection(entries: IntersectionObserverEntry[]): void;
59
60
  propertyMap: object;