@supersoniks/concorde 1.1.43 → 1.1.45
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.
- package/README.md +9 -7
- package/concorde-core.bundle.js +20 -20
- package/concorde-core.es.js +987 -804
- package/core/_types/types.d.ts +13 -8
- package/core/_types/types.js +1 -0
- package/core/components/functional/date/date.d.ts +2 -2
- package/core/components/functional/date/date.js +10 -10
- package/core/components/functional/example/example.d.ts +1 -1
- package/core/components/functional/fetch/fetch.d.ts +8 -6
- package/core/components/functional/list/list.d.ts +16 -8
- package/core/components/functional/list/list.js +29 -14
- package/core/components/functional/mix/mix.d.ts +5 -5
- package/core/components/functional/mix/mix.js +11 -8
- package/core/components/functional/queue/queue.d.ts +13 -4
- package/core/components/functional/queue/queue.js +33 -27
- package/core/components/functional/router/redirect.d.ts +2 -2
- package/core/components/functional/router/redirect.js +2 -6
- package/core/components/functional/router/router.d.ts +1 -1
- package/core/components/functional/router/router.js +22 -13
- package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -1
- package/core/components/functional/sdui/SDUIDescriptorTransformer.js +35 -36
- package/core/components/functional/sdui/sdui-utils.js +11 -11
- package/core/components/functional/sdui/sdui.d.ts +11 -10
- package/core/components/functional/sdui/sdui.js +33 -34
- package/core/components/functional/sdui/types.d.ts +8 -8
- package/core/components/functional/states/states.d.ts +3 -3
- package/core/components/functional/states/states.js +9 -8
- package/core/components/functional/submit/submit.d.ts +1 -1
- package/core/components/functional/submit/submit.js +16 -16
- package/core/components/functional/subscriber/subscriber.d.ts +1 -1
- package/core/components/functional/value/value.d.ts +1 -1
- package/core/components/functional/value/value.js +3 -2
- package/core/components/ui/_css/size.d.ts +1 -1
- package/core/components/ui/button/button.d.ts +6 -4
- package/core/components/ui/button/button.js +34 -30
- package/core/components/ui/captcha/captcha.d.ts +2 -2
- package/core/components/ui/captcha/captcha.js +2 -2
- package/core/components/ui/card/card-header.js +5 -1
- package/core/components/ui/card/card.js +7 -5
- package/core/components/ui/form/checkbox/checkbox.d.ts +36 -12
- package/core/components/ui/form/fieldset/fieldset.d.ts +1 -1
- package/core/components/ui/form/form-layout/form-layout.d.ts +1 -1
- package/core/components/ui/form/input/input.d.ts +14 -9
- package/core/components/ui/form/input/input.js +2 -2
- package/core/components/ui/form/input/password-helper.d.ts +1 -1
- package/core/components/ui/form/input/password-helper.js +1 -1
- package/core/components/ui/form/input/same-value-helper.d.ts +1 -1
- package/core/components/ui/form/input/same-value-helper.js +2 -2
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +1 -1
- package/core/components/ui/form/input-autocomplete/input-autocomplete.js +1 -1
- package/core/components/ui/form/select/select.d.ts +5 -4
- package/core/components/ui/form/select/select.js +24 -12
- package/core/components/ui/form/textarea/textarea.d.ts +11 -9
- package/core/components/ui/form/textarea/textarea.js +1 -1
- package/core/components/ui/group/group.js +8 -2
- package/core/components/ui/icon/icons.js +15 -13
- package/core/components/ui/loader/loader.d.ts +1 -1
- package/core/components/ui/loader/loader.js +1 -1
- package/core/components/ui/menu/menu.js +15 -16
- package/core/components/ui/modal/modal.d.ts +1 -1
- package/core/components/ui/modal/modal.js +1 -1
- package/core/components/ui/pop/pop.d.ts +6 -5
- package/core/components/ui/pop/pop.js +76 -46
- package/core/components/ui/table/table-tbody.js +1 -1
- package/core/components/ui/theme/theme.js +15 -13
- package/core/components/ui/toast/message-subscriber.d.ts +12 -9
- package/core/components/ui/toast/message-subscriber.js +10 -8
- package/core/components/ui/toast/toast.d.ts +1 -1
- package/core/components/ui/toast/toast.js +7 -8
- package/core/components/ui/toast/types.d.ts +3 -2
- package/core/components/ui/tooltip/tooltip.js +4 -4
- package/core/components/ui/ui.d.ts +1 -1
- package/core/components/ui/ui.js +1 -1
- package/core/mixins/Fetcher.d.ts +15 -17
- package/core/mixins/Fetcher.js +19 -10
- package/core/mixins/FormCheckable.d.ts +8 -5
- package/core/mixins/FormCheckable.js +21 -19
- package/core/mixins/FormElement.d.ts +10 -7
- package/core/mixins/FormElement.js +24 -23
- package/core/mixins/FormInput.d.ts +16 -10
- package/core/mixins/FormInput.js +1 -1
- package/core/mixins/Subscriber.d.ts +8 -6
- package/core/mixins/Subscriber.js +24 -23
- package/core/mixins/TemplatesContainer.d.ts +2 -1
- package/core/mixins/TemplatesContainer.js +2 -2
- package/core/utils/Arrays.js +12 -9
- package/core/utils/DataBindObserver.d.ts +4 -4
- package/core/utils/DataBindObserver.js +26 -28
- package/core/utils/HTML.d.ts +1 -1
- package/core/utils/HTML.js +2 -2
- package/core/utils/LocationHandler.js +10 -10
- package/core/utils/Objects.js +10 -4
- package/core/utils/PublisherProxy.d.ts +21 -15
- package/core/utils/PublisherProxy.js +67 -63
- package/core/utils/api.d.ts +40 -32
- package/core/utils/api.js +127 -32
- package/mixins.d.ts +25 -19
- package/package.json +11 -6
- package/core/components/ui/taxonomy/taxonomy.d.ts +0 -44
- package/core/components/ui/taxonomy/taxonomy.js +0 -115
|
@@ -3,8 +3,8 @@ declare const Input_base: {
|
|
|
3
3
|
new (...args: any[]): {
|
|
4
4
|
validateFormElement(): void;
|
|
5
5
|
forceAutoFill: boolean;
|
|
6
|
-
_type: "number" | "search" | "file" | "button" | "
|
|
7
|
-
type: "number" | "search" | "file" | "button" | "
|
|
6
|
+
_type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
|
|
7
|
+
type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
|
|
8
8
|
_description?: string | undefined;
|
|
9
9
|
description: string | undefined;
|
|
10
10
|
_label?: string | undefined;
|
|
@@ -15,7 +15,7 @@ declare const Input_base: {
|
|
|
15
15
|
updateDataValue(): void;
|
|
16
16
|
handleChange(e?: Event | undefined): void;
|
|
17
17
|
handleBlur(e?: Event | undefined): void;
|
|
18
|
-
getValueForFormPublisher():
|
|
18
|
+
getValueForFormPublisher(): string | object | string[] | null | undefined;
|
|
19
19
|
focus?: (() => void) | undefined;
|
|
20
20
|
shadowRoot?: ShadowRoot | undefined;
|
|
21
21
|
error: boolean;
|
|
@@ -25,13 +25,15 @@ declare const Input_base: {
|
|
|
25
25
|
formDataProvider: string;
|
|
26
26
|
ariaLabelledby?: string | undefined;
|
|
27
27
|
ariaLabel?: string | undefined;
|
|
28
|
-
_value: string | null;
|
|
29
|
-
value: string | null;
|
|
28
|
+
_value: string | object | string[] | null | undefined;
|
|
29
|
+
value: string | object | string[] | null | undefined;
|
|
30
30
|
_name: string;
|
|
31
31
|
name: string;
|
|
32
|
-
props:
|
|
33
|
-
propertyMap:
|
|
32
|
+
props: import("../../../../_types/types").CoreJSType;
|
|
33
|
+
propertyMap: object;
|
|
34
34
|
isConnected: boolean;
|
|
35
|
+
children: HTMLCollection;
|
|
36
|
+
appendChild(node: Node): Node;
|
|
35
37
|
getAncestorAttributeValue(attributeName: string): string;
|
|
36
38
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
37
39
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
@@ -48,13 +50,16 @@ declare const Input_base: {
|
|
|
48
50
|
removeAttribute(name: string): void;
|
|
49
51
|
initPublisher(): void;
|
|
50
52
|
getApiConfiguration(): import("../../../../utils/api").APIConfiguration;
|
|
53
|
+
/**
|
|
54
|
+
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
55
|
+
*/
|
|
51
56
|
connectedCallback(): void;
|
|
52
57
|
requestUpdate(): void;
|
|
53
58
|
getAttribute(name: string): string;
|
|
54
|
-
hasAttribute(attributeName:
|
|
59
|
+
hasAttribute(attributeName: string): boolean;
|
|
55
60
|
disconnectedCallback(): void;
|
|
56
61
|
};
|
|
57
|
-
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<
|
|
62
|
+
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
58
63
|
export declare class Input extends Input_base {
|
|
59
64
|
static styles: import("lit").CSSResult[];
|
|
60
65
|
/**
|
|
@@ -43,7 +43,7 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
43
43
|
if (this.hasAttribute("sameValueAs")) {
|
|
44
44
|
this.sameValueAsName = this.getAttribute("sameValueAs");
|
|
45
45
|
this.sameValueAsHandle = (v) => (this.pattern = v);
|
|
46
|
-
|
|
46
|
+
const formPublisher = this.getFormPublisher();
|
|
47
47
|
if (!formPublisher)
|
|
48
48
|
return;
|
|
49
49
|
formPublisher[this.sameValueAsName].onAssign(this.sameValueAsHandle);
|
|
@@ -52,7 +52,7 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
52
52
|
disconnectedCallback() {
|
|
53
53
|
super.disconnectedCallback();
|
|
54
54
|
if (this.hasAttribute("sameValueAs") && this.sameValueAsName) {
|
|
55
|
-
|
|
55
|
+
const formPublisher = this.getFormPublisher();
|
|
56
56
|
if (!formPublisher)
|
|
57
57
|
return;
|
|
58
58
|
formPublisher[this.sameValueAsName].offAssign(this.sameValueAsHandle);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
-
declare const SonicComponent_base: (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<
|
|
3
|
+
declare const SonicComponent_base: (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
4
4
|
export declare class SonicComponent extends SonicComponent_base {
|
|
5
5
|
name?: string;
|
|
6
6
|
minChars: number;
|
|
@@ -42,7 +42,7 @@ let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
|
|
|
42
42
|
this.hasMinuscule = /[a-z]/.test(v);
|
|
43
43
|
this.hasMajuscule = /[A-Z]/.test(v);
|
|
44
44
|
this.hasNumber = /[0-9]/.test(v);
|
|
45
|
-
this.hasSpecialChar = /[!"#$%&'()
|
|
45
|
+
this.hasSpecialChar = /[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(v);
|
|
46
46
|
};
|
|
47
47
|
PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue);
|
|
48
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
-
declare const SonicComponent_base: (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<
|
|
3
|
+
declare const SonicComponent_base: (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
4
4
|
export declare class SonicComponent extends SonicComponent_base {
|
|
5
5
|
name?: string;
|
|
6
6
|
sameValueAs?: string;
|
|
@@ -21,7 +21,7 @@ let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
|
|
|
21
21
|
}
|
|
22
22
|
connectedCallback() {
|
|
23
23
|
super.connectedCallback();
|
|
24
|
-
|
|
24
|
+
const formDataProvider = PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"));
|
|
25
25
|
if (this.name && this.sameValueAs) {
|
|
26
26
|
this.checkValue = (v) => {
|
|
27
27
|
if (v)
|
|
@@ -38,7 +38,7 @@ let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
|
|
|
38
38
|
}
|
|
39
39
|
disconnectedCallback() {
|
|
40
40
|
if (this.checkValue && this.name && this.sameValueAs) {
|
|
41
|
-
|
|
41
|
+
const formDataProvider = PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"));
|
|
42
42
|
formDataProvider[this.name].offAssign(this.checkValue);
|
|
43
43
|
formDataProvider[this.sameValueAs].offAssign(this.checkValue);
|
|
44
44
|
}
|
|
@@ -3,7 +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
|
-
declare const InputAutocomplete_base: (new (...args: any[]) => import("../../../../mixins/TemplatesContainer").TemplatesContainerInterface) & (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<
|
|
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;
|
|
7
7
|
/**
|
|
8
8
|
* Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
|
|
9
9
|
* L'input permet de filtrer les choix de valeurs dans le sonic-pop.
|
|
@@ -64,7 +64,7 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(Subsc
|
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
66
|
return html `
|
|
67
|
-
<sonic-pop
|
|
67
|
+
<sonic-pop noToggle style="display:block;">
|
|
68
68
|
<sonic-input
|
|
69
69
|
type="search"
|
|
70
70
|
data-keyboard-nav="nav-autocomplete"
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
-
|
|
3
|
+
import { Size } from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
4
|
+
export type SelectOption = {
|
|
4
5
|
value?: string;
|
|
5
6
|
wording?: string;
|
|
6
7
|
selected?: boolean;
|
|
7
8
|
hasAttribute?: (value: string) => boolean;
|
|
8
9
|
} & Record<string, string>;
|
|
9
|
-
declare const Select_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<
|
|
10
|
+
declare const Select_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
10
11
|
/**
|
|
11
12
|
* #### FormElement :
|
|
12
13
|
* * 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é.
|
|
@@ -19,13 +20,13 @@ export declare class Select extends Select_base {
|
|
|
19
20
|
valueKey: string;
|
|
20
21
|
wordingKey: string;
|
|
21
22
|
multiple: boolean;
|
|
22
|
-
size?:
|
|
23
|
+
size?: Size;
|
|
23
24
|
selectSize?: number;
|
|
24
25
|
private _options;
|
|
25
26
|
set options(options: Array<SelectOption>);
|
|
26
27
|
get options(): Array<SelectOption>;
|
|
27
28
|
hasDoneFirstUpdate: boolean;
|
|
28
|
-
protected firstUpdated(
|
|
29
|
+
protected firstUpdated(): void;
|
|
29
30
|
_value: string;
|
|
30
31
|
set value(value: string);
|
|
31
32
|
get value(): string;
|
|
@@ -49,7 +49,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
49
49
|
this.value = option.value || "";
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
const value = this.value || this.getAttribute("value");
|
|
53
53
|
if (!value && this._options.length > 0) {
|
|
54
54
|
this.value = this._options[0][this.valueKey];
|
|
55
55
|
}
|
|
@@ -58,7 +58,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
58
58
|
get options() {
|
|
59
59
|
return this._options;
|
|
60
60
|
}
|
|
61
|
-
firstUpdated(
|
|
61
|
+
firstUpdated() {
|
|
62
62
|
this.hasDoneFirstUpdate = true;
|
|
63
63
|
}
|
|
64
64
|
set value(value) {
|
|
@@ -76,7 +76,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
76
76
|
return this._value;
|
|
77
77
|
}
|
|
78
78
|
updateFormPublisherValue() {
|
|
79
|
-
|
|
79
|
+
const formPublisher = this.getFormPublisher();
|
|
80
80
|
if (formPublisher) {
|
|
81
81
|
formPublisher[this.name] = this.value;
|
|
82
82
|
}
|
|
@@ -84,7 +84,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
84
84
|
connectedCallback() {
|
|
85
85
|
super.connectedCallback();
|
|
86
86
|
this.hasSlotOrProps();
|
|
87
|
-
|
|
87
|
+
const options = this.querySelectorAll("option");
|
|
88
88
|
if (options.length > 0) {
|
|
89
89
|
this.options = Array.from(options).map((option) => {
|
|
90
90
|
return {
|
|
@@ -129,7 +129,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
129
129
|
const select = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("select");
|
|
130
130
|
if (!select || select.checkValidity())
|
|
131
131
|
return;
|
|
132
|
-
|
|
132
|
+
const formPublisher = this.getFormPublisher();
|
|
133
133
|
if (formPublisher) {
|
|
134
134
|
formPublisher.isFormValid = false;
|
|
135
135
|
}
|
|
@@ -156,7 +156,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
156
156
|
id="form-element"
|
|
157
157
|
@change=${this.handleChange}
|
|
158
158
|
@blur=${this.handleBlur}
|
|
159
|
-
?disabled=${
|
|
159
|
+
?disabled=${this.disabled}
|
|
160
160
|
?required=${this.required}
|
|
161
161
|
?multiple=${this.multiple}
|
|
162
162
|
size=${ifDefined(this.selectSize)}
|
|
@@ -167,8 +167,8 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
167
167
|
aria-labelledby=${ifDefined(this.ariaLabelledby)}
|
|
168
168
|
>
|
|
169
169
|
${repeat(this.options, (option) => option[this.valueKey], (option) => {
|
|
170
|
-
const isSelected = this.value == option[this.valueKey] ?
|
|
171
|
-
return html `<option selected=${
|
|
170
|
+
const isSelected = this.value == option[this.valueKey] ? true : false;
|
|
171
|
+
return html `<option ?selected=${isSelected} value="${option[this.valueKey]}">
|
|
172
172
|
${option[this.wordingKey]}
|
|
173
173
|
</option>`;
|
|
174
174
|
})}
|
|
@@ -203,9 +203,16 @@ Select.styles = [
|
|
|
203
203
|
opacity: 0;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
@supports selector(:has(*)) {
|
|
207
|
+
:host(:not([disabled])) .form-element:not(:has(option:only-child)) {
|
|
208
|
+
padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/*Firefox etc.*/
|
|
212
|
+
@supports not selector(:has(*)) {
|
|
213
|
+
:host(:not([disabled])) .form-element {
|
|
214
|
+
padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
|
|
215
|
+
}
|
|
209
216
|
}
|
|
210
217
|
|
|
211
218
|
.form-select-wrapper {
|
|
@@ -223,10 +230,15 @@ Select.styles = [
|
|
|
223
230
|
}
|
|
224
231
|
|
|
225
232
|
option {
|
|
226
|
-
padding: 0.1rem
|
|
233
|
+
padding: 0.1rem var(--sc-input-px);
|
|
227
234
|
color: var(--sc-base-content);
|
|
228
235
|
background: var(--sc-base);
|
|
229
236
|
}
|
|
237
|
+
|
|
238
|
+
select[multiple] option {
|
|
239
|
+
background: transparent;
|
|
240
|
+
padding: 0;
|
|
241
|
+
}
|
|
230
242
|
`,
|
|
231
243
|
];
|
|
232
244
|
__decorate([
|
|
@@ -3,8 +3,8 @@ declare const Textarea_base: {
|
|
|
3
3
|
new (...args: any[]): {
|
|
4
4
|
validateFormElement(): void;
|
|
5
5
|
forceAutoFill: boolean;
|
|
6
|
-
_type: "number" | "search" | "file" | "button" | "
|
|
7
|
-
type: "number" | "search" | "file" | "button" | "
|
|
6
|
+
_type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
|
|
7
|
+
type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
|
|
8
8
|
_description?: string | undefined;
|
|
9
9
|
description: string | undefined;
|
|
10
10
|
_label?: string | undefined;
|
|
@@ -15,7 +15,7 @@ declare const Textarea_base: {
|
|
|
15
15
|
updateDataValue(): void;
|
|
16
16
|
handleChange(e?: Event | undefined): void;
|
|
17
17
|
handleBlur(e?: Event | undefined): void;
|
|
18
|
-
getValueForFormPublisher():
|
|
18
|
+
getValueForFormPublisher(): string | object | string[] | null | undefined;
|
|
19
19
|
focus?: (() => void) | undefined;
|
|
20
20
|
shadowRoot?: ShadowRoot | undefined;
|
|
21
21
|
error: boolean;
|
|
@@ -25,13 +25,15 @@ declare const Textarea_base: {
|
|
|
25
25
|
formDataProvider: string;
|
|
26
26
|
ariaLabelledby?: string | undefined;
|
|
27
27
|
ariaLabel?: string | undefined;
|
|
28
|
-
_value: string | null;
|
|
29
|
-
value: string | null;
|
|
28
|
+
_value: string | object | string[] | null | undefined;
|
|
29
|
+
value: string | object | string[] | null | undefined;
|
|
30
30
|
_name: string;
|
|
31
31
|
name: string;
|
|
32
|
-
props:
|
|
33
|
-
propertyMap:
|
|
32
|
+
props: import("../../../../_types/types").CoreJSType;
|
|
33
|
+
propertyMap: object;
|
|
34
34
|
isConnected: boolean;
|
|
35
|
+
children: HTMLCollection;
|
|
36
|
+
appendChild(node: Node): Node;
|
|
35
37
|
getAncestorAttributeValue(attributeName: string): string;
|
|
36
38
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
37
39
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
@@ -51,10 +53,10 @@ declare const Textarea_base: {
|
|
|
51
53
|
connectedCallback(): void;
|
|
52
54
|
requestUpdate(): void;
|
|
53
55
|
getAttribute(name: string): string;
|
|
54
|
-
hasAttribute(attributeName:
|
|
56
|
+
hasAttribute(attributeName: string): boolean;
|
|
55
57
|
disconnectedCallback(): void;
|
|
56
58
|
};
|
|
57
|
-
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<
|
|
59
|
+
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
58
60
|
export declare class Textarea extends Textarea_base {
|
|
59
61
|
static styles: import("lit").CSSResult[];
|
|
60
62
|
size: "" | "xs" | "sm" | "lg";
|
|
@@ -44,7 +44,7 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
|
|
|
44
44
|
const textarea = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("textarea");
|
|
45
45
|
if (!textarea || textarea.checkValidity())
|
|
46
46
|
return;
|
|
47
|
-
|
|
47
|
+
const formPublisher = this.getFormPublisher();
|
|
48
48
|
if (formPublisher) {
|
|
49
49
|
formPublisher.isFormValid = false;
|
|
50
50
|
}
|
|
@@ -19,7 +19,7 @@ let Group = class Group extends LitElement {
|
|
|
19
19
|
this.hasLabel = false;
|
|
20
20
|
}
|
|
21
21
|
updated() {
|
|
22
|
-
const children = this.querySelectorAll("sonic-input, sonic-button");
|
|
22
|
+
const children = this.querySelectorAll("sonic-input, sonic-button, sonic-select");
|
|
23
23
|
const nbChildren = children.length;
|
|
24
24
|
if (nbChildren > 1) {
|
|
25
25
|
children.forEach((item, index) => {
|
|
@@ -55,7 +55,7 @@ let Group = class Group extends LitElement {
|
|
|
55
55
|
this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) === null || _b === void 0 ? void 0 : _b.length) ? true : false;
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
|
|
58
|
+
const slotStyle = {
|
|
59
59
|
alignItems: this.alignItems,
|
|
60
60
|
};
|
|
61
61
|
return html `<span class="${this.hasLabel ? "form-label" : "hidden"}"
|
|
@@ -91,6 +91,12 @@ Group.styles = [
|
|
|
91
91
|
.hidden {
|
|
92
92
|
display: none;
|
|
93
93
|
}
|
|
94
|
+
|
|
95
|
+
::slotted(sonic-button),
|
|
96
|
+
::slotted(sonic-input),
|
|
97
|
+
::slotted(sonic-select) {
|
|
98
|
+
flex-grow: 1;
|
|
99
|
+
}
|
|
94
100
|
`,
|
|
95
101
|
];
|
|
96
102
|
__decorate([
|
|
@@ -8,6 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
var _a;
|
|
11
|
+
// ici on désactive un regle de eslint exceptionnelement pour ce fichier
|
|
12
|
+
/* eslint no-async-promise-executor: 0 */ // --> OFF
|
|
11
13
|
import icons from "@supersoniks/concorde/core/components/ui/icon/icons.json";
|
|
12
14
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
13
15
|
/**
|
|
@@ -57,10 +59,10 @@ function enableCustomLibrary() {
|
|
|
57
59
|
export default class Icons {
|
|
58
60
|
static registerIcons(newIcons) {
|
|
59
61
|
const record = icons;
|
|
60
|
-
for (
|
|
62
|
+
for (const prefix in newIcons) {
|
|
61
63
|
const newObj = newIcons[prefix];
|
|
62
64
|
const currentRecord = record[prefix] || {};
|
|
63
|
-
for (
|
|
65
|
+
for (const name in newObj) {
|
|
64
66
|
currentRecord[name] = newObj[name];
|
|
65
67
|
}
|
|
66
68
|
record[prefix] = currentRecord;
|
|
@@ -70,8 +72,8 @@ export default class Icons {
|
|
|
70
72
|
_a = Icons;
|
|
71
73
|
Icons.fontAwesomeNext = {
|
|
72
74
|
get: (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
const library = params.library;
|
|
76
|
+
const name = params.name || "";
|
|
75
77
|
const iconsAsRecord = icons;
|
|
76
78
|
/**
|
|
77
79
|
* SVGS en ligne
|
|
@@ -80,30 +82,30 @@ Icons.fontAwesomeNext = {
|
|
|
80
82
|
enableCustomLibrary();
|
|
81
83
|
}
|
|
82
84
|
if (library && libraries[library]) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
const libraryItem = libraries[library];
|
|
86
|
+
const prefix = params.prefix || libraryItem.defaultPrefix || "";
|
|
87
|
+
const libIcons = iconsAsRecord[library] || {};
|
|
86
88
|
iconsAsRecord[library] = libIcons;
|
|
87
|
-
|
|
89
|
+
const libIconsKey = prefix + "-" + name;
|
|
88
90
|
// if(!libIcons )libIcons = iconsAsRecord[library] = {};
|
|
89
91
|
/**
|
|
90
92
|
* Si l'icone a déjà été chargée on ne la recharge pas
|
|
91
93
|
*/
|
|
92
94
|
if (libIcons[libIconsKey])
|
|
93
95
|
return unsafeHTML(libIcons[libIconsKey]);
|
|
94
|
-
|
|
96
|
+
const url = libraryItem.url.replace("$prefix", prefix).replace("$name", name);
|
|
95
97
|
/**
|
|
96
98
|
* on utilise une promise mutualisée pour ne pas faire plusieurs appels concurents d'une même icone
|
|
97
99
|
*/
|
|
98
100
|
if (!loadingGetPromises.has(url)) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
const promise = new Promise((resolve) => __awaiter(void 0, void 0, void 0, function* () {
|
|
102
|
+
const result = yield fetch(url);
|
|
101
103
|
if (!result.ok) {
|
|
102
104
|
resolve(`<b title="Erreur ${result.status}">😶</b>`);
|
|
103
105
|
return;
|
|
104
106
|
}
|
|
105
107
|
try {
|
|
106
|
-
|
|
108
|
+
const text = yield result.text();
|
|
107
109
|
resolve(text);
|
|
108
110
|
}
|
|
109
111
|
catch (e) {
|
|
@@ -115,7 +117,7 @@ Icons.fontAwesomeNext = {
|
|
|
115
117
|
/**
|
|
116
118
|
* Chargement de l'icone.
|
|
117
119
|
*/
|
|
118
|
-
|
|
120
|
+
const result = yield loadingGetPromises.get(url);
|
|
119
121
|
loadingGetPromises.delete(url);
|
|
120
122
|
libIcons[libIconsKey] = result || "";
|
|
121
123
|
return unsafeHTML(result);
|
|
@@ -23,7 +23,7 @@ let Loader = Loader_1 = class Loader extends LitElement {
|
|
|
23
23
|
static show(conf) {
|
|
24
24
|
if (!Loader_1.loader)
|
|
25
25
|
Loader_1.loader = document.createElement("sonic-loader");
|
|
26
|
-
|
|
26
|
+
const loader = Loader_1.loader;
|
|
27
27
|
if (!conf)
|
|
28
28
|
conf = {};
|
|
29
29
|
if (conf.mode)
|
|
@@ -75,39 +75,38 @@ let MenuItems = class MenuItems extends LitElement {
|
|
|
75
75
|
super.disconnectedCallback();
|
|
76
76
|
}
|
|
77
77
|
initScrollable() {
|
|
78
|
-
const tabsMenu = this;
|
|
79
78
|
let isDown = false;
|
|
80
79
|
let startX;
|
|
81
80
|
let scrollLeft;
|
|
82
81
|
if (this.scrollable) {
|
|
83
|
-
|
|
82
|
+
this.addEventListener("mousedown", (e) => {
|
|
84
83
|
isDown = true;
|
|
85
|
-
|
|
86
|
-
startX = e.pageX -
|
|
87
|
-
scrollLeft =
|
|
84
|
+
this.classList.add("active");
|
|
85
|
+
startX = e.pageX - this.offsetLeft;
|
|
86
|
+
scrollLeft = this.scrollLeft;
|
|
88
87
|
});
|
|
89
|
-
|
|
88
|
+
this.addEventListener("mouseleave", () => {
|
|
90
89
|
isDown = false;
|
|
91
|
-
|
|
90
|
+
this.classList.remove("active");
|
|
92
91
|
});
|
|
93
|
-
|
|
92
|
+
this.addEventListener("mouseup", () => {
|
|
94
93
|
isDown = false;
|
|
95
|
-
|
|
94
|
+
this.classList.remove("active");
|
|
96
95
|
});
|
|
97
|
-
|
|
96
|
+
this.addEventListener("mousemove", (e) => {
|
|
98
97
|
if (!isDown)
|
|
99
98
|
return;
|
|
100
99
|
e.preventDefault();
|
|
101
|
-
const x = e.pageX -
|
|
100
|
+
const x = e.pageX - this.offsetLeft;
|
|
102
101
|
const walk = (x - startX) * 1.5; //scroll-fast
|
|
103
|
-
|
|
104
|
-
this.setScrollShadow(
|
|
102
|
+
this.scrollLeft = scrollLeft - walk;
|
|
103
|
+
this.setScrollShadow(this, this.direction);
|
|
105
104
|
});
|
|
106
|
-
|
|
105
|
+
this.addEventListener("scroll", (e) => {
|
|
107
106
|
e.preventDefault();
|
|
108
107
|
// const delta = Math.sign(e.deltaY);
|
|
109
|
-
//
|
|
110
|
-
this.setScrollShadow(
|
|
108
|
+
// this.scrollLeft += delta * 50;
|
|
109
|
+
this.setScrollShadow(this, this.direction);
|
|
111
110
|
});
|
|
112
111
|
}
|
|
113
112
|
}
|
|
@@ -7,7 +7,7 @@ import "@supersoniks/concorde/core/components/ui/modal/modal-title";
|
|
|
7
7
|
declare type ModalCreateOptions = {
|
|
8
8
|
content?: string;
|
|
9
9
|
};
|
|
10
|
-
declare const Modal_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<
|
|
10
|
+
declare const Modal_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("@supersoniks/concorde/core/_types/types").CoreJSType>) & typeof LitElement;
|
|
11
11
|
export declare class Modal extends Modal_base {
|
|
12
12
|
static styles: import("lit").CSSResult[];
|
|
13
13
|
forceAction: boolean;
|
|
@@ -34,7 +34,7 @@ let Modal = class Modal extends Subscriber(LitElement) {
|
|
|
34
34
|
const modal = document.createElement(tagName);
|
|
35
35
|
modal.innerHTML =
|
|
36
36
|
`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${options.content}</sonic-modal-content>` || "";
|
|
37
|
-
|
|
37
|
+
const container = document.querySelector("sonic-theme") || document.body;
|
|
38
38
|
container.appendChild(modal);
|
|
39
39
|
modal.show();
|
|
40
40
|
return modal;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
|
|
1
|
+
import { LitElement, PropertyValues } from "lit";
|
|
2
|
+
type PopPlacement = "bottom" | "top" | "right" | "left";
|
|
3
3
|
export declare class Pop extends LitElement {
|
|
4
4
|
static pops: Set<Pop>;
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
6
|
open: boolean;
|
|
7
7
|
popBtn: HTMLElement;
|
|
8
8
|
popContent: HTMLElement;
|
|
9
|
-
toggle: "true" | "false";
|
|
10
9
|
noToggle: boolean;
|
|
11
10
|
inline: boolean;
|
|
12
11
|
/**
|
|
@@ -17,14 +16,16 @@ export declare class Pop extends LitElement {
|
|
|
17
16
|
positioningRuns: boolean;
|
|
18
17
|
lastContentX: number;
|
|
19
18
|
lastContentY: number;
|
|
20
|
-
|
|
19
|
+
resizeObserver: ResizeObserver;
|
|
20
|
+
runPositioningLoop(): void;
|
|
21
21
|
_toggle(e: Event): void;
|
|
22
22
|
_show(): void;
|
|
23
23
|
_hide(): void;
|
|
24
24
|
_handleClosePop(e: Event): void;
|
|
25
25
|
connectedCallback(): void;
|
|
26
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
26
27
|
disconnectedCallback(): void;
|
|
27
|
-
|
|
28
|
+
computePosition(placement: PopPlacement): void;
|
|
28
29
|
render(): import("lit-html").TemplateResult<1>;
|
|
29
30
|
}
|
|
30
31
|
export {};
|