@supersoniks/concorde 1.1.31 → 1.1.35
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 +0 -0
- package/cli.js +0 -0
- package/components.d.ts +0 -0
- package/components.js +0 -0
- package/concorde-core.bundle.js +102 -115
- package/concorde-core.es.js +7589 -55
- package/core/components/functional/configuration/configuration.d.ts +0 -0
- package/core/components/functional/configuration/configuration.js +0 -0
- package/core/components/functional/date/date.d.ts +0 -0
- package/core/components/functional/date/date.js +0 -0
- package/core/components/functional/example/example.d.ts +0 -0
- package/core/components/functional/example/example.js +0 -0
- package/core/components/functional/fetch/fetch.d.ts +0 -0
- package/core/components/functional/fetch/fetch.js +0 -0
- package/core/components/functional/functional.d.ts +0 -0
- package/core/components/functional/functional.js +0 -0
- package/core/components/functional/if/if.d.ts +0 -0
- package/core/components/functional/if/if.js +0 -0
- package/core/components/functional/list/list.d.ts +0 -0
- package/core/components/functional/list/list.js +0 -0
- package/core/components/functional/queue/queue.d.ts +4 -1
- package/core/components/functional/queue/queue.js +16 -3
- package/core/components/functional/router/redirect.d.ts +0 -0
- package/core/components/functional/router/redirect.js +0 -0
- package/core/components/functional/router/router.d.ts +0 -0
- package/core/components/functional/router/router.js +0 -0
- package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -0
- package/core/components/functional/sonic-scope/sonic-scope.js +0 -0
- package/core/components/functional/states/states.d.ts +0 -0
- package/core/components/functional/states/states.js +0 -0
- package/core/components/functional/submit/submit.d.ts +0 -0
- package/core/components/functional/submit/submit.js +35 -21
- package/core/components/functional/subscriber/subscriber.d.ts +0 -0
- package/core/components/functional/subscriber/subscriber.js +0 -0
- package/core/components/ui/_css/scroll.d.ts +0 -0
- package/core/components/ui/_css/scroll.js +0 -0
- package/core/components/ui/_css/size.d.ts +0 -0
- package/core/components/ui/_css/size.js +0 -0
- package/core/components/ui/_css/type.d.ts +0 -0
- package/core/components/ui/_css/type.js +0 -0
- package/core/components/ui/alert/alert.d.ts +0 -0
- package/core/components/ui/alert/alert.js +0 -0
- package/core/components/ui/badge/badge.d.ts +0 -0
- package/core/components/ui/badge/badge.js +0 -0
- package/core/components/ui/button/button.d.ts +3 -2
- package/core/components/ui/button/button.js +0 -0
- package/core/components/ui/captcha/captcha.d.ts +1 -0
- package/core/components/ui/captcha/captcha.js +14 -2
- package/core/components/ui/card/card-footer.d.ts +0 -0
- package/core/components/ui/card/card-footer.js +0 -0
- package/core/components/ui/card/card-header-descripton.d.ts +0 -0
- package/core/components/ui/card/card-header-descripton.js +0 -0
- package/core/components/ui/card/card-header.d.ts +0 -0
- package/core/components/ui/card/card-header.js +0 -0
- package/core/components/ui/card/card-main.d.ts +0 -0
- package/core/components/ui/card/card-main.js +0 -0
- package/core/components/ui/card/card.d.ts +0 -0
- package/core/components/ui/card/card.js +0 -0
- package/core/components/ui/divider/divider.d.ts +0 -0
- package/core/components/ui/divider/divider.js +0 -0
- package/core/components/ui/form/checkbox/checkbox.d.ts +11 -44
- package/core/components/ui/form/checkbox/checkbox.js +28 -35
- package/core/components/ui/form/css/form-control.d.ts +0 -0
- package/core/components/ui/form/css/form-control.js +0 -0
- package/core/components/ui/form/fieldset/fieldset.d.ts +0 -0
- package/core/components/ui/form/fieldset/fieldset.js +0 -0
- package/core/components/ui/form/fieldset/legend-description.d.ts +0 -0
- package/core/components/ui/form/fieldset/legend-description.js +0 -0
- package/core/components/ui/form/fieldset/legend.d.ts +7 -2
- package/core/components/ui/form/fieldset/legend.js +34 -8
- package/core/components/ui/form/form-actions/form-actions.d.ts +0 -0
- package/core/components/ui/form/form-actions/form-actions.js +0 -0
- package/core/components/ui/form/form-layout/form-layout.d.ts +0 -0
- package/core/components/ui/form/form-layout/form-layout.js +0 -0
- package/core/components/ui/form/input/input.d.ts +6 -2
- package/core/components/ui/form/input/input.js +4 -13
- package/core/components/ui/form/radio/radio.d.ts +0 -0
- package/core/components/ui/form/radio/radio.js +0 -0
- package/core/components/ui/form/select/select.d.ts +7 -2
- package/core/components/ui/form/select/select.js +32 -7
- package/core/components/ui/form/textarea/textarea.d.ts +6 -2
- package/core/components/ui/form/textarea/textarea.js +2 -7
- package/core/components/ui/group/group.d.ts +0 -0
- package/core/components/ui/group/group.js +0 -0
- package/core/components/ui/icon/icon.d.ts +0 -0
- package/core/components/ui/icon/icon.js +0 -0
- package/core/components/ui/icon/icons.d.ts +0 -0
- package/core/components/ui/icon/icons.js +0 -0
- package/core/components/ui/icon/icons.json +0 -0
- package/core/components/ui/image/image.d.ts +0 -0
- package/core/components/ui/image/image.js +0 -0
- package/core/components/ui/link/link.d.ts +0 -0
- package/core/components/ui/link/link.js +0 -0
- package/core/components/ui/loader/loader.d.ts +0 -0
- package/core/components/ui/loader/loader.js +0 -0
- package/core/components/ui/loader/styles/fixed.d.ts +0 -0
- package/core/components/ui/loader/styles/fixed.js +0 -0
- package/core/components/ui/loader/styles/inline.d.ts +0 -0
- package/core/components/ui/loader/styles/inline.js +0 -0
- package/core/components/ui/menu/menu-item.d.ts +0 -0
- package/core/components/ui/menu/menu-item.js +0 -0
- package/core/components/ui/menu/menu.d.ts +0 -0
- package/core/components/ui/menu/menu.js +0 -0
- package/core/components/ui/modal/modal-actions.d.ts +0 -0
- package/core/components/ui/modal/modal-actions.js +0 -0
- package/core/components/ui/modal/modal-close.d.ts +0 -0
- package/core/components/ui/modal/modal-close.js +0 -0
- package/core/components/ui/modal/modal-content.d.ts +0 -0
- package/core/components/ui/modal/modal-content.js +0 -0
- package/core/components/ui/modal/modal-subtitle.d.ts +0 -0
- package/core/components/ui/modal/modal-subtitle.js +0 -0
- package/core/components/ui/modal/modal-title.d.ts +0 -0
- package/core/components/ui/modal/modal-title.js +0 -0
- package/core/components/ui/modal/modal.d.ts +0 -0
- package/core/components/ui/modal/modal.js +0 -0
- package/core/components/ui/pop/pop.d.ts +0 -0
- package/core/components/ui/pop/pop.js +0 -0
- package/core/components/ui/progress/progress.d.ts +0 -0
- package/core/components/ui/progress/progress.js +0 -0
- package/core/components/ui/table/table-caption.d.ts +0 -0
- package/core/components/ui/table/table-caption.js +0 -0
- package/core/components/ui/table/table-tbody.d.ts +0 -0
- package/core/components/ui/table/table-tbody.js +0 -0
- package/core/components/ui/table/table-td.d.ts +0 -0
- package/core/components/ui/table/table-td.js +0 -0
- package/core/components/ui/table/table-tfoot.d.ts +0 -0
- package/core/components/ui/table/table-tfoot.js +0 -0
- package/core/components/ui/table/table-th.d.ts +0 -0
- package/core/components/ui/table/table-th.js +0 -0
- package/core/components/ui/table/table-thead.d.ts +0 -0
- package/core/components/ui/table/table-thead.js +0 -0
- package/core/components/ui/table/table-tr.d.ts +0 -0
- package/core/components/ui/table/table-tr.js +0 -0
- package/core/components/ui/table/table.d.ts +0 -0
- package/core/components/ui/table/table.js +0 -0
- package/core/components/ui/tabs/tab.d.ts +0 -0
- package/core/components/ui/tabs/tab.js +0 -0
- package/core/components/ui/tabs/tabs.d.ts +0 -0
- package/core/components/ui/tabs/tabs.js +0 -0
- package/core/components/ui/taxonomy/taxonomy.d.ts +0 -0
- package/core/components/ui/taxonomy/taxonomy.js +0 -0
- package/core/components/ui/theme/css/tailwind.css +0 -0
- package/core/components/ui/theme/css/tailwind.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/core-variables.js +0 -0
- package/core/components/ui/theme/theme-collection/dark.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/dark.js +0 -0
- package/core/components/ui/theme/theme-collection/light.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/light.js +0 -0
- package/core/components/ui/theme/theme.d.ts +0 -0
- package/core/components/ui/theme/theme.js +0 -0
- package/core/components/ui/toast/message-subscriber.d.ts +0 -0
- package/core/components/ui/toast/message-subscriber.js +0 -0
- package/core/components/ui/toast/toast-item.d.ts +0 -0
- package/core/components/ui/toast/toast-item.js +0 -0
- package/core/components/ui/toast/toast.d.ts +0 -0
- package/core/components/ui/toast/toast.js +0 -0
- package/core/components/ui/toast/types.d.ts +0 -0
- package/core/components/ui/toast/types.js +0 -0
- package/core/components/ui/tooltip/tooltip.d.ts +0 -0
- package/core/components/ui/tooltip/tooltip.js +0 -0
- package/core/components/ui/ui.d.ts +0 -0
- package/core/components/ui/ui.js +0 -0
- package/core/core.d.ts +0 -0
- package/core/core.js +0 -0
- package/core/mixins/Fetcher.d.ts +0 -0
- package/core/mixins/Fetcher.js +0 -0
- package/core/mixins/FormCheckable.d.ts +3 -5
- package/core/mixins/FormCheckable.js +4 -15
- package/core/mixins/FormElement.d.ts +0 -0
- package/core/mixins/FormElement.js +7 -0
- package/core/mixins/FormInput.d.ts +8 -5
- package/core/mixins/FormInput.js +39 -2
- package/core/mixins/Subscriber.d.ts +0 -0
- package/core/mixins/Subscriber.js +4 -0
- package/core/mixins/TemplatesContainer.d.ts +0 -0
- package/core/mixins/TemplatesContainer.js +0 -0
- package/core/mixins/mixins.d.ts +0 -0
- package/core/mixins/mixins.js +0 -0
- package/core/utils/Arrays.d.ts +0 -0
- package/core/utils/Arrays.js +0 -0
- package/core/utils/DataBindObserver.d.ts +0 -0
- package/core/utils/DataBindObserver.js +0 -0
- package/core/utils/Electron.d.ts +0 -0
- package/core/utils/Electron.js +0 -0
- package/core/utils/Format.d.ts +0 -0
- package/core/utils/Format.js +0 -0
- package/core/utils/HTML.d.ts +0 -0
- package/core/utils/HTML.js +0 -0
- package/core/utils/LocationHandler.d.ts +0 -0
- package/core/utils/LocationHandler.js +0 -0
- package/core/utils/Objects.d.ts +0 -0
- package/core/utils/Objects.js +0 -0
- package/core/utils/PublisherProxy.d.mts +0 -0
- package/core/utils/PublisherProxy.mjs +0 -0
- package/core/utils/api.d.ts +4 -0
- package/core/utils/api.js +25 -1
- package/mixins.d.ts +9 -2
- package/mixins.js +0 -0
- package/package.json +1 -1
- package/utils.d.ts +0 -0
- package/utils.js +0 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
|
-
import
|
|
2
|
+
import "@supersoniks/concorde/core/components/functional/list/list";
|
|
3
3
|
import { PublisherProxy } from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
|
|
4
4
|
declare const Queue_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
5
5
|
export default class Queue extends Queue_base {
|
|
@@ -14,6 +14,9 @@ export default class Queue extends Queue_base {
|
|
|
14
14
|
limit: number;
|
|
15
15
|
offset: number;
|
|
16
16
|
filteredFields: string;
|
|
17
|
+
_displayContents: boolean;
|
|
18
|
+
set displayContents(value: boolean);
|
|
19
|
+
get displayContents(): boolean;
|
|
17
20
|
static instanceCounter: number;
|
|
18
21
|
connectedCallback(): void;
|
|
19
22
|
filterPublisher: PublisherProxy | null;
|
|
@@ -8,10 +8,10 @@ var Queue_1;
|
|
|
8
8
|
import { html, LitElement, nothing } from "lit";
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
10
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
11
|
-
import { repeat } from
|
|
11
|
+
import { repeat } from "lit/directives/repeat.js";
|
|
12
12
|
import { PublisherManager } from "@supersoniks/concorde/core/utils/PublisherProxy.mjs";
|
|
13
13
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
14
|
-
import
|
|
14
|
+
import "@supersoniks/concorde/core/components/functional/list/list";
|
|
15
15
|
/**
|
|
16
16
|
*### Une Queue charge du contenu par lot selon l'expression renseignée dans l'attribut *dataProviderExpression*.
|
|
17
17
|
* * Chaque lot est chargé par un composant [List](./?path=/docs/core-components-functional-list-list--basic) dont le dataProvider créé à partir de l'attribut dataProviderExpression
|
|
@@ -39,6 +39,7 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
|
|
|
39
39
|
this.limit = 5;
|
|
40
40
|
this.offset = 0;
|
|
41
41
|
this.filteredFields = "";
|
|
42
|
+
this._displayContents = false;
|
|
42
43
|
this.filterPublisher = null;
|
|
43
44
|
this.filterTimeoutId = undefined;
|
|
44
45
|
/**
|
|
@@ -52,6 +53,12 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
|
|
|
52
53
|
this.currentScrollPosition = undefined;
|
|
53
54
|
this.listDataProviders = [];
|
|
54
55
|
}
|
|
56
|
+
set displayContents(value) {
|
|
57
|
+
this._displayContents = value;
|
|
58
|
+
}
|
|
59
|
+
get displayContents() {
|
|
60
|
+
return this._displayContents;
|
|
61
|
+
}
|
|
55
62
|
connectedCallback() {
|
|
56
63
|
this.noShadowDom = "";
|
|
57
64
|
this.defferedDebug = this.hasAttribute("debug") || null;
|
|
@@ -142,6 +149,8 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
|
|
|
142
149
|
this.lastRequestTime = new Date().getTime();
|
|
143
150
|
}
|
|
144
151
|
render() {
|
|
152
|
+
let displayStyle = this.displayContents ? "contents" : "inline";
|
|
153
|
+
this.style.display = displayStyle;
|
|
145
154
|
if (this.currentScrollPosition) {
|
|
146
155
|
window.requestAnimationFrame(() => {
|
|
147
156
|
if (document.scrollingElement)
|
|
@@ -154,10 +163,11 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement) {
|
|
|
154
163
|
return html `
|
|
155
164
|
${repeat(this.props, (item) => item.id, (item, index) => {
|
|
156
165
|
var _a;
|
|
157
|
-
let templates = index == 0 ? this.templates : (_a = this.templates) === null || _a === void 0 ? void 0 : _a.filter(elt => elt.getAttribute("data-value") != "no-item");
|
|
166
|
+
let templates = index == 0 ? this.templates : (_a = this.templates) === null || _a === void 0 ? void 0 : _a.filter((elt) => elt.getAttribute("data-value") != "no-item");
|
|
158
167
|
return html `
|
|
159
168
|
<sonic-list
|
|
160
169
|
fetch
|
|
170
|
+
style=${displayStyle}
|
|
161
171
|
.itemPropertyMap=${this.itemPropertyMap}
|
|
162
172
|
debug=${ifDefined(this.defferedDebug)}
|
|
163
173
|
@load=${this.next}
|
|
@@ -192,6 +202,9 @@ __decorate([
|
|
|
192
202
|
__decorate([
|
|
193
203
|
property()
|
|
194
204
|
], Queue.prototype, "filteredFields", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
property()
|
|
207
|
+
], Queue.prototype, "displayContents", null);
|
|
195
208
|
__decorate([
|
|
196
209
|
property({ type: String })
|
|
197
210
|
], Queue.prototype, "dataProviderExpression", void 0);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -55,7 +55,7 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
55
55
|
this.api = new API(this.getApiConfiguration());
|
|
56
56
|
}
|
|
57
57
|
submit() {
|
|
58
|
-
var _a;
|
|
58
|
+
var _a, _b, _c;
|
|
59
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
60
|
const formPublisher = PublisherManager.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));
|
|
61
61
|
//
|
|
@@ -70,30 +70,37 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
70
70
|
//
|
|
71
71
|
//Recup données
|
|
72
72
|
let method = ((_a = this.getAttribute("method")) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) || "post";
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
let sendAsFormData = this.hasAttribute("sendAsFormData");
|
|
74
|
+
let formData = formPublisher.get();
|
|
75
|
+
delete formData.isFormValid;
|
|
76
|
+
const headerPublisher = PublisherManager.getInstance().get(this.getAncestorAttributeValue("headersDataProvider"));
|
|
77
|
+
let headerData = headerPublisher.get();
|
|
76
78
|
let result = null;
|
|
77
79
|
let dataProvider = this.getAncestorAttributeValue("dataProvider");
|
|
78
80
|
let endPoint = this.endPoint || dataProvider;
|
|
79
81
|
Loader.show();
|
|
80
82
|
let sendData = () => __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
var
|
|
83
|
+
var _d, _e, _f, _g, _h;
|
|
82
84
|
//
|
|
83
85
|
//envoi données
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
if (sendAsFormData) {
|
|
87
|
+
result = yield ((_d = this.api) === null || _d === void 0 ? void 0 : _d.submitFormData(endPoint, formData, headerData));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
switch (method) {
|
|
91
|
+
case "put":
|
|
92
|
+
result = yield ((_e = this.api) === null || _e === void 0 ? void 0 : _e.put(endPoint, formData, headerData));
|
|
93
|
+
break;
|
|
94
|
+
case "delete":
|
|
95
|
+
result = yield ((_f = this.api) === null || _f === void 0 ? void 0 : _f.delete(endPoint, formData, headerData));
|
|
96
|
+
break;
|
|
97
|
+
case "get":
|
|
98
|
+
result = yield ((_g = this.api) === null || _g === void 0 ? void 0 : _g.get(endPoint, headerData));
|
|
99
|
+
break;
|
|
100
|
+
default:
|
|
101
|
+
result = yield ((_h = this.api) === null || _h === void 0 ? void 0 : _h.post(endPoint, formData, headerData));
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
97
104
|
}
|
|
98
105
|
Loader.hide();
|
|
99
106
|
//Je garde ça, mais normalement il y a toujours quelquechose
|
|
@@ -110,9 +117,16 @@ let Submit = class Submit extends Subscriber(LitElement) {
|
|
|
110
117
|
if (this.publisher)
|
|
111
118
|
this.publisher.disabled = false;
|
|
112
119
|
});
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
formPublisher.
|
|
120
|
+
let captchaPublisher = headerPublisher.needsCaptchaValidation.get()
|
|
121
|
+
? headerPublisher
|
|
122
|
+
: formPublisher.needsCaptchaValidation.get()
|
|
123
|
+
? formPublisher
|
|
124
|
+
: null;
|
|
125
|
+
if (captchaPublisher) {
|
|
126
|
+
captchaPublisher.captchaMethod = method;
|
|
127
|
+
captchaPublisher.captchaAction = (_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";
|
|
128
|
+
captchaPublisher.captchaToken = "request_token";
|
|
129
|
+
captchaPublisher.captchaToken.onAssign((token) => {
|
|
116
130
|
if (token != "request_token")
|
|
117
131
|
sendData();
|
|
118
132
|
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,8 +3,7 @@ declare const Button_base: {
|
|
|
3
3
|
new (...args: any[]): {
|
|
4
4
|
_value: string | null;
|
|
5
5
|
value: string | null;
|
|
6
|
-
|
|
7
|
-
name: string;
|
|
6
|
+
forceAutoFill: boolean;
|
|
8
7
|
unique: true | null;
|
|
9
8
|
radio: true | null;
|
|
10
9
|
_checked: true | null;
|
|
@@ -23,6 +22,8 @@ declare const Button_base: {
|
|
|
23
22
|
required: boolean;
|
|
24
23
|
disabled: true | null;
|
|
25
24
|
formDataProvider: string;
|
|
25
|
+
_name: string;
|
|
26
|
+
name: string;
|
|
26
27
|
props: any;
|
|
27
28
|
isConnected: boolean;
|
|
28
29
|
getAncestorAttributeValue(attributeName: string): string;
|
|
File without changes
|
|
@@ -19,13 +19,15 @@ let Captcha = class Captcha extends Subscriber(LitElement) {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
21
|
this.key = "";
|
|
22
|
+
this.action = null;
|
|
22
23
|
}
|
|
23
24
|
connectedCallback() {
|
|
25
|
+
var _a;
|
|
24
26
|
const script = document.createElement("script");
|
|
25
27
|
script.src = "https://www.google.com/recaptcha/api.js?render=" + this.key;
|
|
26
28
|
document.head.appendChild(script);
|
|
27
29
|
super.connectedCallback();
|
|
28
|
-
this.formPublisher = PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"));
|
|
30
|
+
this.formPublisher = PublisherManager.get((_a = this.getAncestorAttributeValue("headersDataProvider")) !== null && _a !== void 0 ? _a : this.getAncestorAttributeValue("formDataProvider"));
|
|
29
31
|
this.formPublisher.needsCaptchaValidation = true;
|
|
30
32
|
this.formPublisher.captchaToken.onAssign((v) => {
|
|
31
33
|
if (v == "request_token") {
|
|
@@ -34,9 +36,16 @@ let Captcha = class Captcha extends Subscriber(LitElement) {
|
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
38
|
requestToken() {
|
|
39
|
+
var _a, _b, _c, _d;
|
|
37
40
|
const win = window;
|
|
41
|
+
// On récupère l'action liée au recaptcha,
|
|
42
|
+
// et on vérifie qu'il ne contienne que des caractères alpha-numériques, underscore et slash
|
|
43
|
+
let 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, "_");
|
|
44
|
+
let method = ((_d = this.formPublisher.captchaMethod.get()) !== null && _d !== void 0 ? _d : "POST").toUpperCase();
|
|
45
|
+
delete this.formPublisher.captchaAction;
|
|
46
|
+
delete this.formPublisher.captchaMethod;
|
|
38
47
|
win.grecaptcha.ready(() => {
|
|
39
|
-
win.grecaptcha.execute(this.key, { action: "
|
|
48
|
+
win.grecaptcha.execute(this.key, { action: method + "//" + action }).then((token) => {
|
|
40
49
|
this.formPublisher.captchaToken = token;
|
|
41
50
|
});
|
|
42
51
|
});
|
|
@@ -48,6 +57,9 @@ let Captcha = class Captcha extends Subscriber(LitElement) {
|
|
|
48
57
|
__decorate([
|
|
49
58
|
property()
|
|
50
59
|
], Captcha.prototype, "key", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
property()
|
|
62
|
+
], Captcha.prototype, "action", void 0);
|
|
51
63
|
Captcha = __decorate([
|
|
52
64
|
customElement(tagName)
|
|
53
65
|
], Captcha);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,8 +4,7 @@ declare const Checkbox_base: {
|
|
|
4
4
|
new (...args: any[]): {
|
|
5
5
|
_value: string | null;
|
|
6
6
|
value: string | null;
|
|
7
|
-
|
|
8
|
-
name: string;
|
|
7
|
+
forceAutoFill: boolean;
|
|
9
8
|
unique: true | null;
|
|
10
9
|
radio: true | null;
|
|
11
10
|
_checked: true | null;
|
|
@@ -24,26 +23,9 @@ declare const Checkbox_base: {
|
|
|
24
23
|
required: boolean;
|
|
25
24
|
disabled: true | null;
|
|
26
25
|
formDataProvider: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* * 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é.
|
|
31
|
-
* * Par défault lorsque modifie l'input, la valeur est également mise à jour via le même dataprovider
|
|
32
|
-
* * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
|
|
33
|
-
* * 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.
|
|
34
|
-
* * **FormInput **
|
|
35
|
-
* 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.
|
|
36
|
-
* **FormCheckable :**
|
|
37
|
-
* * 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.
|
|
38
|
-
* **Comportements :**
|
|
39
|
-
* * multiple (par défaut):
|
|
40
|
-
* - on peut cocher plusieurs checkbox ayant le même *name*.
|
|
41
|
-
* - 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*.
|
|
42
|
-
* * unique (Ajouter l'attribute unique au composant a l'intégration):
|
|
43
|
-
* - on ne peut cocher qu'une seule checkbox ayant le même *name*.
|
|
44
|
-
* * radio (Ajouter l'attribute radio au composant a l'intégration):
|
|
45
|
-
* Comme unique, mais on ne peut pas décocher la case sauf en en cochant une autre, comme un bouton radio.
|
|
46
|
-
*/
|
|
26
|
+
_name: string;
|
|
27
|
+
name: string;
|
|
28
|
+
props: any;
|
|
47
29
|
isConnected: boolean;
|
|
48
30
|
getAncestorAttributeValue(attributeName: string): string;
|
|
49
31
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
@@ -68,7 +50,13 @@ declare const Checkbox_base: {
|
|
|
68
50
|
} & {
|
|
69
51
|
new (...args: any[]): {
|
|
70
52
|
validateFormElement(): void;
|
|
53
|
+
forceAutoFill: boolean;
|
|
54
|
+
_type: "number" | "search" | "file" | "button" | "password" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local";
|
|
71
55
|
type: "number" | "search" | "file" | "button" | "password" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local";
|
|
56
|
+
_description?: string | undefined;
|
|
57
|
+
description: string | undefined;
|
|
58
|
+
_label?: string | undefined;
|
|
59
|
+
label: string | undefined;
|
|
72
60
|
tabindex?: number | undefined;
|
|
73
61
|
autocomplete?: "url" | "name" | "language" | "on" | "tel" | "email" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo" | undefined;
|
|
74
62
|
getFormPublisher(): any;
|
|
@@ -85,26 +73,7 @@ declare const Checkbox_base: {
|
|
|
85
73
|
value: any;
|
|
86
74
|
_name: string;
|
|
87
75
|
name: string;
|
|
88
|
-
props: any;
|
|
89
|
-
* ### Le composent sonic-checkbox étend les mixins FormCheckable, FormInput, FormElement et Subscriber
|
|
90
|
-
* **FormElement :**
|
|
91
|
-
* * 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é.
|
|
92
|
-
* * Par défault lorsque modifie l'input, la valeur est également mise à jour via le même dataprovider
|
|
93
|
-
* * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
|
|
94
|
-
* * 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.
|
|
95
|
-
* * **FormInput **
|
|
96
|
-
* 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.
|
|
97
|
-
* **FormCheckable :**
|
|
98
|
-
* * 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.
|
|
99
|
-
* **Comportements :**
|
|
100
|
-
* * multiple (par défaut):
|
|
101
|
-
* - on peut cocher plusieurs checkbox ayant le même *name*.
|
|
102
|
-
* - 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*.
|
|
103
|
-
* * unique (Ajouter l'attribute unique au composant a l'intégration):
|
|
104
|
-
* - on ne peut cocher qu'une seule checkbox ayant le même *name*.
|
|
105
|
-
* * radio (Ajouter l'attribute radio au composant a l'intégration):
|
|
106
|
-
* Comme unique, mais on ne peut pas décocher la case sauf en en cochant une autre, comme un bouton radio.
|
|
107
|
-
*/
|
|
76
|
+
props: any;
|
|
108
77
|
isConnected: boolean;
|
|
109
78
|
getAncestorAttributeValue(attributeName: string): string;
|
|
110
79
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
@@ -132,8 +101,6 @@ export declare class Checkbox extends Checkbox_base {
|
|
|
132
101
|
static styles: CSSResultGroup[];
|
|
133
102
|
touched: boolean;
|
|
134
103
|
iconName: string;
|
|
135
|
-
description?: string;
|
|
136
|
-
label?: string;
|
|
137
104
|
slotDescriptionNodes: Array<Node>;
|
|
138
105
|
hasDescription: boolean;
|
|
139
106
|
updated(): void;
|
|
@@ -51,40 +51,38 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
|
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
53
|
return html `
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
</div>
|
|
78
|
-
</label>
|
|
54
|
+
<label class="checkbox-container ${this.disabled ? "disabled" : ""}">
|
|
55
|
+
<span class="icon-container">
|
|
56
|
+
<input
|
|
57
|
+
type="${this.type}"
|
|
58
|
+
@change=${this.handleChange}
|
|
59
|
+
@blur=${this.handleBlur}
|
|
60
|
+
?required=${this.required}
|
|
61
|
+
.disabled=${ifDefined(this.disabled)}
|
|
62
|
+
.checked=${ifDefined(this.checked)}
|
|
63
|
+
.name=${this.name}
|
|
64
|
+
.value=${this.value}
|
|
65
|
+
?autofocus=${this.autofocus}
|
|
66
|
+
/>
|
|
67
|
+
<sonic-icon name="${this.iconName}" class="sc-input-icon"></sonic-icon>
|
|
68
|
+
</span>
|
|
69
|
+
<div class="checkbox-text">
|
|
70
|
+
${this.label ? this.label : ""}
|
|
71
|
+
<slot></slot>
|
|
72
|
+
<slot name="description" class="${this.hasDescription ? "description" : "hidden"} ">
|
|
73
|
+
${this.description ? html `${this.description}` : ""}
|
|
74
|
+
</slot>
|
|
75
|
+
</div>
|
|
76
|
+
</label>
|
|
79
77
|
`;
|
|
80
78
|
}
|
|
81
79
|
};
|
|
82
80
|
Checkbox.styles = [
|
|
83
81
|
fontSize,
|
|
84
82
|
css `
|
|
85
|
-
:host{
|
|
83
|
+
:host {
|
|
86
84
|
--sc-checkbox-border-width: var(--sc-form-border-width);
|
|
87
|
-
--sc-checkbox-border-color:
|
|
85
|
+
--sc-checkbox-border-color: transparent;
|
|
88
86
|
}
|
|
89
87
|
|
|
90
88
|
* {
|
|
@@ -119,7 +117,7 @@ Checkbox.styles = [
|
|
|
119
117
|
outline: none;
|
|
120
118
|
margin: 0;
|
|
121
119
|
background-color: var(--sc-base-200);
|
|
122
|
-
border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color);
|
|
120
|
+
border: var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color);
|
|
123
121
|
}
|
|
124
122
|
|
|
125
123
|
input:focus,
|
|
@@ -188,13 +186,14 @@ Checkbox.styles = [
|
|
|
188
186
|
}
|
|
189
187
|
|
|
190
188
|
/*ERROR*/
|
|
189
|
+
/*
|
|
191
190
|
:host([touched]) .checkbox-container:has(input:not(:focus):invalid) {
|
|
192
191
|
--sc-checkbox-border-color:var(--sc-danger);
|
|
193
192
|
}
|
|
194
193
|
:host([touched]) .checkbox-container:has(input:not(:focus):invalid) .checkbox-text{
|
|
195
194
|
color:var(--sc-danger);
|
|
196
195
|
}
|
|
197
|
-
|
|
196
|
+
*/
|
|
198
197
|
`,
|
|
199
198
|
];
|
|
200
199
|
__decorate([
|
|
@@ -203,12 +202,6 @@ __decorate([
|
|
|
203
202
|
__decorate([
|
|
204
203
|
property({ type: String })
|
|
205
204
|
], Checkbox.prototype, "iconName", void 0);
|
|
206
|
-
__decorate([
|
|
207
|
-
property({ type: String })
|
|
208
|
-
], Checkbox.prototype, "description", void 0);
|
|
209
|
-
__decorate([
|
|
210
|
-
property({ type: String })
|
|
211
|
-
], Checkbox.prototype, "label", void 0);
|
|
212
205
|
__decorate([
|
|
213
206
|
queryAssignedNodes({ slot: "description" })
|
|
214
207
|
], Checkbox.prototype, "slotDescriptionNodes", void 0);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,8 +2,13 @@ import { LitElement } from "lit";
|
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/form/fieldset/legend-description";
|
|
3
3
|
export declare class Legend extends LitElement {
|
|
4
4
|
static styles: import("lit").CSSResult[];
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
forceAutoFill: boolean;
|
|
6
|
+
_description?: string;
|
|
7
|
+
get description(): string | undefined;
|
|
8
|
+
set description(value: string | undefined);
|
|
9
|
+
_label?: string;
|
|
10
|
+
get label(): string | undefined;
|
|
11
|
+
set label(value: string | undefined);
|
|
7
12
|
iconName?: string;
|
|
8
13
|
iconLibrary?: string;
|
|
9
14
|
iconPrefix?: string;
|