@supersoniks/concorde 1.1.49 → 2.0.0
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 +3288 -36
- package/concorde-core.es.js +13149 -9458
- package/core/_types/types.d.ts +0 -0
- package/core/_types/types.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 +2 -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/if/if.test.d.ts +0 -0
- package/core/components/functional/if/if.test.js +12 -21
- package/core/components/functional/list/list.d.ts +4 -0
- package/core/components/functional/list/list.js +24 -11
- package/core/components/functional/mix/mix.d.ts +0 -0
- package/core/components/functional/mix/mix.js +0 -0
- package/core/components/functional/queue/queue.d.ts +0 -0
- package/core/components/functional/queue/queue.js +38 -70
- 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 +1 -2
- package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -0
- package/core/components/functional/sdui/SDUIDescriptorTransformer.js +28 -43
- package/core/components/functional/sdui/default-library.json +0 -0
- package/core/components/functional/sdui/sdui-utils.d.ts +0 -0
- package/core/components/functional/sdui/sdui-utils.js +0 -0
- package/core/components/functional/sdui/sdui.d.ts +2 -0
- package/core/components/functional/sdui/sdui.js +24 -40
- package/core/components/functional/sdui/types.d.ts +0 -0
- package/core/components/functional/sdui/types.js +0 -0
- package/core/components/functional/sonic-scope/sonic-scope.d.ts +1 -1
- 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 +2 -4
- package/core/components/functional/submit/submit.d.ts +0 -0
- package/core/components/functional/submit/submit.js +106 -121
- package/core/components/functional/subscriber/subscriber.d.ts +0 -0
- package/core/components/functional/subscriber/subscriber.js +0 -0
- package/core/components/functional/value/value.d.ts +0 -0
- package/core/components/functional/value/value.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 +2 -2
- package/core/components/ui/button/button.js +24 -41
- package/core/components/ui/captcha/captcha.d.ts +0 -0
- package/core/components/ui/captcha/captcha.js +3 -5
- 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 +1 -1
- package/core/components/ui/divider/divider.js +6 -6
- package/core/components/ui/form/checkbox/checkbox.d.ts +3 -23
- package/core/components/ui/form/checkbox/checkbox.js +7 -12
- 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 +0 -0
- package/core/components/ui/form/fieldset/legend.js +0 -0
- 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 +1 -1
- package/core/components/ui/form/form-layout/form-layout.js +1 -1
- package/core/components/ui/form/input/input.d.ts +4 -6
- package/core/components/ui/form/input/input.js +12 -18
- package/core/components/ui/form/input/password-helper.d.ts +0 -0
- package/core/components/ui/form/input/password-helper.js +0 -0
- package/core/components/ui/form/input/same-value-helper.d.ts +0 -0
- package/core/components/ui/form/input/same-value-helper.js +0 -0
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +5 -20
- package/core/components/ui/form/input-autocomplete/input-autocomplete.js +27 -93
- 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 +1 -1
- package/core/components/ui/form/select/select.js +15 -25
- package/core/components/ui/form/textarea/textarea.d.ts +3 -3
- package/core/components/ui/form/textarea/textarea.js +8 -17
- package/core/components/ui/group/group.d.ts +0 -0
- package/core/components/ui/group/group.js +7 -15
- package/core/components/ui/icon/icon.d.ts +6 -12
- package/core/components/ui/icon/icon.js +20 -53
- package/core/components/ui/icon/icons.d.ts +0 -0
- package/core/components/ui/icon/icons.js +28 -22
- package/core/components/ui/icon/icons.json +0 -0
- package/core/components/ui/image/image.d.ts +1 -1
- package/core/components/ui/image/image.js +3 -3
- 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 +2 -4
- package/core/components/ui/modal/modal-actions.d.ts +1 -1
- package/core/components/ui/modal/modal-actions.js +4 -4
- 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 +10 -12
- package/core/components/ui/pop/pop.d.ts +0 -0
- package/core/components/ui/pop/pop.js +3 -4
- 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 +5 -6
- 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 +5 -6
- 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 +8 -1
- package/core/components/ui/table/table.d.ts +1 -0
- package/core/components/ui/table/table.js +9 -1
- 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 +5 -6
- package/core/components/ui/toast/message-subscriber.d.ts +0 -0
- package/core/components/ui/toast/message-subscriber.js +6 -8
- 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 +15 -6
- 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 +1 -1
- 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 +9 -0
- package/core/decorators/Subscriber.d.ts +0 -0
- package/core/decorators/Subscriber.js +0 -0
- package/core/directives/DataProvider.d.ts +0 -14
- package/core/directives/DataProvider.js +1 -16
- package/core/mixins/Fetcher.d.ts +2 -0
- package/core/mixins/Fetcher.js +67 -79
- package/core/mixins/FormCheckable.d.ts +0 -0
- package/core/mixins/FormCheckable.js +2 -3
- package/core/mixins/FormElement.d.ts +0 -0
- package/core/mixins/FormElement.js +5 -7
- package/core/mixins/FormInput.d.ts +1 -1
- package/core/mixins/FormInput.js +1 -2
- package/core/mixins/Subscriber.d.ts +0 -0
- package/core/mixins/Subscriber.js +39 -54
- 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 +2 -1
- package/core/utils/DataBindObserver.d.ts +0 -0
- package/core/utils/DataBindObserver.js +5 -6
- package/core/utils/Electron.d.ts +0 -0
- package/core/utils/Electron.js +1 -1
- 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 +18 -31
- package/core/utils/LocationHandler.d.ts +0 -0
- package/core/utils/LocationHandler.js +8 -13
- package/core/utils/Objects.d.ts +0 -0
- package/core/utils/Objects.js +0 -0
- package/core/utils/PublisherProxy.d.ts +0 -0
- package/core/utils/PublisherProxy.js +108 -132
- package/core/utils/Utils.d.ts +0 -0
- package/core/utils/Utils.js +3 -14
- package/core/utils/api.d.ts +0 -0
- package/core/utils/api.js +137 -165
- package/img/concorde-logo.svg +0 -0
- package/img/concorde.png +0 -0
- package/img/concorde_def.png +0 -0
- package/mixins.d.ts +5 -3
- package/mixins.js +0 -0
- package/package.json +13 -12
- package/svg/regular/plane.svg +0 -0
- package/svg/solid/plane.svg +0 -0
- package/test-utils/TestUtils.d.ts +0 -0
- package/test-utils/TestUtils.js +0 -0
- package/utils.d.ts +0 -0
- package/utils.js +0 -0
|
@@ -5,8 +5,8 @@ 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 { html, LitElement, css, nothing } from "lit";
|
|
8
|
-
import { customElement, property,
|
|
9
|
-
import { FormInput, FormElement, Subscriber, TemplatesContainer
|
|
8
|
+
import { customElement, property, queryAssignedElements, state } from "lit/decorators.js";
|
|
9
|
+
import { FormInput, FormElement, Subscriber, TemplatesContainer } from "@supersoniks/concorde/mixins";
|
|
10
10
|
import "@supersoniks/concorde/core/components/ui/form/input/input";
|
|
11
11
|
import "@supersoniks/concorde/core/components/ui/pop/pop";
|
|
12
12
|
import "@supersoniks/concorde/core/components/functional/queue/queue";
|
|
@@ -14,7 +14,7 @@ import "@supersoniks/concorde/core/components/ui/menu/menu-item";
|
|
|
14
14
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
15
15
|
import { PublisherManager } from "@supersoniks/concorde/utils";
|
|
16
16
|
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
17
|
-
import { ResizeController } from "@lit-labs/observers/
|
|
17
|
+
import { ResizeController } from "@lit-labs/observers/resize-controller.js";
|
|
18
18
|
/**
|
|
19
19
|
* Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
|
|
20
20
|
* L'input permet de filtrer les choix de valeurs dans le sonic-pop.
|
|
@@ -32,10 +32,7 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
|
|
|
32
32
|
this.readonly = null;
|
|
33
33
|
this.dataProviderExpression = "";
|
|
34
34
|
this.key = "";
|
|
35
|
-
/** The parameter name to use in dataProviderExpression route */
|
|
36
35
|
this.searchParameter = "";
|
|
37
|
-
/** The property name to search in the dataProviderExpression result, use "_self" if result is a string list */
|
|
38
|
-
this.propertyName = "";
|
|
39
36
|
this.hasInputPrefix = false;
|
|
40
37
|
this._resizeController = new ResizeController(this, {});
|
|
41
38
|
/**
|
|
@@ -46,63 +43,33 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
|
|
|
46
43
|
this.queueDataProvider = "";
|
|
47
44
|
this.initQueueDataProvider = "";
|
|
48
45
|
this.lastValidSearch = "";
|
|
49
|
-
/**
|
|
50
|
-
* Run when the formDataProvider's field is updated
|
|
51
|
-
*
|
|
52
|
-
* @param value
|
|
53
|
-
*/
|
|
54
46
|
this.updateSearchParameter = (value) => {
|
|
55
|
-
var _a;
|
|
56
47
|
if (value == "") {
|
|
57
48
|
this.lastValidSearch = "";
|
|
58
49
|
return;
|
|
59
50
|
}
|
|
60
|
-
|
|
61
|
-
// Si la liste de this.queueDataProvider est bien initialisée, mais qu'aucun item ne correspond à la recherche
|
|
62
|
-
// On affiche quand même la valeur dans le champ de recherche, car il provient directement du formDataProvider
|
|
63
|
-
if (found === false) {
|
|
64
|
-
this.lastValidSearch = value;
|
|
65
|
-
(_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.set(this.lastValidSearch);
|
|
66
|
-
}
|
|
51
|
+
this.queryQueueListItem(this.queueDataProvider, this.findSelection, this.setSearchFromSelection);
|
|
67
52
|
};
|
|
68
53
|
this.initSearchParameter = () => {
|
|
69
54
|
this.queryQueueListItem(this.initQueueDataProvider, this.findSelection, this.setSearchFromSelection);
|
|
70
55
|
};
|
|
71
56
|
this.selectListItem = (listItem) => {
|
|
72
|
-
|
|
73
|
-
let value = this.propertyName === "_self"
|
|
74
|
-
? listItem
|
|
75
|
-
: listItem[this.propertyName || this.name];
|
|
76
|
-
(_a = this.formValuePublisher) === null || _a === void 0 ? void 0 : _a.set(value);
|
|
57
|
+
this.formValuePublisher?.set(listItem[this.name]);
|
|
77
58
|
};
|
|
78
59
|
this.findSearchedItem = (listItem) => {
|
|
79
|
-
|
|
80
|
-
let value = this.propertyName === "_self"
|
|
81
|
-
? listItem
|
|
82
|
-
: listItem[this.propertyName || this.searchParameter || this.name];
|
|
83
|
-
return (value == ((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()));
|
|
60
|
+
return listItem[this.searchParameter || this.name] == this.searchPublisher?.get();
|
|
84
61
|
};
|
|
85
62
|
this.findSelection = (listItem) => {
|
|
86
|
-
|
|
87
|
-
? listItem
|
|
88
|
-
: listItem[this.propertyName || this.name];
|
|
89
|
-
return value == this.value;
|
|
63
|
+
return listItem[this.name] == this.value;
|
|
90
64
|
};
|
|
91
65
|
this.setSearchFromSelection = (listItem) => {
|
|
92
|
-
|
|
93
|
-
this.
|
|
94
|
-
? listItem
|
|
95
|
-
: listItem[this.propertyName || this.searchParameter || this.name];
|
|
96
|
-
(_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.set(this.lastValidSearch);
|
|
66
|
+
this.lastValidSearch = listItem[this.searchParameter || this.name];
|
|
67
|
+
this.searchPublisher?.set(this.lastValidSearch);
|
|
97
68
|
};
|
|
98
69
|
this.updateActiveSelection = () => {
|
|
99
|
-
var _a, _b, _c;
|
|
100
70
|
this.queryQueueListItem(this.queueDataProvider, this.findSearchedItem, this.selectListItem);
|
|
101
|
-
if (!this.select &&
|
|
102
|
-
this.
|
|
103
|
-
this.lastValidSearch != ((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()) &&
|
|
104
|
-
((_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.get())) {
|
|
105
|
-
(_c = this.formValuePublisher) === null || _c === void 0 ? void 0 : _c.set("");
|
|
71
|
+
if (!this.select && this.lastValidSearch && this.lastValidSearch != this.searchPublisher?.get() && this.formValuePublisher?.get()) {
|
|
72
|
+
this.formValuePublisher?.set("");
|
|
106
73
|
}
|
|
107
74
|
};
|
|
108
75
|
}
|
|
@@ -110,11 +77,9 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
|
|
|
110
77
|
* Les fonctions de gestion
|
|
111
78
|
*/
|
|
112
79
|
hasSlotOrProps() {
|
|
113
|
-
|
|
114
|
-
this.hasInputPrefix = !!((_a = this.slotInputPrefixNodes) === null || _a === void 0 ? void 0 : _a.length);
|
|
80
|
+
this.hasInputPrefix = !!this.slotInputPrefixNodes?.length;
|
|
115
81
|
}
|
|
116
82
|
connectedCallback() {
|
|
117
|
-
var _a, _b, _c;
|
|
118
83
|
super.connectedCallback();
|
|
119
84
|
/**
|
|
120
85
|
* Nom de la valeur de recherche
|
|
@@ -125,8 +90,7 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
|
|
|
125
90
|
* Nommage des différents dataProviders utilisés
|
|
126
91
|
*/
|
|
127
92
|
const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
|
|
128
|
-
|
|
129
|
-
const dpPrefix = formDataProvider + "__" + this.name + "__autocomplete";
|
|
93
|
+
const dpPrefix = formDataProvider + "__autocomplete";
|
|
130
94
|
this.initSearchDataProvider = `${dpPrefix}_init_search__`;
|
|
131
95
|
this.initQueueDataProvider = `${dpPrefix}_init_queue__`;
|
|
132
96
|
this.searchDataProvider = `${dpPrefix}_search__`;
|
|
@@ -146,36 +110,28 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
|
|
|
146
110
|
if (this.value) {
|
|
147
111
|
PublisherManager.get(this.initSearchDataProvider)[this.name] = this.value;
|
|
148
112
|
}
|
|
149
|
-
|
|
113
|
+
this.initCountPublisher?.onAssign(this.initSearchParameter);
|
|
150
114
|
/**
|
|
151
115
|
* Lorsque la sélection change, on met à jour la valeur de recherche
|
|
152
116
|
*/
|
|
153
|
-
|
|
117
|
+
this.formValuePublisher?.onAssign(this.updateSearchParameter);
|
|
154
118
|
/**
|
|
155
119
|
* Lorsque La valeur de recherche change, que le composant n'est pas en mode select
|
|
156
120
|
* et qu'elle est différente de la derniere recherche valide on désactive la selection
|
|
157
121
|
*/
|
|
158
|
-
|
|
122
|
+
this.countPublisher?.onAssign(this.updateActiveSelection);
|
|
159
123
|
}
|
|
160
124
|
disconnectedCallback() {
|
|
161
|
-
var _a, _b, _c;
|
|
162
125
|
super.disconnectedCallback();
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
126
|
+
this.initCountPublisher?.offAssign(this.initSearchParameter);
|
|
127
|
+
this.formValuePublisher?.offAssign(this.updateSearchParameter);
|
|
128
|
+
this.countPublisher?.offAssign(this.updateActiveSelection);
|
|
166
129
|
const getPublisher = PublisherManager.get;
|
|
167
130
|
getPublisher(this.initSearchDataProvider).delete();
|
|
168
131
|
getPublisher(this.initQueueDataProvider).delete();
|
|
169
132
|
getPublisher(this.searchDataProvider).delete();
|
|
170
133
|
getPublisher(this.queueDataProvider).delete();
|
|
171
134
|
}
|
|
172
|
-
/**
|
|
173
|
-
* @param queueDataProvider
|
|
174
|
-
* @param itemFinder
|
|
175
|
-
* @param itemMutator
|
|
176
|
-
*
|
|
177
|
-
* @return bool|undefined True if item found, false otherwise, undefined if result is not a list
|
|
178
|
-
*/
|
|
179
135
|
queryQueueListItem(queueDataProvider, itemFinder, itemMutator) {
|
|
180
136
|
const queuePublisher = PublisherManager.get(queueDataProvider);
|
|
181
137
|
let listItem;
|
|
@@ -193,24 +149,20 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
|
|
|
193
149
|
}
|
|
194
150
|
if (listItem) {
|
|
195
151
|
itemMutator(listItem);
|
|
196
|
-
return true;
|
|
197
152
|
}
|
|
198
|
-
return false;
|
|
199
153
|
}
|
|
200
154
|
setSelectionRange(start, end) {
|
|
201
|
-
|
|
202
|
-
(_a = this.querySelector("sonic-input")) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end);
|
|
155
|
+
this.querySelector("sonic-input")?.setSelectionRange(start, end);
|
|
203
156
|
}
|
|
204
157
|
handleHide() {
|
|
205
|
-
var _a, _b, _c;
|
|
206
158
|
if (!this.select)
|
|
207
159
|
return;
|
|
208
|
-
if (
|
|
160
|
+
if (this.searchPublisher?.get() == "") {
|
|
209
161
|
this.lastValidSearch = "";
|
|
210
|
-
|
|
162
|
+
this.formValuePublisher?.set("");
|
|
211
163
|
return;
|
|
212
164
|
}
|
|
213
|
-
|
|
165
|
+
this.searchPublisher?.set(this.lastValidSearch);
|
|
214
166
|
}
|
|
215
167
|
render() {
|
|
216
168
|
return html `
|
|
@@ -230,28 +182,13 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
|
|
|
230
182
|
inlineContent
|
|
231
183
|
size=${this.size}
|
|
232
184
|
>
|
|
233
|
-
<slot
|
|
234
|
-
name="prefix"
|
|
235
|
-
slot="prefix"
|
|
236
|
-
@slotchange=${this.hasSlotOrProps}
|
|
237
|
-
></slot>
|
|
185
|
+
<slot name="prefix" slot="prefix" @slotchange=${this.hasSlotOrProps}></slot>
|
|
238
186
|
|
|
239
187
|
${this.select
|
|
240
|
-
? html `
|
|
241
|
-
<sonic-icon
|
|
242
|
-
slot="suffix"
|
|
243
|
-
class="select-chevron"
|
|
244
|
-
name="nav-arrow-down"
|
|
245
|
-
.size=${this.size}
|
|
246
|
-
></sonic-icon>
|
|
247
|
-
`
|
|
188
|
+
? html ` <sonic-icon slot="suffix" class="select-chevron" name="nav-arrow-down" .size=${this.size}></sonic-icon> `
|
|
248
189
|
: nothing}
|
|
249
190
|
</sonic-input>
|
|
250
|
-
<sonic-menu
|
|
251
|
-
slot="content"
|
|
252
|
-
class="custom-scroll"
|
|
253
|
-
style="${this.offsetWidth ? `width: ${this.offsetWidth}px` : ""}"
|
|
254
|
-
>
|
|
191
|
+
<sonic-menu slot="content" class="custom-scroll" style="${this.offsetWidth ? `width: ${this.offsetWidth}px` : ""}">
|
|
255
192
|
<sonic-queue
|
|
256
193
|
dataProvider="${this.queueDataProvider}"
|
|
257
194
|
filteredFields=${this.filteredFields}
|
|
@@ -317,10 +254,7 @@ __decorate([
|
|
|
317
254
|
property({ type: String })
|
|
318
255
|
], InputAutocomplete.prototype, "searchParameter", void 0);
|
|
319
256
|
__decorate([
|
|
320
|
-
|
|
321
|
-
], InputAutocomplete.prototype, "propertyName", void 0);
|
|
322
|
-
__decorate([
|
|
323
|
-
queryAssignedNodes({ slot: "prefix" })
|
|
257
|
+
queryAssignedElements({ slot: "prefix", flatten: true })
|
|
324
258
|
], InputAutocomplete.prototype, "slotInputPrefixNodes", void 0);
|
|
325
259
|
__decorate([
|
|
326
260
|
state()
|
|
File without changes
|
|
File without changes
|
|
@@ -26,7 +26,7 @@ export declare class Select extends Select_base {
|
|
|
26
26
|
set options(options: Array<SelectOption>);
|
|
27
27
|
get options(): Array<SelectOption>;
|
|
28
28
|
hasDoneFirstUpdate: boolean;
|
|
29
|
-
protected firstUpdated(): void;
|
|
29
|
+
protected firstUpdated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
30
30
|
_value: string;
|
|
31
31
|
set value(value: string);
|
|
32
32
|
get value(): string;
|
|
@@ -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 { html, LitElement, css } from "lit";
|
|
8
|
-
import { customElement, property,
|
|
8
|
+
import { customElement, property, queryAssignedElements, state } from "lit/decorators.js";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
10
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
11
|
import { repeat } from "lit/directives/repeat.js";
|
|
@@ -58,8 +58,9 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
58
58
|
get options() {
|
|
59
59
|
return this._options;
|
|
60
60
|
}
|
|
61
|
-
firstUpdated() {
|
|
61
|
+
firstUpdated(changedProperties) {
|
|
62
62
|
this.hasDoneFirstUpdate = true;
|
|
63
|
+
super.firstUpdated(changedProperties);
|
|
63
64
|
}
|
|
64
65
|
set value(value) {
|
|
65
66
|
if (value == null && !this.hasDoneFirstUpdate)
|
|
@@ -118,15 +119,13 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
118
119
|
super.willUpdate(changedProperties);
|
|
119
120
|
}
|
|
120
121
|
hasSlotOrProps() {
|
|
121
|
-
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
124
|
-
this.
|
|
125
|
-
this.hasPrefix = ((_d = this.slotPrefixNodes) === null || _d === void 0 ? void 0 : _d.length) ? true : false;
|
|
122
|
+
this.hasLabel = this.label || this.slotLabelNodes?.length ? true : false;
|
|
123
|
+
this.hasDescription = this.description || this.slotDescriptionNodes?.length ? true : false;
|
|
124
|
+
this.hasSuffix = this.slotSuffixNodes?.length ? true : false;
|
|
125
|
+
this.hasPrefix = this.slotPrefixNodes?.length ? true : false;
|
|
126
126
|
}
|
|
127
127
|
validateFormElement() {
|
|
128
|
-
|
|
129
|
-
const select = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("select");
|
|
128
|
+
const select = this.shadowRoot?.querySelector("select");
|
|
130
129
|
if (!select || select.checkValidity())
|
|
131
130
|
return;
|
|
132
131
|
const formPublisher = this.getFormPublisher();
|
|
@@ -143,10 +142,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
143
142
|
//let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
|
|
144
143
|
return html `
|
|
145
144
|
<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}"
|
|
146
|
-
>${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
|
|
147
|
-
name="label"
|
|
148
|
-
@slotchange=${this.hasSlotOrProps}
|
|
149
|
-
></slot
|
|
145
|
+
>${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
|
|
150
146
|
></label>
|
|
151
147
|
|
|
152
148
|
<div class="form-control ${classMap(slotClasses)}">
|
|
@@ -168,9 +164,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
168
164
|
>
|
|
169
165
|
${repeat(this.options, (option) => option[this.valueKey], (option) => {
|
|
170
166
|
const isSelected = this.value == option[this.valueKey] ? true : false;
|
|
171
|
-
return html `<option ?selected=${isSelected} value="${option[this.valueKey]}"
|
|
172
|
-
${option[this.wordingKey]}
|
|
173
|
-
</option>`;
|
|
167
|
+
return html `<option ?selected=${isSelected} value="${option[this.valueKey]}">${option[this.wordingKey]}</option>`;
|
|
174
168
|
})}
|
|
175
169
|
<slot></slot>
|
|
176
170
|
</select>
|
|
@@ -179,11 +173,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
179
173
|
<slot name="suffix" @slotchange=${this.hasSlotOrProps}></slot>
|
|
180
174
|
</div>
|
|
181
175
|
|
|
182
|
-
<slot
|
|
183
|
-
name="description"
|
|
184
|
-
@slotchange=${this.hasSlotOrProps}
|
|
185
|
-
class="${this.hasDescription ? "form-description" : "hidden"}"
|
|
186
|
-
>
|
|
176
|
+
<slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription ? "form-description" : "hidden"}">
|
|
187
177
|
${this.description ? html `${unsafeHTML(this.description)}` : ""}
|
|
188
178
|
</slot>
|
|
189
179
|
`;
|
|
@@ -272,16 +262,16 @@ __decorate([
|
|
|
272
262
|
property()
|
|
273
263
|
], Select.prototype, "label", null);
|
|
274
264
|
__decorate([
|
|
275
|
-
|
|
265
|
+
queryAssignedElements({ slot: "label", flatten: true })
|
|
276
266
|
], Select.prototype, "slotLabelNodes", void 0);
|
|
277
267
|
__decorate([
|
|
278
|
-
|
|
268
|
+
queryAssignedElements({ slot: "description", flatten: true })
|
|
279
269
|
], Select.prototype, "slotDescriptionNodes", void 0);
|
|
280
270
|
__decorate([
|
|
281
|
-
|
|
271
|
+
queryAssignedElements({ slot: "suffix", flatten: true })
|
|
282
272
|
], Select.prototype, "slotSuffixNodes", void 0);
|
|
283
273
|
__decorate([
|
|
284
|
-
|
|
274
|
+
queryAssignedElements({ slot: "prefix", flatten: true })
|
|
285
275
|
], Select.prototype, "slotPrefixNodes", void 0);
|
|
286
276
|
__decorate([
|
|
287
277
|
state()
|
|
@@ -3,14 +3,14 @@ declare const Textarea_base: {
|
|
|
3
3
|
new (...args: any[]): {
|
|
4
4
|
validateFormElement(): void;
|
|
5
5
|
forceAutoFill: boolean;
|
|
6
|
-
_type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "
|
|
7
|
-
type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "
|
|
6
|
+
_type: "number" | "search" | "time" | "file" | "button" | "url" | "color" | "hidden" | "image" | "text" | "reset" | "submit" | "email" | "tel" | "month" | "week" | "checkbox" | "radio" | "range" | "date" | "datetime-local" | "password";
|
|
7
|
+
type: "number" | "search" | "time" | "file" | "button" | "url" | "color" | "hidden" | "image" | "text" | "reset" | "submit" | "email" | "tel" | "month" | "week" | "checkbox" | "radio" | "range" | "date" | "datetime-local" | "password";
|
|
8
8
|
_description?: string | undefined;
|
|
9
9
|
description: string | undefined;
|
|
10
10
|
_label?: string | undefined;
|
|
11
11
|
label: string | undefined;
|
|
12
12
|
tabindex?: number | undefined;
|
|
13
|
-
autocomplete?: "url" | "name" | "
|
|
13
|
+
autocomplete?: "url" | "name" | "on" | "additional-name" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "address-line1" | "address-line2" | "address-line3" | "bday-day" | "bday-month" | "bday-year" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-family-name" | "cc-given-name" | "cc-name" | "cc-number" | "cc-type" | "country" | "country-name" | "current-password" | "family-name" | "given-name" | "honorific-prefix" | "honorific-suffix" | "new-password" | "one-time-code" | "organization" | "postal-code" | "street-address" | "transaction-amount" | "transaction-currency" | "username" | "email" | "tel" | "tel-area-code" | "tel-country-code" | "tel-extension" | "tel-local" | "tel-national" | "language" | "nickname" | "organization-title" | "cc-additional-name" | "bday" | "sex" | "impp" | "photo" | undefined;
|
|
14
14
|
getFormPublisher(): any;
|
|
15
15
|
updateDataValue(): void;
|
|
16
16
|
handleChange(e?: Event | undefined): void;
|
|
@@ -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 { html, LitElement, css } from "lit";
|
|
8
|
-
import { customElement, property, state,
|
|
8
|
+
import { customElement, property, state, queryAssignedElements } from "lit/decorators.js";
|
|
9
9
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
10
|
import { formControl, label, description } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
11
11
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
@@ -35,13 +35,11 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
|
|
|
35
35
|
super.willUpdate(changedProperties);
|
|
36
36
|
}
|
|
37
37
|
hasSlotOrProps() {
|
|
38
|
-
|
|
39
|
-
this.
|
|
40
|
-
this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) === null || _b === void 0 ? void 0 : _b.length) ? true : false;
|
|
38
|
+
this.hasLabel = this.label || this.slotLabelNodes?.length ? true : false;
|
|
39
|
+
this.hasDescription = this.description || this.slotDescriptionNodes?.length ? true : false;
|
|
41
40
|
}
|
|
42
41
|
validateFormElement() {
|
|
43
|
-
|
|
44
|
-
const textarea = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("textarea");
|
|
42
|
+
const textarea = this.shadowRoot?.querySelector("textarea");
|
|
45
43
|
if (!textarea || textarea.checkValidity())
|
|
46
44
|
return;
|
|
47
45
|
const formPublisher = this.getFormPublisher();
|
|
@@ -54,10 +52,7 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
|
|
|
54
52
|
// let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
|
|
55
53
|
return html `
|
|
56
54
|
<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}"
|
|
57
|
-
>${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
|
|
58
|
-
name="label"
|
|
59
|
-
@slotchange=${this.hasSlotOrProps}
|
|
60
|
-
></slot
|
|
55
|
+
>${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
|
|
61
56
|
></label>
|
|
62
57
|
|
|
63
58
|
<div class="form-control">
|
|
@@ -86,11 +81,7 @@ ${this.value}</textarea
|
|
|
86
81
|
>
|
|
87
82
|
</div>
|
|
88
83
|
|
|
89
|
-
<slot
|
|
90
|
-
name="description"
|
|
91
|
-
@slotchange=${this.hasSlotOrProps}
|
|
92
|
-
class="${this.hasDescription ? "form-description" : "hidden"}"
|
|
93
|
-
>
|
|
84
|
+
<slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription ? "form-description" : "hidden"}">
|
|
94
85
|
${this.description ? html `${unsafeHTML(this.description)}` : ""}
|
|
95
86
|
</slot>
|
|
96
87
|
`;
|
|
@@ -133,10 +124,10 @@ __decorate([
|
|
|
133
124
|
property({ type: String })
|
|
134
125
|
], Textarea.prototype, "placeholder", void 0);
|
|
135
126
|
__decorate([
|
|
136
|
-
|
|
127
|
+
queryAssignedElements({ slot: "label", flatten: true })
|
|
137
128
|
], Textarea.prototype, "slotLabelNodes", void 0);
|
|
138
129
|
__decorate([
|
|
139
|
-
|
|
130
|
+
queryAssignedElements({ slot: "description", flatten: true })
|
|
140
131
|
], Textarea.prototype, "slotDescriptionNodes", void 0);
|
|
141
132
|
__decorate([
|
|
142
133
|
state()
|
|
File without changes
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { styleMap } from "lit/directives/style-map.js";
|
|
9
|
-
import { customElement, property, state,
|
|
9
|
+
import { customElement, property, state, queryAssignedElements } from "lit/decorators.js";
|
|
10
10
|
import { label, description } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
11
11
|
import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
12
12
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
@@ -50,26 +50,18 @@ let Group = class Group extends LitElement {
|
|
|
50
50
|
super.willUpdate(changedProperties);
|
|
51
51
|
}
|
|
52
52
|
hasSlotOrProps() {
|
|
53
|
-
|
|
54
|
-
this.
|
|
55
|
-
this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) === null || _b === void 0 ? void 0 : _b.length) ? true : false;
|
|
53
|
+
this.hasLabel = this.label || this.slotLabelNodes?.length ? true : false;
|
|
54
|
+
this.hasDescription = this.description || this.slotDescriptionNodes?.length ? true : false;
|
|
56
55
|
}
|
|
57
56
|
render() {
|
|
58
57
|
const slotStyle = {
|
|
59
58
|
alignItems: this.alignItems,
|
|
60
59
|
};
|
|
61
60
|
return html `<span class="${this.hasLabel ? "form-label" : "hidden"}"
|
|
62
|
-
>${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
|
|
63
|
-
name="label"
|
|
64
|
-
@slotchange=${this.hasSlotOrProps}
|
|
65
|
-
></slot
|
|
61
|
+
>${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
|
|
66
62
|
></span>
|
|
67
63
|
<slot class="main-slot" style=${styleMap(slotStyle)}></slot>
|
|
68
|
-
<slot
|
|
69
|
-
name="description"
|
|
70
|
-
@slotchange=${this.hasSlotOrProps}
|
|
71
|
-
class="${this.hasDescription ? "form-description" : "hidden"}"
|
|
72
|
-
>
|
|
64
|
+
<slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription ? "form-description" : "hidden"}">
|
|
73
65
|
${this.description ? html `${unsafeHTML(this.description)}` : ""}
|
|
74
66
|
</slot>`;
|
|
75
67
|
}
|
|
@@ -109,10 +101,10 @@ __decorate([
|
|
|
109
101
|
property({ type: String })
|
|
110
102
|
], Group.prototype, "description", void 0);
|
|
111
103
|
__decorate([
|
|
112
|
-
|
|
104
|
+
queryAssignedElements({ slot: "label", flatten: true })
|
|
113
105
|
], Group.prototype, "slotLabelNodes", void 0);
|
|
114
106
|
__decorate([
|
|
115
|
-
|
|
107
|
+
queryAssignedElements({ slot: "description", flatten: true })
|
|
116
108
|
], Group.prototype, "slotDescriptionNodes", void 0);
|
|
117
109
|
__decorate([
|
|
118
110
|
state()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
1
|
+
import { LitElement, PropertyValues } from "lit";
|
|
2
2
|
import { DirectiveResult } from "lit/directive";
|
|
3
3
|
import { UnsafeHTMLDirective } from "lit/directives/unsafe-html";
|
|
4
4
|
/**
|
|
@@ -7,26 +7,20 @@ import { UnsafeHTMLDirective } from "lit/directives/unsafe-html";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class Icon extends LitElement {
|
|
9
9
|
static styles: import("lit").CSSResult;
|
|
10
|
-
|
|
11
|
-
updateIcon(): void;
|
|
10
|
+
updateIcon(): Promise<void>;
|
|
12
11
|
iconText: DirectiveResult<typeof UnsafeHTMLDirective> | string;
|
|
13
12
|
/**
|
|
14
13
|
* Nom identifiant l'icone ex : *info*
|
|
15
14
|
*/
|
|
16
|
-
|
|
17
|
-
get name(): string;
|
|
18
|
-
set name(newName: string);
|
|
15
|
+
name: string;
|
|
19
16
|
/**
|
|
20
17
|
* prefix de l'icone si nécessaire ex: *solid*. La valeur par défaut est "" qui est mappée sur *regular*
|
|
21
18
|
*/
|
|
22
|
-
|
|
23
|
-
get prefix(): string;
|
|
24
|
-
set prefix(newPrefix: string);
|
|
19
|
+
prefix: string;
|
|
25
20
|
/**
|
|
26
21
|
* library de l'icone url vers un dossier en lign conenant des icônes
|
|
27
22
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
set library(newLibrary: string);
|
|
23
|
+
library: string;
|
|
24
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
31
25
|
render(): DirectiveResult<typeof UnsafeHTMLDirective>;
|
|
32
26
|
}
|