@supersoniks/concorde 1.1.26 → 1.1.28
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/components.d.ts +2 -2
- package/components.js +2 -2
- package/concorde-core.bundle.js +18 -18
- package/concorde-core.es.js +16 -16
- package/core/components/functional/list/list.d.ts +1 -4
- package/core/components/functional/list/list.js +1 -1
- package/core/components/ui/button/button.d.ts +1 -1
- package/core/components/ui/form/checkbox/checkbox.d.ts +2 -2
- package/core/components/ui/form/checkbox/checkbox.js +2 -2
- package/core/components/ui/form/input/input.d.ts +1 -4
- package/core/components/ui/form/input/input.js +1 -1
- package/core/components/ui/form/radio/radio.d.ts +1 -1
- package/core/components/ui/form/radio/radio.js +1 -1
- package/core/components/ui/form/select/select.js +1 -1
- package/core/components/ui/form/textarea/textarea.d.ts +1 -1
- package/core/components/ui/form/textarea/textarea.js +1 -1
- package/core/components/ui/icon/icon.js +1 -1
- package/core/components/ui/icon/icons.js +5 -1
- package/core/components/ui/icon/icons.json +1 -1
- package/core/components/ui/loader/loader.js +2 -2
- package/core/components/ui/menu/menu-item.d.ts +1 -1
- package/core/components/ui/menu/menu-item.js +1 -1
- package/core/components/ui/menu/menu.d.ts +1 -1
- package/core/components/ui/menu/menu.js +1 -1
- package/core/components/ui/modal/modal.d.ts +5 -5
- package/core/components/ui/modal/modal.js +5 -5
- package/core/components/ui/table/table.d.ts +7 -7
- package/core/components/ui/table/table.js +7 -7
- package/core/components/ui/tabs/tab.d.ts +1 -1
- package/core/components/ui/tabs/tab.js +1 -1
- package/core/components/ui/tabs/tabs.js +0 -1
- package/core/components/ui/taxonomy/taxonomy.d.ts +2 -2
- package/core/components/ui/taxonomy/taxonomy.js +2 -2
- package/core/components/ui/theme/theme.js +3 -3
- package/core/components/ui/toast/message-subscriber.js +1 -1
- package/core/components/ui/toast/toast-item.d.ts +4 -2
- package/core/components/ui/toast/toast-item.js +24 -1
- package/core/components/ui/toast/toast.d.ts +4 -3
- package/core/components/ui/toast/toast.js +17 -3
- package/core/components/ui/toast/types.d.ts +1 -0
- package/core/mixins/Fetcher.d.ts +3 -5
- package/core/mixins/Fetcher.js +4 -4
- package/core/mixins/FormCheckable.d.ts +4 -1
- package/core/mixins/FormCheckable.js +2 -2
- package/core/mixins/FormElement.d.ts +1 -1
- package/core/mixins/FormElement.js +2 -2
- package/core/mixins/FormInput.d.ts +9 -1
- package/core/mixins/Subscriber.js +1 -1
- package/core/utils/DataBindObserver.js +4 -0
- package/core/utils/LocationHandler.js +4 -2
- package/core/utils/api.js +1 -1
- package/mixins.d.ts +5 -5
- package/mixins.js +6 -6
- package/package.json +192 -189
- package/utils.d.ts +8 -8
- package/utils.js +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/loader/loader";
|
|
3
|
-
import "
|
|
3
|
+
import "@supersoniks/concorde/core/components/functional/subscriber/subscriber";
|
|
4
4
|
declare const List_base: {
|
|
5
5
|
new (...args: any[]): {
|
|
6
6
|
api: import("../../../utils/api").default | null;
|
|
@@ -16,9 +16,6 @@ declare const List_base: {
|
|
|
16
16
|
onInvalidate: any;
|
|
17
17
|
disconnectedCallback(): void;
|
|
18
18
|
connectedCallback(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Loading
|
|
21
|
-
*/
|
|
22
19
|
firstUpdated(): void;
|
|
23
20
|
onIntersection(entries: IntersectionObserverEntry[]): void;
|
|
24
21
|
props: any;
|
|
@@ -11,7 +11,7 @@ import Fetcher from "@supersoniks/concorde/core/mixins/Fetcher";
|
|
|
11
11
|
import { repeat } from "lit/directives/repeat.js";
|
|
12
12
|
import { templateContent } from "lit/directives/template-content.js";
|
|
13
13
|
import "@supersoniks/concorde/core/components/ui/loader/loader";
|
|
14
|
-
import "
|
|
14
|
+
import "@supersoniks/concorde/core/components/functional/subscriber/subscriber";
|
|
15
15
|
import Objects from "@supersoniks/concorde/core/utils/Objects";
|
|
16
16
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
17
17
|
import TemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
|
|
@@ -19,7 +19,7 @@ declare const Checkbox_base: {
|
|
|
19
19
|
getFormPublisher(): any;
|
|
20
20
|
updateDataValue(): void;
|
|
21
21
|
error: true | null;
|
|
22
|
-
autofocus:
|
|
22
|
+
autofocus: boolean;
|
|
23
23
|
disabled: true | null;
|
|
24
24
|
required: true | null;
|
|
25
25
|
formDataProvider: string;
|
|
@@ -56,7 +56,7 @@ declare const Checkbox_base: {
|
|
|
56
56
|
handleChange(e?: any): void;
|
|
57
57
|
getValueForFormPublisher(): any;
|
|
58
58
|
error: true | null;
|
|
59
|
-
autofocus:
|
|
59
|
+
autofocus: boolean;
|
|
60
60
|
disabled: true | null;
|
|
61
61
|
required: true | null;
|
|
62
62
|
formDataProvider: string;
|
|
@@ -62,7 +62,7 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
|
|
|
62
62
|
.checked=${ifDefined(this.checked)}
|
|
63
63
|
.name=${this.name}
|
|
64
64
|
.value=${this.value}
|
|
65
|
-
autofocus=${
|
|
65
|
+
?autofocus=${this.autofocus}
|
|
66
66
|
|
|
67
67
|
/>
|
|
68
68
|
<sonic-icon
|
|
@@ -73,7 +73,7 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
|
|
|
73
73
|
<slot></slot>
|
|
74
74
|
<slot name="description" class="${this.hasDescription ? "description" : "hidden"} ">
|
|
75
75
|
${this.description ? html `${this.description}` : ""}
|
|
76
|
-
|
|
76
|
+
</slot>
|
|
77
77
|
</div>
|
|
78
78
|
</label>
|
|
79
79
|
`;
|
|
@@ -10,7 +10,7 @@ declare const Input_base: {
|
|
|
10
10
|
handleChange(e?: any): void;
|
|
11
11
|
getValueForFormPublisher(): any;
|
|
12
12
|
error: true | null;
|
|
13
|
-
autofocus:
|
|
13
|
+
autofocus: boolean;
|
|
14
14
|
disabled: true | null;
|
|
15
15
|
required: true | null;
|
|
16
16
|
formDataProvider: string;
|
|
@@ -35,9 +35,6 @@ declare const Input_base: {
|
|
|
35
35
|
removeAttribute(name: string): void;
|
|
36
36
|
initPublisher(): void;
|
|
37
37
|
getApiConfiguration(): import("../../../../utils/api").APIConfiguration;
|
|
38
|
-
/**
|
|
39
|
-
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
40
|
-
*/
|
|
41
38
|
connectedCallback(): void;
|
|
42
39
|
requestUpdate(): void;
|
|
43
40
|
getAttribute(name: string): string;
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement } from "lit";
|
|
8
8
|
import { customElement, property, queryAssignedNodes, state } from "lit/decorators.js";
|
|
9
9
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
|
-
import { formControl } from "
|
|
10
|
+
import { formControl } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
11
11
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
12
12
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
13
13
|
import FormInput from "@supersoniks/concorde/core/mixins/FormInput";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Checkbox } from "
|
|
1
|
+
import { Checkbox } from "@supersoniks/concorde/core/components/ui/form/checkbox/checkbox";
|
|
2
2
|
export declare class Radio extends Checkbox {
|
|
3
3
|
static styles: (import("lit").CSSResult | import("lit").CSSResultGroup[])[];
|
|
4
4
|
constructor();
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
-
import { Checkbox } from "
|
|
9
|
+
import { Checkbox } from "@supersoniks/concorde/core/components/ui/form/checkbox/checkbox";
|
|
10
10
|
/**
|
|
11
11
|
* ### Le composant sonic-radio étend sonic-checkbox en assignant sa propriété radio à true.
|
|
12
12
|
*
|
|
@@ -10,7 +10,7 @@ import { customElement, property, queryAssignedNodes, state } from "lit/decorato
|
|
|
10
10
|
import { classMap } from "lit/directives/class-map.js";
|
|
11
11
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
12
12
|
import { repeat } from "lit/directives/repeat.js";
|
|
13
|
-
import { formControl } from "
|
|
13
|
+
import { formControl } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
14
14
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
15
15
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
16
16
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, property, state, queryAssignedNodes } from "lit/decorators.js";
|
|
9
9
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
|
-
import { formControl } from "
|
|
10
|
+
import { formControl } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
11
11
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
12
12
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
13
13
|
import FormInput from "@supersoniks/concorde/core/mixins/FormInput";
|
|
@@ -15,7 +15,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
15
15
|
};
|
|
16
16
|
import { LitElement, css, nothing } from "lit";
|
|
17
17
|
import { customElement, property } from "lit/decorators.js";
|
|
18
|
-
import Icons from "
|
|
18
|
+
import Icons from "@supersoniks/concorde/core/components/ui/icon/icons";
|
|
19
19
|
/**
|
|
20
20
|
* Afficher l'icone choisie parmis une liste prédéfinie dans icons.json
|
|
21
21
|
* les tailles suivantes sont disponible via l'attribut *size* : 2xs,xs,sm,"",lg,xl,2xl
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
var _a;
|
|
11
11
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
12
|
-
import icons from "
|
|
12
|
+
import icons from "@supersoniks/concorde/core/components/ui/icon/icons.json";
|
|
13
13
|
/**
|
|
14
14
|
* Ce tableau static permet de ne pas appeler plusieurs fois le même service lors d'appel concurrents en GET.
|
|
15
15
|
*/
|
|
@@ -95,6 +95,10 @@ Icons.fontAwesomeNext = {
|
|
|
95
95
|
if (!loadingGetPromises.has(url)) {
|
|
96
96
|
let promise = new Promise((resolve) => __awaiter(void 0, void 0, void 0, function* () {
|
|
97
97
|
let result = yield fetch(url);
|
|
98
|
+
if (!result.ok) {
|
|
99
|
+
resolve(`<b title="Erreur ${result.status}">😶</b>`);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
98
102
|
try {
|
|
99
103
|
let text = yield result.text();
|
|
100
104
|
resolve(text);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{}
|
|
1
|
+
{ "core": { "cancel": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "check-circled-outline": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M7 12.5L10 15.5L17 8.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "check": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5 13L9 17L19 7\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "emoji-puzzled": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg width=\"24px\" height=\"24px\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" color=\"#000000\"><path d=\"M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z\" fill=\"#000\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></svg>", "info-empty": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 11.5V16.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 7.51L12.01 7.49889\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "loader": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-loader\"><line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"6\"></line><line x1=\"12\" y1=\"18\" x2=\"12\" y2=\"22\"></line><line x1=\"4.93\" y1=\"4.93\" x2=\"7.76\" y2=\"7.76\"></line><line x1=\"16.24\" y1=\"16.24\" x2=\"19.07\" y2=\"19.07\"></line><line x1=\"2\" y1=\"12\" x2=\"6\" y2=\"12\"></line><line x1=\"18\" y1=\"12\" x2=\"22\" y2=\"12\"></line><line x1=\"4.93\" y1=\"19.07\" x2=\"7.76\" y2=\"16.24\"></line><line x1=\"16.24\" y1=\"7.76\" x2=\"19.07\" y2=\"4.93\"></line></svg>", "more-horiz": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "more-vert": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "nav-arrow-down": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M6 9L12 15L18 9\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "warning-circled-outline": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 7L12 13\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 17.01L12.01 16.9989\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n" } }
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var Loader_1;
|
|
8
8
|
import { html, LitElement, css } from "lit";
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
|
-
import { inline } from "
|
|
11
|
-
import { fixed } from "
|
|
10
|
+
import { inline } from "@supersoniks/concorde/core/components/ui/loader/styles/inline";
|
|
11
|
+
import { fixed } from "@supersoniks/concorde/core/components/ui/loader/styles/fixed";
|
|
12
12
|
const tagName = "sonic-loader";
|
|
13
13
|
let Loader = Loader_1 = class Loader extends LitElement {
|
|
14
14
|
constructor() {
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from "lit/decorators.js";
|
|
8
|
-
import { Button } from "
|
|
8
|
+
import { Button } from "@supersoniks/concorde/core/components/ui/button/button";
|
|
9
9
|
const tagName = "sonic-menu-item";
|
|
10
10
|
let MenuItem = class MenuItem extends Button {
|
|
11
11
|
constructor() {
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { styleMap } from "lit/directives/style-map.js";
|
|
9
9
|
import { customElement, property, queryAssignedElements, state } from "lit/decorators.js";
|
|
10
|
-
import "
|
|
10
|
+
import "@supersoniks/concorde/core/components/ui/menu/menu-item";
|
|
11
11
|
const tagName = "sonic-menu";
|
|
12
12
|
let MenuItems = class MenuItems extends LitElement {
|
|
13
13
|
constructor() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-actions";
|
|
3
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-title";
|
|
4
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-subtitle";
|
|
5
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-content";
|
|
6
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-close";
|
|
7
7
|
declare type ModalCreateOptions = {
|
|
8
8
|
content?: string;
|
|
9
9
|
};
|
|
@@ -10,11 +10,11 @@ import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
|
10
10
|
import { animate, fadeIn, fadeOut } from "@lit-labs/motion";
|
|
11
11
|
import { styleMap } from "lit/directives/style-map.js";
|
|
12
12
|
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
13
|
-
import "
|
|
14
|
-
import "
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
13
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-actions";
|
|
14
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-title";
|
|
15
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-subtitle";
|
|
16
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-content";
|
|
17
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-close";
|
|
18
18
|
const tagName = "sonic-modal";
|
|
19
19
|
let Modal = class Modal extends Subscriber(LitElement) {
|
|
20
20
|
constructor() {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tr";
|
|
3
|
+
import "@supersoniks/concorde/core/components/ui/table/table-th";
|
|
4
|
+
import "@supersoniks/concorde/core/components/ui/table/table-td";
|
|
5
|
+
import "@supersoniks/concorde/core/components/ui/table/table-thead";
|
|
6
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tbody";
|
|
7
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tfoot";
|
|
8
|
+
import "@supersoniks/concorde/core/components/ui/table/table-caption";
|
|
9
9
|
export declare class Table extends LitElement {
|
|
10
10
|
static styles: import("lit").CSSResult[];
|
|
11
11
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
@@ -8,13 +8,13 @@ import { html, LitElement, css } from "lit";
|
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import { styleMap } from "lit/directives/style-map.js";
|
|
10
10
|
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
11
|
-
import "
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
14
|
-
import "
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
11
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tr";
|
|
12
|
+
import "@supersoniks/concorde/core/components/ui/table/table-th";
|
|
13
|
+
import "@supersoniks/concorde/core/components/ui/table/table-td";
|
|
14
|
+
import "@supersoniks/concorde/core/components/ui/table/table-thead";
|
|
15
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tbody";
|
|
16
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tfoot";
|
|
17
|
+
import "@supersoniks/concorde/core/components/ui/table/table-caption";
|
|
18
18
|
const tagName = "sonic-table";
|
|
19
19
|
let Table = class Table extends LitElement {
|
|
20
20
|
constructor() {
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
-
import { Button } from "
|
|
9
|
+
import { Button } from "@supersoniks/concorde/core/components/ui/button/button";
|
|
10
10
|
let Tab = class Tab extends Button {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
@@ -7,7 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, property, query } from "lit/decorators.js";
|
|
9
9
|
import { ResizeController } from "@lit-labs/observers/resize_controller.js";
|
|
10
|
-
// import { tailwind } from "../theme/theme";
|
|
11
10
|
let Tabs = class Tabs extends LitElement {
|
|
12
11
|
constructor() {
|
|
13
12
|
super(...arguments);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
+
import "@supersoniks/concorde/core/components/ui/badge/badge";
|
|
4
4
|
/**
|
|
5
5
|
* Le composant taxonomy crée un badge (*sonic-badge*) contenant une liste de termes préfixés par une icone (*sonic-icon*) optionelle séparées par une chaine html séparatrice (*separator*)
|
|
6
6
|
*/
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { css, html, LitElement, nothing } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import { repeat } from "lit/directives/repeat.js";
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
10
|
+
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
11
|
+
import "@supersoniks/concorde/core/components/ui/badge/badge";
|
|
12
12
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
13
13
|
const tagName = "sonic-taxonomy";
|
|
14
14
|
/**
|
|
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var Theme_1;
|
|
8
8
|
import { html, LitElement, css } from "lit";
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
|
-
import { coreVariables } from "
|
|
11
|
-
import { light } from "
|
|
12
|
-
import { dark } from "
|
|
10
|
+
import { coreVariables } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/core-variables";
|
|
11
|
+
import { light } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/light";
|
|
12
|
+
import { dark } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/dark";
|
|
13
13
|
const tagName = "sonic-theme";
|
|
14
14
|
let Theme = Theme_1 = class Theme extends LitElement {
|
|
15
15
|
constructor() {
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { LitElement, nothing } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
10
|
-
import { SonicToast } from "
|
|
10
|
+
import { SonicToast } from "@supersoniks/concorde/core/components/ui/toast/toast";
|
|
11
11
|
const tagName = "sonic-toast-message-subscriber";
|
|
12
12
|
//Superbe mix de multples versions d'api.
|
|
13
13
|
let MessageSubscriber = class MessageSubscriber extends Subscriber(LitElement) {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
|
-
import "
|
|
3
|
-
import { ToastStatus } from "
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/toast/types";
|
|
3
|
+
import { ToastStatus } from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
4
4
|
export declare class SonicToastItem extends LitElement {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
6
|
title: string;
|
|
7
|
+
id: string;
|
|
7
8
|
text: string;
|
|
8
9
|
status: ToastStatus;
|
|
9
10
|
ghost: boolean;
|
|
10
11
|
preserve: boolean;
|
|
12
|
+
dismissForever: boolean;
|
|
11
13
|
maxHeight: string;
|
|
12
14
|
visible: boolean;
|
|
13
15
|
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css, nothing } from "lit";
|
|
8
8
|
import { customElement, property, state } from "lit/decorators.js";
|
|
9
9
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
10
|
-
import "
|
|
10
|
+
import "@supersoniks/concorde/core/components/ui/toast/types";
|
|
11
11
|
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
12
12
|
const icon = {
|
|
13
13
|
warning: "warning-circled-outline",
|
|
@@ -20,14 +20,24 @@ let SonicToastItem = class SonicToastItem extends LitElement {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.title = "";
|
|
23
|
+
this.id = "";
|
|
23
24
|
this.text = "";
|
|
24
25
|
this.status = "";
|
|
25
26
|
this.ghost = false;
|
|
26
27
|
this.preserve = false;
|
|
28
|
+
this.dismissForever = false;
|
|
27
29
|
this.maxHeight = '10rem';
|
|
28
30
|
this.visible = true;
|
|
29
31
|
}
|
|
30
32
|
render() {
|
|
33
|
+
// check if the toast is dismissed
|
|
34
|
+
if (this.dismissForever) {
|
|
35
|
+
const dismissed = localStorage.getItem('sonic-toast-dismissed') || '{}';
|
|
36
|
+
const dismissedObj = JSON.parse(dismissed);
|
|
37
|
+
if (dismissedObj[this.id]) {
|
|
38
|
+
return nothing;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
31
41
|
if (!this.visible) {
|
|
32
42
|
return nothing;
|
|
33
43
|
}
|
|
@@ -58,6 +68,13 @@ let SonicToastItem = class SonicToastItem extends LitElement {
|
|
|
58
68
|
if (!this.closest('sonic-toast')) {
|
|
59
69
|
this.visible = false;
|
|
60
70
|
}
|
|
71
|
+
if (this.dismissForever) {
|
|
72
|
+
// set in local Storage an Object with the id as key and if it's dismissed as value
|
|
73
|
+
const dismissed = localStorage.getItem('sonic-toast-dismissed') || '{}';
|
|
74
|
+
const dismissedObj = JSON.parse(dismissed);
|
|
75
|
+
dismissedObj[this.id] = true;
|
|
76
|
+
localStorage.setItem('sonic-toast-dismissed', JSON.stringify(dismissedObj));
|
|
77
|
+
}
|
|
61
78
|
this.dispatchEvent(new CustomEvent("hide", { bubbles: true }));
|
|
62
79
|
}
|
|
63
80
|
show() {
|
|
@@ -239,6 +256,9 @@ SonicToastItem.styles = [
|
|
|
239
256
|
__decorate([
|
|
240
257
|
property({ type: String })
|
|
241
258
|
], SonicToastItem.prototype, "title", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
property({ type: String })
|
|
261
|
+
], SonicToastItem.prototype, "id", void 0);
|
|
242
262
|
__decorate([
|
|
243
263
|
property({ type: String })
|
|
244
264
|
], SonicToastItem.prototype, "text", void 0);
|
|
@@ -251,6 +271,9 @@ __decorate([
|
|
|
251
271
|
__decorate([
|
|
252
272
|
property({ type: Boolean })
|
|
253
273
|
], SonicToastItem.prototype, "preserve", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
property({ type: Boolean })
|
|
276
|
+
], SonicToastItem.prototype, "dismissForever", void 0);
|
|
254
277
|
__decorate([
|
|
255
278
|
property({ type: String })
|
|
256
279
|
], SonicToastItem.prototype, "maxHeight", void 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
-
import "
|
|
4
|
-
import { Toast } from "
|
|
3
|
+
import "@supersoniks/concorde/core/components/ui/toast/toast-item";
|
|
4
|
+
import { Toast } from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
5
5
|
export declare class SonicToast extends LitElement {
|
|
6
6
|
toasts: Toast[];
|
|
7
7
|
createRenderRoot(): this;
|
|
@@ -11,9 +11,10 @@ export declare class SonicToast extends LitElement {
|
|
|
11
11
|
id: number;
|
|
12
12
|
text: string;
|
|
13
13
|
title: string | undefined;
|
|
14
|
-
status: import("
|
|
14
|
+
status: import("@supersoniks/concorde/core/components/ui/toast/types").ToastStatus | undefined;
|
|
15
15
|
preserve: boolean | undefined;
|
|
16
16
|
ghost: boolean | undefined;
|
|
17
|
+
dismissForever: boolean | undefined;
|
|
17
18
|
} | null;
|
|
18
19
|
removeItem(item: Toast): void;
|
|
19
20
|
}
|
|
@@ -12,7 +12,7 @@ import Objects from "@supersoniks/concorde/core/utils/Objects";
|
|
|
12
12
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
13
13
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
14
14
|
import { styleMap } from "lit/directives/style-map.js";
|
|
15
|
-
import "
|
|
15
|
+
import "@supersoniks/concorde/core/components/ui/toast/toast-item";
|
|
16
16
|
const tagName = "sonic-toast";
|
|
17
17
|
let SonicToast = class SonicToast extends LitElement {
|
|
18
18
|
constructor() {
|
|
@@ -38,7 +38,11 @@ let SonicToast = class SonicToast extends LitElement {
|
|
|
38
38
|
return nothing;
|
|
39
39
|
return html `<div aria-live="polite" style=${styleMap(styles)}>
|
|
40
40
|
${repeat(this.toasts, (item) => item.id, (item) => html `
|
|
41
|
-
<sonic-toast-item maxHeight=${isIframe ? 'none' : '10rem'}
|
|
41
|
+
<sonic-toast-item maxHeight=${isIframe ? 'none' : '10rem'}
|
|
42
|
+
status=${item.status}
|
|
43
|
+
?ghost=${item.ghost}
|
|
44
|
+
?dismissForever=${item.dismissForever}
|
|
45
|
+
?preserve=${item.preserve} id=${item.id}
|
|
42
46
|
@hide=${() => this.removeItem(item)}
|
|
43
47
|
${animate({
|
|
44
48
|
keyframeOptions: {
|
|
@@ -70,6 +74,7 @@ let SonicToast = class SonicToast extends LitElement {
|
|
|
70
74
|
}
|
|
71
75
|
// ADD TOAST
|
|
72
76
|
static add(conf) {
|
|
77
|
+
var _a;
|
|
73
78
|
// Init toast area si absente (au <sonic-theme> ou <body< à défaut)
|
|
74
79
|
if (!document.querySelector("sonic-toast")) {
|
|
75
80
|
let toastComponent = document.createElement("sonic-toast");
|
|
@@ -78,7 +83,7 @@ let SonicToast = class SonicToast extends LitElement {
|
|
|
78
83
|
}
|
|
79
84
|
// Ajoute le toast à la liste
|
|
80
85
|
let toastComponent = document.querySelector("sonic-toast");
|
|
81
|
-
const nextId = new Date().valueOf();
|
|
86
|
+
const nextId = (_a = conf.id) !== null && _a !== void 0 ? _a : new Date().valueOf();
|
|
82
87
|
const interactiveRegExp = new RegExp("</a>|</button>");
|
|
83
88
|
const hasInteractive = interactiveRegExp.test(conf.text);
|
|
84
89
|
const currentToast = {
|
|
@@ -88,7 +93,16 @@ let SonicToast = class SonicToast extends LitElement {
|
|
|
88
93
|
status: conf.status,
|
|
89
94
|
preserve: hasInteractive ? true : conf.preserve,
|
|
90
95
|
ghost: conf.ghost,
|
|
96
|
+
dismissForever: conf.dismissForever,
|
|
91
97
|
};
|
|
98
|
+
// check if the toast is dismissed
|
|
99
|
+
if (conf.dismissForever && conf.id) {
|
|
100
|
+
const dismissed = localStorage.getItem('sonic-toast-dismissed') || '{}';
|
|
101
|
+
const dismissedObj = JSON.parse(dismissed);
|
|
102
|
+
if (dismissedObj[conf.id]) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
92
106
|
if (toastComponent.toasts.length > 0) {
|
|
93
107
|
let toastA = Object.assign({}, currentToast);
|
|
94
108
|
let toastB = Object.assign({}, toastComponent.toasts[toastComponent.toasts.length - 1]);
|
package/core/mixins/Fetcher.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import API from "@supersoniks/concorde/core/utils/api";
|
|
2
|
-
import "
|
|
3
|
-
import { SubscriberInterface } from "
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/button/button";
|
|
3
|
+
import { SubscriberInterface } from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
4
4
|
declare type Constructor<T> = new (...args: any[]) => T;
|
|
5
5
|
declare const Fetcher: <T extends Constructor<SubscriberInterface>>(superClass: T) => {
|
|
6
6
|
new (...args: any[]): {
|
|
@@ -60,9 +60,7 @@ declare const Fetcher: <T extends Constructor<SubscriberInterface>>(superClass:
|
|
|
60
60
|
defferedDebug: boolean | null;
|
|
61
61
|
dispatchEvent(event: Event): void;
|
|
62
62
|
setAttribute(name: string, value: string): void;
|
|
63
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
64
|
-
* IObserver est l'intersection observer qui permet de charger les données au scroll si l'attribut lazyload est renseigné
|
|
65
|
-
*/
|
|
63
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
66
64
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
67
65
|
removeAttribute(name: string): void;
|
|
68
66
|
initPublisher(): void;
|
package/core/mixins/Fetcher.js
CHANGED
|
@@ -13,12 +13,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
13
13
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
-
import { Loader } from "
|
|
17
|
-
import { SonicToast } from "
|
|
16
|
+
import { Loader } from "@supersoniks/concorde/core/components/ui/loader/loader";
|
|
17
|
+
import { SonicToast } from "@supersoniks/concorde/core/components/ui/toast/toast";
|
|
18
18
|
import API from "@supersoniks/concorde/core/utils/api";
|
|
19
|
-
import "
|
|
19
|
+
import "@supersoniks/concorde/core/components/ui/button/button";
|
|
20
20
|
import { PublisherManager } from "@supersoniks/concorde/utils";
|
|
21
|
-
import Objects from "
|
|
21
|
+
import Objects from "@supersoniks/concorde/core/utils/Objects";
|
|
22
22
|
import { property } from "lit/decorators.js";
|
|
23
23
|
const Fetcher = (superClass) => {
|
|
24
24
|
class FetcherElement extends superClass {
|