@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
|
@@ -40,14 +40,15 @@ let SonicStates = class SonicStates extends Subscriber(TemplatesContainer(LitEle
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
connectedCallback() {
|
|
43
|
+
this.noShadowDom = "";
|
|
43
44
|
super.connectedCallback();
|
|
44
45
|
if (this.hasAttribute("data-path")) {
|
|
45
46
|
this.statePath = this.getAttribute("data-path");
|
|
46
47
|
}
|
|
47
48
|
if (this.statePath) {
|
|
48
49
|
this.statePublisher = this.publisher;
|
|
49
|
-
|
|
50
|
-
for (
|
|
50
|
+
const split = this.statePath.split(".");
|
|
51
|
+
for (const s of split) {
|
|
51
52
|
this.statePublisher = this.statePublisher[s];
|
|
52
53
|
}
|
|
53
54
|
this.statePublisher.onAssign(this.onAssign);
|
|
@@ -60,12 +61,12 @@ let SonicStates = class SonicStates extends Subscriber(TemplatesContainer(LitEle
|
|
|
60
61
|
super.disconnectedCallback();
|
|
61
62
|
}
|
|
62
63
|
render() {
|
|
63
|
-
|
|
64
|
+
const templates = [];
|
|
64
65
|
let state = this.state;
|
|
65
66
|
if ((!Array.isArray(state) && Objects.isObject(state)) || state === undefined) {
|
|
66
67
|
state = "";
|
|
67
68
|
}
|
|
68
|
-
for (
|
|
69
|
+
for (const t of this.templatePartsList) {
|
|
69
70
|
let path = t.getAttribute(this.templateValueAttribute);
|
|
70
71
|
let stateToMatch = state;
|
|
71
72
|
if (this.inverted) {
|
|
@@ -74,13 +75,13 @@ let SonicStates = class SonicStates extends Subscriber(TemplatesContainer(LitEle
|
|
|
74
75
|
}
|
|
75
76
|
if (path == "")
|
|
76
77
|
path = this.inverted ? ".*?" : "^$";
|
|
77
|
-
|
|
78
|
+
const regexp = new RegExp(path);
|
|
78
79
|
if (regexp.test(stateToMatch)) {
|
|
79
80
|
templates.push(t);
|
|
80
81
|
t.removeAttribute("mode");
|
|
81
82
|
}
|
|
82
83
|
else {
|
|
83
|
-
|
|
84
|
+
const urlPattern = new UrlPattern(path);
|
|
84
85
|
if (urlPattern.names.length > 0 && urlPattern.match(stateToMatch)) {
|
|
85
86
|
t.setAttribute("mode", "patternMatching");
|
|
86
87
|
templates.push(t);
|
|
@@ -95,7 +96,7 @@ let SonicStates = class SonicStates extends Subscriber(TemplatesContainer(LitEle
|
|
|
95
96
|
if (template.title)
|
|
96
97
|
document.title = template.title;
|
|
97
98
|
if (template.hasAttribute("dataProviderExpression")) {
|
|
98
|
-
|
|
99
|
+
const dataProviderExpression = template.getAttribute("dataProviderExpression");
|
|
99
100
|
let dataProvider = "";
|
|
100
101
|
let stateToMatch = state;
|
|
101
102
|
let path = template.getAttribute(this.templateValueAttribute);
|
|
@@ -112,7 +113,7 @@ let SonicStates = class SonicStates extends Subscriber(TemplatesContainer(LitEle
|
|
|
112
113
|
}
|
|
113
114
|
else {
|
|
114
115
|
const regexp = new RegExp(path);
|
|
115
|
-
|
|
116
|
+
const match = (stateToMatch + "").match(regexp);
|
|
116
117
|
if (match) {
|
|
117
118
|
dataProvider = (_a = match.shift()) === null || _a === void 0 ? void 0 : _a.replace(regexp, dataProviderExpression);
|
|
118
119
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@supersoniks/concorde/core/components/ui/button/button";
|
|
2
2
|
import API from "@supersoniks/concorde/core/utils/api";
|
|
3
3
|
import { LitElement } from "lit";
|
|
4
|
-
declare const Submit_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<
|
|
4
|
+
declare const Submit_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("@supersoniks/concorde/core/_types/types").CoreJSType>) & typeof LitElement;
|
|
5
5
|
/**
|
|
6
6
|
* ###L'élément submit permet d'envoyer des données en rest
|
|
7
7
|
* * Les données envoyées sont celles présentes dans le publisher dont l'adresse est renseignée via l'attribut *formDataProvider*.
|
|
@@ -62,7 +62,7 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
62
62
|
if (!form)
|
|
63
63
|
return;
|
|
64
64
|
const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
|
|
65
|
-
|
|
65
|
+
const formData = PublisherManager.get(formDataProvider).get();
|
|
66
66
|
for (const name in formData) {
|
|
67
67
|
if (name == "isFormValid")
|
|
68
68
|
continue;
|
|
@@ -84,7 +84,7 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
84
84
|
control.value = value;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
const submitButton = document.createElement("input");
|
|
88
88
|
submitButton.name = this.name;
|
|
89
89
|
submitButton.style.display = "none";
|
|
90
90
|
submitButton.value = this.value;
|
|
@@ -107,16 +107,16 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
107
107
|
this.publisher.disabled = true;
|
|
108
108
|
formPublisher.isFormValid;
|
|
109
109
|
// support native html form
|
|
110
|
-
|
|
110
|
+
const native = this.hasAttribute("native");
|
|
111
111
|
if (native) {
|
|
112
112
|
this.submitNativeForm();
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
//
|
|
116
116
|
//Recup données
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
const method = ((_a = this.getAttribute("method")) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) || "post";
|
|
118
|
+
const sendAsFormData = this.hasAttribute("sendAsFormData");
|
|
119
|
+
const formData = formPublisher.get();
|
|
120
120
|
delete formData.isFormValid;
|
|
121
121
|
const headesDataProvider = this.getAncestorAttributeValue("headersDataProvider");
|
|
122
122
|
const headerPublisher = headesDataProvider ? PublisherManager.getInstance().get(headesDataProvider) : null;
|
|
@@ -124,10 +124,10 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
124
124
|
if (headerPublisher)
|
|
125
125
|
headerData = headerPublisher.get();
|
|
126
126
|
let result = null;
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
const dataProvider = this.getAncestorAttributeValue("dataProvider");
|
|
128
|
+
const endPoint = this.endPoint || dataProvider;
|
|
129
129
|
Loader.show();
|
|
130
|
-
|
|
130
|
+
const sendData = () => __awaiter(this, void 0, void 0, function* () {
|
|
131
131
|
var _d, _e, _f, _g, _h, _j, _k;
|
|
132
132
|
//
|
|
133
133
|
//envoi données
|
|
@@ -156,25 +156,25 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
156
156
|
// Si result ne contient que la réponse HTTP, avec un status not ok, on ajoute un message
|
|
157
157
|
else if (result._sonic_http_response_ && !result._sonic_http_response_.ok && Object.keys(result).length === 1)
|
|
158
158
|
result.messages = [{ content: "Network Error", status: "error" }];
|
|
159
|
-
|
|
159
|
+
const clearedDataProvider = this.getAncestorAttributeValue("clearedDataOnSuccess");
|
|
160
160
|
if (clearedDataProvider) {
|
|
161
161
|
clearedDataProvider.split(" ").forEach((dataProvider) => PublisherManager.get(dataProvider).set({}));
|
|
162
162
|
}
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
const username_key = this.hasAttribute("usernameKey") ? this.getAttribute("usernameKey") : "username";
|
|
164
|
+
const password_key = this.hasAttribute("passwordKey") ? this.getAttribute("passwordKey") : "password";
|
|
165
165
|
if (((_k = (_j = this.api) === null || _j === void 0 ? void 0 : _j.lastResult) === null || _k === void 0 ? void 0 : _k.ok) && formData[username_key] && formData[password_key]) {
|
|
166
166
|
this.saveCredentials(formData[username_key], formData[password_key]);
|
|
167
167
|
}
|
|
168
168
|
if (this.submitResultKey) {
|
|
169
169
|
result = Objects.traverse(result, this.submitResultKey.split("."), true);
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
const submitResultDataProvider = this.getAncestorAttributeValue("submitResultDataProvider");
|
|
172
172
|
if (submitResultDataProvider)
|
|
173
173
|
PublisherManager.get(submitResultDataProvider).set(result);
|
|
174
174
|
if (this.publisher)
|
|
175
175
|
this.publisher.disabled = null;
|
|
176
176
|
});
|
|
177
|
-
|
|
177
|
+
const captchaPublisher = (headerPublisher === null || headerPublisher === void 0 ? void 0 : headerPublisher.needsCaptchaValidation.get())
|
|
178
178
|
? headerPublisher
|
|
179
179
|
: formPublisher.needsCaptchaValidation.get()
|
|
180
180
|
? formPublisher
|
|
@@ -184,7 +184,7 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
184
184
|
captchaPublisher.captchaAction =
|
|
185
185
|
(_c = (_b = dataProvider === null || dataProvider === void 0 ? void 0 : dataProvider.split("?")[0]) !== null && _b !== void 0 ? _b : this.getAncestorAttributeValue("formDataProvider")) !== null && _c !== void 0 ? _c : "submit";
|
|
186
186
|
captchaPublisher.captchaToken = "request_token";
|
|
187
|
-
|
|
187
|
+
const captchaAssign = (token) => {
|
|
188
188
|
if (token != "request_token") {
|
|
189
189
|
sendData();
|
|
190
190
|
// Après l'envoie des données, on supprime ce onAssign.
|
|
@@ -203,7 +203,7 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
203
203
|
return __awaiter(this, void 0, void 0, function* () {
|
|
204
204
|
// Check if the browser supports password credentials (and the Credential Management API)
|
|
205
205
|
if ("PasswordCredential" in window) {
|
|
206
|
-
|
|
206
|
+
const credential = new window.PasswordCredential({
|
|
207
207
|
id: username,
|
|
208
208
|
// name: "Carina Anand", // In case of a login, the name comes from the server.
|
|
209
209
|
password: password,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
|
-
declare const SonicSubscriber_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<
|
|
2
|
+
declare const SonicSubscriber_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* Voir la partie dédiée dans *MISCALLENOUS*
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare const SonicValue_base: (new (...args: any[]) => import("../../../mixins/Subscriber").SubscriberInterface<
|
|
2
|
+
declare const SonicValue_base: (new (...args: any[]) => import("../../../mixins/Subscriber").SubscriberInterface<import("../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
3
3
|
export declare class SonicValue extends SonicValue_base {
|
|
4
4
|
connectedCallback(): void;
|
|
5
5
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -15,9 +15,10 @@ let SonicValue = class SonicValue extends Subscriber(LitElement) {
|
|
|
15
15
|
super.connectedCallback();
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
if (typeof this.props
|
|
18
|
+
if (typeof this.props === "object" || this.props === undefined)
|
|
19
19
|
return html `<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
|
|
20
|
-
return html `${unsafeHTML(this.props)}<slot name="prefix"></slot><slot></slot
|
|
20
|
+
return html `${unsafeHTML(this.props.toString())}<slot name="prefix"></slot><slot></slot
|
|
21
|
+
><slot name="suffix"></slot>`;
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
24
|
SonicValue = __decorate([
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Size = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
2
2
|
export declare const fontSize: import("lit").CSSResult;
|
|
@@ -34,9 +34,11 @@ declare const Button_base: {
|
|
|
34
34
|
ariaLabel?: string | undefined;
|
|
35
35
|
_name: string;
|
|
36
36
|
name: string;
|
|
37
|
-
props:
|
|
38
|
-
propertyMap:
|
|
37
|
+
props: import("../../../_types/types").CoreJSType;
|
|
38
|
+
propertyMap: object;
|
|
39
39
|
isConnected: boolean;
|
|
40
|
+
children: HTMLCollection;
|
|
41
|
+
appendChild(node: Node): Node;
|
|
40
42
|
getAncestorAttributeValue(attributeName: string): string;
|
|
41
43
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
42
44
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
@@ -55,9 +57,9 @@ declare const Button_base: {
|
|
|
55
57
|
getApiConfiguration(): import("../../../utils/api").APIConfiguration;
|
|
56
58
|
requestUpdate(): void;
|
|
57
59
|
getAttribute(name: string): string;
|
|
58
|
-
hasAttribute(attributeName:
|
|
60
|
+
hasAttribute(attributeName: string): boolean;
|
|
59
61
|
};
|
|
60
|
-
} & (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;
|
|
61
63
|
/**
|
|
62
64
|
* Un bouton simple avec deux slots, un nommé préfix et un nomé suffix de manière à pouvoir mettre (par exemple) une icone avant ou après le contenu.
|
|
63
65
|
* * L'objet et ses slot sont en display flex avec direction / alignement et justifications configurables
|
|
@@ -102,7 +102,7 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
102
102
|
LocationHandler.changeFromComponent(this);
|
|
103
103
|
}
|
|
104
104
|
handleChange(e) {
|
|
105
|
-
super.handleChange(
|
|
105
|
+
super.handleChange();
|
|
106
106
|
if (this.pushState || this.goBack !== null) {
|
|
107
107
|
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
108
108
|
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
@@ -113,7 +113,7 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
113
113
|
* On on veut pouvoir rest un autre form que celui qui contient le bouton
|
|
114
114
|
*/
|
|
115
115
|
const resetDataProvider = this.getAttribute("reset");
|
|
116
|
-
|
|
116
|
+
const formPublisher = resetDataProvider ? PublisherManager.get(resetDataProvider) : this.getFormPublisher();
|
|
117
117
|
if (formPublisher)
|
|
118
118
|
formPublisher.set({});
|
|
119
119
|
}
|
|
@@ -198,14 +198,14 @@ Button.styles = [
|
|
|
198
198
|
--sc-btn-ff: var(--sc-btn-font-family);
|
|
199
199
|
|
|
200
200
|
--sc-btn-height: var(--sc-form-height);
|
|
201
|
-
--sc-btn-color
|
|
202
|
-
--sc-btn-bg
|
|
201
|
+
--btn-color: var(--sc-btn-color, var(--sc-base-content));
|
|
202
|
+
--btn-bg: var(--sc-btn-bg, var(--sc-base-100));
|
|
203
203
|
|
|
204
204
|
--sc-btn-border-style: solid;
|
|
205
|
-
--sc-btn-border-
|
|
205
|
+
--sc-btn-border-width: var(--sc-form-border-width);
|
|
206
206
|
--sc-btn-border-color: transparent;
|
|
207
207
|
|
|
208
|
-
--sc-btn-outline-bg-hover
|
|
208
|
+
--btn-outline-bg-hover: var(--sc-btn-outline-bg-hover, var(--sc-base-100));
|
|
209
209
|
--sc-btn-ghost-bg-hover: var(--sc-base-100);
|
|
210
210
|
|
|
211
211
|
--sc-btn-active-color: var(--sc-base);
|
|
@@ -246,15 +246,15 @@ Button.styles = [
|
|
|
246
246
|
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br)
|
|
247
247
|
var(--sc-item-rounded-bl);
|
|
248
248
|
|
|
249
|
-
background: var(--
|
|
250
|
-
color: var(--
|
|
249
|
+
background: var(--btn-bg);
|
|
250
|
+
color: var(--btn-color);
|
|
251
251
|
|
|
252
252
|
padding-top: var(--sc-btn-py);
|
|
253
253
|
padding-bottom: var(--sc-btn-py);
|
|
254
254
|
padding-left: var(--sc-btn-px);
|
|
255
255
|
padding-right: var(--sc-btn-px);
|
|
256
256
|
|
|
257
|
-
border: var(--sc-btn-border-
|
|
257
|
+
border: var(--sc-btn-border-width) var(--sc-btn-border-style) var(--sc-btn-border-color);
|
|
258
258
|
min-height: var(--sc-btn-height);
|
|
259
259
|
}
|
|
260
260
|
|
|
@@ -273,33 +273,37 @@ Button.styles = [
|
|
|
273
273
|
|
|
274
274
|
/*TYPES*/
|
|
275
275
|
:host([type="default"]) button {
|
|
276
|
-
--
|
|
277
|
-
--
|
|
276
|
+
--btn-color: var(--sc-base-content);
|
|
277
|
+
--btn-bg: var(--sc-base-100);
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
:host([type="primary"]) button {
|
|
281
|
-
--
|
|
282
|
-
--
|
|
281
|
+
--btn-color: var(--sc-primary-content);
|
|
282
|
+
--btn-bg: var(--sc-primary);
|
|
283
283
|
}
|
|
284
284
|
:host([type="warning"]) button {
|
|
285
|
-
--
|
|
286
|
-
--
|
|
285
|
+
--btn-color: var(--sc-warning-content);
|
|
286
|
+
--btn-bg: var(--sc-warning);
|
|
287
287
|
}
|
|
288
288
|
:host([type="danger"]) button {
|
|
289
|
-
--
|
|
290
|
-
--
|
|
289
|
+
--btn-color: var(--sc-danger-content);
|
|
290
|
+
--btn-bg: var(--sc-danger);
|
|
291
291
|
}
|
|
292
292
|
:host([type="info"]) button {
|
|
293
|
-
--
|
|
294
|
-
--
|
|
293
|
+
--btn-color: var(--sc-info-content);
|
|
294
|
+
--btn-bg: var(--sc-info);
|
|
295
295
|
}
|
|
296
296
|
:host([type="success"]) button {
|
|
297
|
-
--
|
|
298
|
-
--
|
|
297
|
+
--btn-color: var(--sc-success-content);
|
|
298
|
+
--btn-bg: var(--sc-success);
|
|
299
299
|
}
|
|
300
300
|
:host([type="neutral"]) button {
|
|
301
|
-
--
|
|
302
|
-
--
|
|
301
|
+
--btn-color: var(--sc-base);
|
|
302
|
+
--btn-bg: var(--sc-base-600);
|
|
303
|
+
}
|
|
304
|
+
:host([type="custom"]) button {
|
|
305
|
+
--btn-color: var(--sc-btn-custom-color);
|
|
306
|
+
--btn-bg: var(--sc-btn-custom-bg);
|
|
303
307
|
}
|
|
304
308
|
|
|
305
309
|
/*UNSTYLED*/
|
|
@@ -324,12 +328,12 @@ Button.styles = [
|
|
|
324
328
|
|
|
325
329
|
/*GHOST*/
|
|
326
330
|
:host([variant="ghost"][type]) button {
|
|
327
|
-
color: var(--
|
|
331
|
+
color: var(--btn-bg);
|
|
328
332
|
background: transparent;
|
|
329
333
|
}
|
|
330
334
|
|
|
331
335
|
:host([variant="ghost"][type="default"]) button {
|
|
332
|
-
color: var(--
|
|
336
|
+
color: var(--btn-color);
|
|
333
337
|
background: transparent;
|
|
334
338
|
}
|
|
335
339
|
|
|
@@ -350,8 +354,8 @@ Button.styles = [
|
|
|
350
354
|
|
|
351
355
|
/*OUTLINE*/
|
|
352
356
|
:host([variant="outline"][type]) button {
|
|
353
|
-
border-color: var(--
|
|
354
|
-
color: var(--
|
|
357
|
+
border-color: var(--btn-bg);
|
|
358
|
+
color: var(--btn-bg);
|
|
355
359
|
background: transparent;
|
|
356
360
|
}
|
|
357
361
|
|
|
@@ -363,7 +367,7 @@ Button.styles = [
|
|
|
363
367
|
|
|
364
368
|
/*:host([variant="outline"]) button:focus,*/
|
|
365
369
|
:host([variant="outline"]) button:hover {
|
|
366
|
-
background: var(--
|
|
370
|
+
background: var(--btn-outline-bg-hover);
|
|
367
371
|
}
|
|
368
372
|
|
|
369
373
|
/*OUTLINE*/
|
|
@@ -388,7 +392,7 @@ Button.styles = [
|
|
|
388
392
|
}
|
|
389
393
|
|
|
390
394
|
:host([variant="link"][type]) button {
|
|
391
|
-
color: var(--
|
|
395
|
+
color: var(--btn-bg);
|
|
392
396
|
}
|
|
393
397
|
:host([variant="link"][type="default"]) button {
|
|
394
398
|
color: inherit;
|
|
@@ -408,7 +412,7 @@ Button.styles = [
|
|
|
408
412
|
:host([shape="square"]) button {
|
|
409
413
|
width: var(--sc-btn-height);
|
|
410
414
|
height: var(--sc-btn-height);
|
|
411
|
-
overflow: hidden
|
|
415
|
+
/*overflow: hidden;*/ /* fix bug #42622 */
|
|
412
416
|
padding: 0;
|
|
413
417
|
align-items: center;
|
|
414
418
|
justify-content: 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
|
|
2
|
+
type AssignListener = {
|
|
3
3
|
onAssign: (listener: (value: string) => void) => void;
|
|
4
4
|
};
|
|
5
|
-
declare const Captcha_base: (new (...args: any[]) => import("../../../mixins/Subscriber").SubscriberInterface<
|
|
5
|
+
declare const Captcha_base: (new (...args: any[]) => import("../../../mixins/Subscriber").SubscriberInterface<import("@supersoniks/concorde/core/_types/types").CoreJSType>) & typeof LitElement;
|
|
6
6
|
/**
|
|
7
7
|
* Un bouton simple avec deux slots, un nommé préfix et un nomé suffix de manière à pouvoir mettre (par exemple) une icone avant ou après le contenu.
|
|
8
8
|
* * L'objet et ses slot sont en display flex avec direction / alignement et justifications configurables
|
|
@@ -43,8 +43,8 @@ let Captcha = class Captcha extends Subscriber(LitElement) {
|
|
|
43
43
|
return;
|
|
44
44
|
// On récupère l'action liée au recaptcha,
|
|
45
45
|
// et on vérifie qu'il ne contienne que des caractères alpha-numériques, underscore et slash
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const action = ((_c = (_a = this.action) !== null && _a !== void 0 ? _a : (_b = this.formPublisher.captchaAction) === null || _b === void 0 ? void 0 : _b.get()) !== null && _c !== void 0 ? _c : "submit").replace(/[^\w_/]/g, "_");
|
|
47
|
+
const method = ((_e = (_d = this.formPublisher.captchaMethod) === null || _d === void 0 ? void 0 : _d.get()) !== null && _e !== void 0 ? _e : "POST").toUpperCase();
|
|
48
48
|
delete this.formPublisher.captchaAction;
|
|
49
49
|
delete this.formPublisher.captchaMethod;
|
|
50
50
|
window.grecaptcha.ready(() => {
|
|
@@ -35,7 +35,11 @@ CardHeader.styles = [
|
|
|
35
35
|
--sc-card-header-family: var(--sc-headings-font-family);
|
|
36
36
|
--sc-card-header-line-height: var(--sc-headings-line-height);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
@media print {
|
|
39
|
+
:host {
|
|
40
|
+
--sc-card-header-font-size: 1.45rem;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
39
43
|
.header {
|
|
40
44
|
display: flex;
|
|
41
45
|
align-items: flex-start;
|
|
@@ -28,6 +28,9 @@ let Card = class Card extends LitElement {
|
|
|
28
28
|
};
|
|
29
29
|
Card.styles = [
|
|
30
30
|
css `
|
|
31
|
+
* {
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
}
|
|
31
34
|
:host {
|
|
32
35
|
--sc-card-padding: 1.5rem;
|
|
33
36
|
--sc-card-color: var(--sc-base-content);
|
|
@@ -38,15 +41,14 @@ Card.styles = [
|
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
@media print {
|
|
41
|
-
|
|
44
|
+
.card {
|
|
45
|
+
page-break-inside: avoid;
|
|
42
46
|
break-inside: avoid;
|
|
47
|
+
box-shadow: none !important;
|
|
48
|
+
border: 1px solid var(--sc-base-200);
|
|
43
49
|
}
|
|
44
50
|
}
|
|
45
51
|
|
|
46
|
-
* {
|
|
47
|
-
box-sizing: border-box;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
52
|
.card {
|
|
51
53
|
padding: var(--sc-card-padding);
|
|
52
54
|
background-color: var(--sc-card-bg);
|
|
@@ -35,9 +35,11 @@ declare const Checkbox_base: {
|
|
|
35
35
|
ariaLabel?: string | undefined;
|
|
36
36
|
_name: string;
|
|
37
37
|
name: string;
|
|
38
|
-
props:
|
|
39
|
-
propertyMap:
|
|
38
|
+
props: import("../../../../_types/types").CoreJSType;
|
|
39
|
+
propertyMap: object;
|
|
40
40
|
isConnected: boolean;
|
|
41
|
+
children: HTMLCollection;
|
|
42
|
+
appendChild(node: Node): Node;
|
|
41
43
|
getAncestorAttributeValue(attributeName: string): string;
|
|
42
44
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
43
45
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
@@ -56,14 +58,14 @@ declare const Checkbox_base: {
|
|
|
56
58
|
getApiConfiguration(): import("../../../../utils/api").APIConfiguration;
|
|
57
59
|
requestUpdate(): void;
|
|
58
60
|
getAttribute(name: string): string;
|
|
59
|
-
hasAttribute(attributeName:
|
|
61
|
+
hasAttribute(attributeName: string): boolean;
|
|
60
62
|
};
|
|
61
63
|
} & {
|
|
62
64
|
new (...args: any[]): {
|
|
63
65
|
validateFormElement(): void;
|
|
64
66
|
forceAutoFill: boolean;
|
|
65
|
-
_type: "number" | "search" | "file" | "button" | "
|
|
66
|
-
type: "number" | "search" | "file" | "button" | "
|
|
67
|
+
_type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
|
|
68
|
+
type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
|
|
67
69
|
_description?: string | undefined;
|
|
68
70
|
description: string | undefined;
|
|
69
71
|
_label?: string | undefined;
|
|
@@ -74,7 +76,27 @@ declare const Checkbox_base: {
|
|
|
74
76
|
updateDataValue(): void;
|
|
75
77
|
handleChange(e?: Event | undefined): void;
|
|
76
78
|
handleBlur(e?: Event | undefined): void;
|
|
77
|
-
|
|
79
|
+
/**
|
|
80
|
+
* ### Le composent sonic-checkbox étend les mixins FormCheckable, FormInput, FormElement et Subscriber
|
|
81
|
+
* **FormElement :**
|
|
82
|
+
* * 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é.
|
|
83
|
+
* * Par défault lorsque modifie l'input, la valeur est également mise à jour via le même dataprovider
|
|
84
|
+
* * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
|
|
85
|
+
* * Par conséquent on peut par exemple le lier à un composant *queue* (via sa propriété *dataFilterProvider*) de manière à appeller en auto une api avec des filtres.
|
|
86
|
+
* * **FormInput **
|
|
87
|
+
* Uniquement des propriétés classiques d'un input HTML. La prise en compte est ici partielle, par exemple les propriétés *placeholder*, *readonly*, *pattern*, *min* et *max* n'ont pas de sens pour un checkbox.
|
|
88
|
+
* **FormCheckable :**
|
|
89
|
+
* * La propriété checked mise à true si la valeur de la propriété du même nom dans les données du dataprovider associé contient un propriété checked.
|
|
90
|
+
* **Comportements :**
|
|
91
|
+
* * multiple (par défaut):
|
|
92
|
+
* - on peut cocher plusieurs checkbox ayant le même *name*.
|
|
93
|
+
* - la valeur enregistrée dans la propriété nommé du même nom dans formDataProvider est un tableau avec les *value* des cases cochées ayant le même *name*.
|
|
94
|
+
* * unique (Ajouter l'attribute unique au composant a l'intégration):
|
|
95
|
+
* - on ne peut cocher qu'une seule checkbox ayant le même *name*.
|
|
96
|
+
* * radio (Ajouter l'attribute radio au composant a l'intégration):
|
|
97
|
+
* Comme unique, mais on ne peut pas décocher la case sauf en en cochant une autre, comme un bouton radio.
|
|
98
|
+
*/
|
|
99
|
+
getValueForFormPublisher(): string | object | string[] | null | undefined;
|
|
78
100
|
focus?: (() => void) | undefined;
|
|
79
101
|
shadowRoot?: ShadowRoot | undefined;
|
|
80
102
|
error: boolean;
|
|
@@ -84,13 +106,15 @@ declare const Checkbox_base: {
|
|
|
84
106
|
formDataProvider: string;
|
|
85
107
|
ariaLabelledby?: string | undefined;
|
|
86
108
|
ariaLabel?: string | undefined;
|
|
87
|
-
_value: string | null;
|
|
88
|
-
value: string | null;
|
|
109
|
+
_value: string | object | string[] | null | undefined;
|
|
110
|
+
value: string | object | string[] | null | undefined;
|
|
89
111
|
_name: string;
|
|
90
112
|
name: string;
|
|
91
|
-
props:
|
|
92
|
-
propertyMap:
|
|
113
|
+
props: import("../../../../_types/types").CoreJSType;
|
|
114
|
+
propertyMap: object;
|
|
93
115
|
isConnected: boolean;
|
|
116
|
+
children: HTMLCollection;
|
|
117
|
+
appendChild(node: Node): Node;
|
|
94
118
|
getAncestorAttributeValue(attributeName: string): string;
|
|
95
119
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
96
120
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
@@ -110,10 +134,10 @@ declare const Checkbox_base: {
|
|
|
110
134
|
connectedCallback(): void;
|
|
111
135
|
requestUpdate(): void;
|
|
112
136
|
getAttribute(name: string): string;
|
|
113
|
-
hasAttribute(attributeName:
|
|
137
|
+
hasAttribute(attributeName: string): boolean;
|
|
114
138
|
disconnectedCallback(): void;
|
|
115
139
|
};
|
|
116
|
-
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<
|
|
140
|
+
} & (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;
|
|
117
141
|
/**
|
|
118
142
|
* ### Le composent sonic-checkbox étend les mixins FormCheckable, FormInput, FormElement et Subscriber
|
|
119
143
|
* **FormElement :**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import "./legend";
|
|
3
|
-
declare const Fieldset_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<
|
|
3
|
+
declare const Fieldset_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
4
4
|
export declare class Fieldset extends Fieldset_base {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { ResizeController } from "@lit-labs/observers/resize_controller.js";
|
|
3
|
-
declare const FormLayout_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<
|
|
3
|
+
declare const FormLayout_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
4
4
|
export declare class FormLayout extends FormLayout_base {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
6
|
_resizeController: ResizeController<unknown>;
|