@supersoniks/concorde 1.1.43 → 1.1.44
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/concorde-core.bundle.js +18 -18
- package/concorde-core.es.js +805 -739
- 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 +25 -13
- 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 +12 -3
- package/core/components/functional/queue/queue.js +28 -22
- 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 +10 -10
- 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 +10 -9
- package/core/components/functional/sdui/sdui.js +32 -33
- 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 +8 -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/ui/_css/size.d.ts +1 -1
- package/core/components/ui/button/button.d.ts +6 -4
- package/core/components/ui/button/button.js +2 -2
- 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/select/select.d.ts +5 -4
- package/core/components/ui/form/select/select.js +8 -8
- 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 +1 -1
- 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 +1 -1
- package/core/components/ui/pop/pop.js +13 -13
- 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 +1 -1
- 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 +19 -18
- 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 +16 -31
- package/core/utils/api.js +26 -22
- package/mixins.d.ts +25 -19
- package/package.json +9 -5
- package/core/components/ui/taxonomy/taxonomy.d.ts +0 -44
- package/core/components/ui/taxonomy/taxonomy.js +0 -115
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { LitElement, nothing } from "lit";
|
|
2
|
-
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
-
import "@supersoniks/concorde/core/components/ui/badge/badge";
|
|
4
|
-
import { IconConf } from "../icon/icons";
|
|
5
|
-
declare type TaxonomyConf = Record<string, boolean | string>;
|
|
6
|
-
/**
|
|
7
|
-
* 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*)
|
|
8
|
-
*/
|
|
9
|
-
export declare class Taxonomy extends LitElement {
|
|
10
|
-
static styles: import("lit").CSSResult;
|
|
11
|
-
/**
|
|
12
|
-
* Identifiant d'icone passé en interne au composant *sonic-icon*
|
|
13
|
-
*/
|
|
14
|
-
icon: IconConf;
|
|
15
|
-
/**
|
|
16
|
-
* Tableau d'objets de la forme :{*key*_name:*"Une taxonomie"*} ou *key* correspond à la valeur fournie à la propriété *key*.
|
|
17
|
-
* Dans ce cas *"une taxonomie"* sera un des termes affiches dans le composant.
|
|
18
|
-
*/
|
|
19
|
-
taxonomy: TaxonomyConf[];
|
|
20
|
-
/**
|
|
21
|
-
* Chaque terme sera séparé par la valeur contenue dans cette propriété
|
|
22
|
-
*/
|
|
23
|
-
separator: string;
|
|
24
|
-
/**
|
|
25
|
-
* La clée utilisé pour extraire le terme de la donnée. (voir la propriété *taxonomy*)
|
|
26
|
-
*/
|
|
27
|
-
key: string;
|
|
28
|
-
/**
|
|
29
|
-
* Le type change surtout la couleur composant : voir *Badge*, *Button*
|
|
30
|
-
*/
|
|
31
|
-
type: "primary" | "warning" | "danger" | "success" | "info" | "default";
|
|
32
|
-
/**
|
|
33
|
-
* Le composant par defaut sans se paramètre à forte afordance
|
|
34
|
-
* * gost : composant super léger visuellement
|
|
35
|
-
* * outline : composant légé avec une bordure
|
|
36
|
-
*/
|
|
37
|
-
variant: "default" | "outline" | "ghost";
|
|
38
|
-
/**
|
|
39
|
-
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
40
|
-
*/
|
|
41
|
-
size: "md" | "xs" | "sm" | "lg";
|
|
42
|
-
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
43
|
-
}
|
|
44
|
-
export {};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { css, html, LitElement, nothing } from "lit";
|
|
8
|
-
import { customElement, property } from "lit/decorators.js";
|
|
9
|
-
import { repeat } from "lit/directives/repeat.js";
|
|
10
|
-
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
11
|
-
import "@supersoniks/concorde/core/components/ui/badge/badge";
|
|
12
|
-
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
13
|
-
import { ifDefined } from "lit/directives/if-defined.js";
|
|
14
|
-
const tagName = "sonic-taxonomy";
|
|
15
|
-
/**
|
|
16
|
-
* 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*)
|
|
17
|
-
*/
|
|
18
|
-
let Taxonomy = class Taxonomy extends LitElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
/**
|
|
22
|
-
* Identifiant d'icone passé en interne au composant *sonic-icon*
|
|
23
|
-
*/
|
|
24
|
-
this.icon = { name: "" };
|
|
25
|
-
/**
|
|
26
|
-
* Tableau d'objets de la forme :{*key*_name:*"Une taxonomie"*} ou *key* correspond à la valeur fournie à la propriété *key*.
|
|
27
|
-
* Dans ce cas *"une taxonomie"* sera un des termes affiches dans le composant.
|
|
28
|
-
*/
|
|
29
|
-
this.taxonomy = [];
|
|
30
|
-
/**
|
|
31
|
-
* Chaque terme sera séparé par la valeur contenue dans cette propriété
|
|
32
|
-
*/
|
|
33
|
-
this.separator = ", ";
|
|
34
|
-
/**
|
|
35
|
-
* La clée utilisé pour extraire le terme de la donnée. (voir la propriété *taxonomy*)
|
|
36
|
-
*/
|
|
37
|
-
this.key = "";
|
|
38
|
-
/**
|
|
39
|
-
* Le type change surtout la couleur composant : voir *Badge*, *Button*
|
|
40
|
-
*/
|
|
41
|
-
this.type = "default";
|
|
42
|
-
/**
|
|
43
|
-
* Le composant par defaut sans se paramètre à forte afordance
|
|
44
|
-
* * gost : composant super léger visuellement
|
|
45
|
-
* * outline : composant légé avec une bordure
|
|
46
|
-
*/
|
|
47
|
-
this.variant = "default";
|
|
48
|
-
/**
|
|
49
|
-
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
50
|
-
*/
|
|
51
|
-
this.size = "md";
|
|
52
|
-
}
|
|
53
|
-
render() {
|
|
54
|
-
if (!Array.isArray(this.taxonomy))
|
|
55
|
-
return nothing;
|
|
56
|
-
let key = this.key + "_display";
|
|
57
|
-
let taxo = this.taxonomy.filter((elt) => elt != null && (elt[key] === true || elt[key] == "1" || !elt.hasOwnProperty(key)));
|
|
58
|
-
if (taxo.length === 0) {
|
|
59
|
-
this.style.display = "none";
|
|
60
|
-
return nothing;
|
|
61
|
-
}
|
|
62
|
-
this.style.removeProperty("display");
|
|
63
|
-
return html `
|
|
64
|
-
<sonic-badge type=${this.type} variant=${this.variant} size=${this.size}>
|
|
65
|
-
<sonic-icon
|
|
66
|
-
slot="prefix"
|
|
67
|
-
library=${ifDefined(this.icon.library)}
|
|
68
|
-
prefix=${ifDefined(this.icon.prefix)}
|
|
69
|
-
name=${ifDefined(this.icon.name)}
|
|
70
|
-
></sonic-icon>
|
|
71
|
-
<span class="taxonomy-list">
|
|
72
|
-
${repeat(taxo, (item) => item[this.key + "_id"], (item) => {
|
|
73
|
-
return html `<span> ${item[this.key + "_name"] || item["name"]}</span
|
|
74
|
-
><span class="sonic-taxonomy-separator">${unsafeHTML(this.separator)}</span>`;
|
|
75
|
-
})}
|
|
76
|
-
</span>
|
|
77
|
-
</sonic-badge>
|
|
78
|
-
`;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
Taxonomy.styles = css `
|
|
82
|
-
:host .sonic-taxonomy-separator:last-child {
|
|
83
|
-
display: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.taxonomy-list {
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-wrap: wrap;
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
91
|
-
__decorate([
|
|
92
|
-
property({ type: Object })
|
|
93
|
-
], Taxonomy.prototype, "icon", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
property({ type: Array })
|
|
96
|
-
], Taxonomy.prototype, "taxonomy", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
property({ type: String })
|
|
99
|
-
], Taxonomy.prototype, "separator", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
property({ type: String })
|
|
102
|
-
], Taxonomy.prototype, "key", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
property({ type: String, reflect: true })
|
|
105
|
-
], Taxonomy.prototype, "type", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
property({ type: String, reflect: true })
|
|
108
|
-
], Taxonomy.prototype, "variant", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
property({ type: String, reflect: true })
|
|
111
|
-
], Taxonomy.prototype, "size", void 0);
|
|
112
|
-
Taxonomy = __decorate([
|
|
113
|
-
customElement(tagName)
|
|
114
|
-
], Taxonomy);
|
|
115
|
-
export { Taxonomy };
|