@supersoniks/concorde 1.1.44 → 1.1.46
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 +39 -24
- package/concorde-core.es.js +907 -320
- package/core/components/functional/fetch/fetch.d.ts +2 -1
- package/core/components/functional/list/list.d.ts +3 -1
- package/core/components/functional/list/list.js +12 -7
- package/core/components/functional/queue/queue.d.ts +9 -2
- package/core/components/functional/queue/queue.js +131 -67
- package/core/components/functional/router/router.js +13 -4
- package/core/components/functional/sdui/sdui.d.ts +3 -2
- package/core/components/functional/sdui/sdui.js +1 -1
- package/core/components/functional/states/states.js +1 -0
- package/core/components/functional/value/value.js +3 -2
- package/core/components/ui/alert/alert.d.ts +3 -0
- package/core/components/ui/alert/alert.js +33 -1
- package/core/components/ui/badge/badge.d.ts +1 -1
- package/core/components/ui/badge/badge.js +9 -3
- package/core/components/ui/button/button.d.ts +1 -0
- package/core/components/ui/button/button.js +32 -28
- package/core/components/ui/form/checkbox/checkbox.d.ts +3 -0
- package/core/components/ui/form/checkbox/checkbox.js +14 -3
- package/core/components/ui/form/css/form-control.d.ts +1 -0
- package/core/components/ui/form/css/form-control.js +17 -0
- package/core/components/ui/form/input/input.d.ts +5 -3
- package/core/components/ui/form/input/input.js +47 -3
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +93 -13
- package/core/components/ui/form/input-autocomplete/input-autocomplete.js +181 -52
- package/core/components/ui/form/select/select.js +16 -4
- package/core/components/ui/form/textarea/textarea.d.ts +1 -0
- package/core/components/ui/group/group.js +7 -1
- package/core/components/ui/icon/icon.js +1 -1
- package/core/components/ui/modal/modal-close.js +2 -3
- package/core/components/ui/modal/modal-content.js +1 -0
- package/core/components/ui/modal/modal.d.ts +8 -0
- package/core/components/ui/modal/modal.js +34 -6
- package/core/components/ui/pop/pop.d.ts +5 -4
- package/core/components/ui/pop/pop.js +85 -44
- package/core/components/ui/theme/theme-collection/core-variables.js +18 -9
- package/core/components/ui/theme/theme.js +8 -3
- package/core/components/ui/tooltip/tooltip.js +3 -3
- package/core/mixins/Fetcher.d.ts +2 -1
- package/core/mixins/Fetcher.js +42 -10
- package/core/mixins/FormCheckable.d.ts +1 -0
- package/core/mixins/FormElement.d.ts +1 -0
- package/core/mixins/FormElement.js +6 -2
- package/core/mixins/FormInput.d.ts +1 -0
- package/core/mixins/Subscriber.d.ts +1 -0
- package/core/mixins/Subscriber.js +17 -12
- package/core/utils/PublisherProxy.d.ts +30 -3
- package/core/utils/PublisherProxy.js +218 -6
- package/core/utils/api.d.ts +29 -3
- package/core/utils/api.js +117 -24
- package/mixins.d.ts +4 -1
- package/package.json +7 -2
|
@@ -3,7 +3,67 @@ import "@supersoniks/concorde/core/components/ui/form/input/input";
|
|
|
3
3
|
import "@supersoniks/concorde/core/components/ui/pop/pop";
|
|
4
4
|
import "@supersoniks/concorde/core/components/functional/queue/queue";
|
|
5
5
|
import "@supersoniks/concorde/core/components/ui/menu/menu-item";
|
|
6
|
-
|
|
6
|
+
import { Size } from "../../_css/size";
|
|
7
|
+
type ListItem = Record<string, string>;
|
|
8
|
+
declare const InputAutocomplete_base: (new (...args: any[]) => import("../../../../mixins/TemplatesContainer").TemplatesContainerInterface) & {
|
|
9
|
+
new (...args: any[]): {
|
|
10
|
+
validateFormElement(): void;
|
|
11
|
+
forceAutoFill: boolean;
|
|
12
|
+
_type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
|
|
13
|
+
type: "number" | "search" | "file" | "button" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local" | "password";
|
|
14
|
+
_description?: string | undefined;
|
|
15
|
+
description: string | undefined;
|
|
16
|
+
_label?: string | undefined;
|
|
17
|
+
label: string | undefined;
|
|
18
|
+
tabindex?: number | undefined;
|
|
19
|
+
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;
|
|
20
|
+
getFormPublisher(): any;
|
|
21
|
+
updateDataValue(): void;
|
|
22
|
+
handleChange(e?: Event | undefined): void;
|
|
23
|
+
handleBlur(e?: Event | undefined): void;
|
|
24
|
+
getValueForFormPublisher(): string | object | string[] | null | undefined;
|
|
25
|
+
focus?: (() => void) | undefined;
|
|
26
|
+
shadowRoot?: ShadowRoot | undefined;
|
|
27
|
+
error: boolean;
|
|
28
|
+
autofocus: boolean;
|
|
29
|
+
required: boolean;
|
|
30
|
+
disabled: true | null;
|
|
31
|
+
formDataProvider: string;
|
|
32
|
+
ariaLabelledby?: string | undefined;
|
|
33
|
+
ariaLabel?: string | undefined;
|
|
34
|
+
_value: string | object | string[] | null | undefined;
|
|
35
|
+
value: string | object | string[] | null | undefined;
|
|
36
|
+
_name: string;
|
|
37
|
+
name: string;
|
|
38
|
+
props: import("../../../../_types/types").CoreJSType;
|
|
39
|
+
propertyMap: object;
|
|
40
|
+
isConnected: boolean;
|
|
41
|
+
children: HTMLCollection;
|
|
42
|
+
appendChild(node: Node): Node;
|
|
43
|
+
getAncestorAttributeValue(attributeName: string): string;
|
|
44
|
+
hasAncestorAttribute(attributeName: string): boolean;
|
|
45
|
+
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
46
|
+
publisher: any;
|
|
47
|
+
dataProvider: string | null;
|
|
48
|
+
noShadowDom: string | null;
|
|
49
|
+
debug: HTMLElement | null;
|
|
50
|
+
defferedDebug: boolean | null;
|
|
51
|
+
displayContents: boolean;
|
|
52
|
+
dispatchEvent(event: Event): void;
|
|
53
|
+
setAttribute(name: string, value: string): void;
|
|
54
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
55
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
56
|
+
removeAttribute(name: string): void;
|
|
57
|
+
initPublisher(): void;
|
|
58
|
+
getApiConfiguration(): import("../../../../utils/api").APIConfiguration;
|
|
59
|
+
connectedCallback(): void;
|
|
60
|
+
requestUpdate(): void;
|
|
61
|
+
getAttribute(name: string): string;
|
|
62
|
+
hasAttribute(attributeName: string): boolean;
|
|
63
|
+
disconnectedCallback(): void;
|
|
64
|
+
getBoundingClientRect(): DOMRect;
|
|
65
|
+
};
|
|
66
|
+
} & (new (...args: any[]) => import("../../../../mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<import("../../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
7
67
|
/**
|
|
8
68
|
* Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
|
|
9
69
|
* L'input permet de filtrer les choix de valeurs dans le sonic-pop.
|
|
@@ -11,24 +71,44 @@ declare const InputAutocomplete_base: (new (...args: any[]) => import("../../../
|
|
|
11
71
|
*/
|
|
12
72
|
export declare class InputAutocomplete extends InputAutocomplete_base {
|
|
13
73
|
static styles: import("lit").CSSResult[];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
_description?: string;
|
|
19
|
-
get description(): string | undefined;
|
|
20
|
-
set description(value: string | undefined);
|
|
21
|
-
_label?: string;
|
|
22
|
-
get label(): string | undefined;
|
|
23
|
-
set label(value: string | undefined);
|
|
74
|
+
/**
|
|
75
|
+
* Possibles mutualisation avec text
|
|
76
|
+
*/
|
|
77
|
+
size: Size;
|
|
24
78
|
placeholder: string;
|
|
25
79
|
filteredFields: string;
|
|
26
80
|
readonly: boolean | null;
|
|
27
81
|
dataProviderExpression: string;
|
|
82
|
+
select?: boolean;
|
|
28
83
|
key: string;
|
|
29
|
-
|
|
84
|
+
searchParameter: string;
|
|
85
|
+
/**
|
|
86
|
+
* Les dataProviders
|
|
87
|
+
*/
|
|
88
|
+
private searchDataProvider;
|
|
89
|
+
private initSearchDataProvider;
|
|
90
|
+
private queueDataProvider;
|
|
91
|
+
private initQueueDataProvider;
|
|
92
|
+
private lastValidSearch;
|
|
93
|
+
private searchPublisher?;
|
|
94
|
+
private countPublisher?;
|
|
95
|
+
private initCountPublisher?;
|
|
96
|
+
private formValuePublisher?;
|
|
97
|
+
/**
|
|
98
|
+
* Les fonctions de gestion
|
|
99
|
+
*/
|
|
100
|
+
private updateSearchParameter;
|
|
101
|
+
private initSearchParameter;
|
|
102
|
+
private selectListItem;
|
|
103
|
+
private findSearchedItem;
|
|
104
|
+
private findSelection;
|
|
105
|
+
private setSearchFromSelection;
|
|
106
|
+
private updateActiveSelection;
|
|
30
107
|
connectedCallback(): void;
|
|
31
|
-
|
|
108
|
+
disconnectedCallback(): void;
|
|
109
|
+
queryQueueListItem(queueDataProvider: string, itemFinder: (listItem: ListItem) => boolean, itemMutator: (listItem: ListItem) => void): void;
|
|
110
|
+
setSelectionRange(start: number, end: number): void;
|
|
111
|
+
handleHide(): void;
|
|
32
112
|
render(): import("lit-html").TemplateResult<1>;
|
|
33
113
|
}
|
|
34
114
|
export {};
|
|
@@ -4,87 +4,222 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, LitElement, css } from "lit";
|
|
7
|
+
import { html, LitElement, css, nothing } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
|
-
import { Subscriber, TemplatesContainer } from "@supersoniks/concorde/mixins";
|
|
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";
|
|
13
13
|
import "@supersoniks/concorde/core/components/ui/menu/menu-item";
|
|
14
14
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
15
|
+
import { PublisherManager } from "@supersoniks/concorde/utils";
|
|
15
16
|
/**
|
|
16
17
|
* Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
|
|
17
18
|
* L'input permet de filtrer les choix de valeurs dans le sonic-pop.
|
|
18
19
|
* La valeur de cet input est ensuite retransmit au premier via un dataProvider.
|
|
19
20
|
*/
|
|
20
|
-
let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(Subscriber(LitElement)) {
|
|
21
|
+
let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormInput(FormElement(Subscriber(LitElement)))) {
|
|
21
22
|
constructor() {
|
|
22
23
|
super(...arguments);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Possibles mutualisation avec text
|
|
26
|
+
*/
|
|
27
|
+
this.size = "md";
|
|
26
28
|
this.placeholder = "";
|
|
27
29
|
this.filteredFields = "";
|
|
28
30
|
this.readonly = null;
|
|
29
31
|
this.dataProviderExpression = "";
|
|
30
32
|
this.key = "";
|
|
31
|
-
this.
|
|
32
|
-
|
|
33
|
+
this.searchParameter = "";
|
|
34
|
+
/**
|
|
35
|
+
* Les dataProviders
|
|
36
|
+
*/
|
|
37
|
+
this.searchDataProvider = "";
|
|
38
|
+
this.initSearchDataProvider = "";
|
|
39
|
+
this.queueDataProvider = "";
|
|
40
|
+
this.initQueueDataProvider = "";
|
|
41
|
+
this.lastValidSearch = "";
|
|
42
|
+
/**
|
|
43
|
+
* Les fonctions de gestion
|
|
44
|
+
*/
|
|
45
|
+
this.updateSearchParameter = (value) => {
|
|
46
|
+
if (value == "") {
|
|
47
|
+
this.lastValidSearch = "";
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.queryQueueListItem(this.queueDataProvider, this.findSelection, this.setSearchFromSelection);
|
|
51
|
+
};
|
|
52
|
+
this.initSearchParameter = () => {
|
|
53
|
+
this.queryQueueListItem(this.initQueueDataProvider, this.findSelection, this.setSearchFromSelection);
|
|
54
|
+
};
|
|
55
|
+
this.selectListItem = (listItem) => {
|
|
56
|
+
var _a;
|
|
57
|
+
(_a = this.formValuePublisher) === null || _a === void 0 ? void 0 : _a.set(listItem[this.name]);
|
|
58
|
+
};
|
|
59
|
+
this.findSearchedItem = (listItem) => {
|
|
60
|
+
var _a;
|
|
61
|
+
return (listItem[this.searchParameter || this.name] == ((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()));
|
|
62
|
+
};
|
|
63
|
+
this.findSelection = (listItem) => {
|
|
64
|
+
return listItem[this.name] == this.value;
|
|
65
|
+
};
|
|
66
|
+
this.setSearchFromSelection = (listItem) => {
|
|
67
|
+
var _a;
|
|
68
|
+
this.lastValidSearch = listItem[this.searchParameter || this.name];
|
|
69
|
+
(_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.set(this.lastValidSearch);
|
|
70
|
+
};
|
|
71
|
+
this.updateActiveSelection = () => {
|
|
72
|
+
var _a, _b, _c;
|
|
73
|
+
this.queryQueueListItem(this.queueDataProvider, this.findSearchedItem, this.selectListItem);
|
|
74
|
+
if (!this.select &&
|
|
75
|
+
this.lastValidSearch &&
|
|
76
|
+
this.lastValidSearch != ((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()) &&
|
|
77
|
+
((_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.get())) {
|
|
78
|
+
(_c = this.formValuePublisher) === null || _c === void 0 ? void 0 : _c.set("");
|
|
79
|
+
}
|
|
80
|
+
};
|
|
33
81
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
82
|
+
connectedCallback() {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
super.connectedCallback();
|
|
85
|
+
/**
|
|
86
|
+
* Nom de la valeur de recherche
|
|
87
|
+
* Si non défini, on utilise name
|
|
88
|
+
**/
|
|
89
|
+
const searchParameter = this.searchParameter || this.name;
|
|
90
|
+
/**
|
|
91
|
+
* Nommage des différents dataProviders utilisés
|
|
92
|
+
*/
|
|
93
|
+
const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
|
|
94
|
+
const dpPrefix = formDataProvider + "__autocomplete";
|
|
95
|
+
this.initSearchDataProvider = `${dpPrefix}_init_search__`;
|
|
96
|
+
this.initQueueDataProvider = `${dpPrefix}_init_queue__`;
|
|
97
|
+
this.searchDataProvider = `${dpPrefix}_search__`;
|
|
98
|
+
this.queueDataProvider = `${dpPrefix}_queue__`;
|
|
99
|
+
/**
|
|
100
|
+
* Les publishers utilisés plusieurs fois dans la classe son miss en propriétés privées de la classe
|
|
101
|
+
*/
|
|
102
|
+
const getPublisher = PublisherManager.get;
|
|
103
|
+
this.searchPublisher = getPublisher(this.searchDataProvider)[searchParameter];
|
|
104
|
+
this.formValuePublisher = getPublisher(formDataProvider)[this.name];
|
|
105
|
+
this.countPublisher = getPublisher(this.queueDataProvider).resultCount;
|
|
106
|
+
this.initCountPublisher = getPublisher(this.initQueueDataProvider).resultCount;
|
|
107
|
+
/**
|
|
108
|
+
* Si une valeur est fourrnie a l'initialisation, un queue spécifique appelle le service avec le name founi en paramètre
|
|
109
|
+
* Pour récupérer la valeur de searchParameter correspondante et renseigner l'input
|
|
110
|
+
**/
|
|
111
|
+
if (this.value) {
|
|
112
|
+
PublisherManager.get(this.initSearchDataProvider)[this.name] = this.value;
|
|
113
|
+
}
|
|
114
|
+
(_a = this.initCountPublisher) === null || _a === void 0 ? void 0 : _a.onAssign(this.initSearchParameter);
|
|
115
|
+
/**
|
|
116
|
+
* Lorsque la sélection change, on met à jour la valeur de recherche
|
|
117
|
+
*/
|
|
118
|
+
(_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.onAssign(this.updateSearchParameter);
|
|
119
|
+
/**
|
|
120
|
+
* Lorsque La valeur de recherche change, que le composant n'est pas en mode select
|
|
121
|
+
* et qu'elle est différente de la derniere recherche valide on désactive la selection
|
|
122
|
+
*/
|
|
123
|
+
(_c = this.countPublisher) === null || _c === void 0 ? void 0 : _c.onAssign(this.updateActiveSelection);
|
|
45
124
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
125
|
+
disconnectedCallback() {
|
|
126
|
+
var _a, _b, _c;
|
|
127
|
+
super.disconnectedCallback();
|
|
128
|
+
(_a = this.initCountPublisher) === null || _a === void 0 ? void 0 : _a.offAssign(this.initSearchParameter);
|
|
129
|
+
(_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.offAssign(this.updateSearchParameter);
|
|
130
|
+
(_c = this.countPublisher) === null || _c === void 0 ? void 0 : _c.offAssign(this.updateActiveSelection);
|
|
131
|
+
const getPublisher = PublisherManager.get;
|
|
132
|
+
getPublisher(this.initSearchDataProvider).delete();
|
|
133
|
+
getPublisher(this.initQueueDataProvider).delete();
|
|
134
|
+
getPublisher(this.searchDataProvider).delete();
|
|
135
|
+
getPublisher(this.queueDataProvider).delete();
|
|
51
136
|
}
|
|
52
|
-
|
|
53
|
-
|
|
137
|
+
queryQueueListItem(queueDataProvider, itemFinder, itemMutator) {
|
|
138
|
+
const queuePublisher = PublisherManager.get(queueDataProvider);
|
|
139
|
+
let listItem;
|
|
140
|
+
const listsDescriptors = queuePublisher.get();
|
|
141
|
+
if (!Array.isArray(listsDescriptors))
|
|
142
|
+
return;
|
|
143
|
+
for (const listDescriptor of listsDescriptors) {
|
|
144
|
+
const list = PublisherManager.get(listDescriptor.dataProvider).get();
|
|
145
|
+
if (!Array.isArray(list))
|
|
146
|
+
continue;
|
|
147
|
+
listItem = list.find(itemFinder);
|
|
148
|
+
console.log(listItem);
|
|
149
|
+
if (listItem) {
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (listItem) {
|
|
154
|
+
itemMutator(listItem);
|
|
155
|
+
}
|
|
54
156
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this._label = value;
|
|
59
|
-
this.requestUpdate();
|
|
157
|
+
setSelectionRange(start, end) {
|
|
158
|
+
var _a;
|
|
159
|
+
(_a = this.querySelector("sonic-input")) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end);
|
|
60
160
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
161
|
+
handleHide() {
|
|
162
|
+
var _a, _b, _c;
|
|
163
|
+
if (!this.select)
|
|
164
|
+
return;
|
|
165
|
+
if (((_a = this.searchPublisher) === null || _a === void 0 ? void 0 : _a.get()) == "") {
|
|
166
|
+
this.lastValidSearch = "";
|
|
167
|
+
(_b = this.formValuePublisher) === null || _b === void 0 ? void 0 : _b.set("");
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
(_c = this.searchPublisher) === null || _c === void 0 ? void 0 : _c.set(this.lastValidSearch);
|
|
64
171
|
}
|
|
65
172
|
render() {
|
|
66
173
|
return html `
|
|
67
|
-
<sonic-pop
|
|
174
|
+
<sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
|
|
68
175
|
<sonic-input
|
|
176
|
+
debug
|
|
177
|
+
dataProvider="${this.initSearchDataProvider + Math.random()}"
|
|
178
|
+
formDataProvider="${this.searchDataProvider}"
|
|
69
179
|
type="search"
|
|
70
|
-
data-keyboard-nav="nav
|
|
180
|
+
data-keyboard-nav="${this.getAttribute("data-keyboard-nav") || ""}"
|
|
71
181
|
label="${ifDefined(this.label)}"
|
|
72
182
|
description="${ifDefined(this.description)}"
|
|
73
|
-
name="${ifDefined(this.name)}"
|
|
74
|
-
|
|
183
|
+
name="${ifDefined(this.searchParameter || this.name)}"
|
|
184
|
+
placeholder="${ifDefined(this.placeholder)}"
|
|
185
|
+
?readonly="${this.readonly}"
|
|
75
186
|
autocomplete="off"
|
|
76
187
|
clearable
|
|
77
|
-
|
|
188
|
+
inlineContent
|
|
189
|
+
size=${this.size}
|
|
190
|
+
>
|
|
191
|
+
${this.select
|
|
192
|
+
? html `
|
|
193
|
+
<sonic-icon
|
|
194
|
+
slot="suffix"
|
|
195
|
+
class="select-chevron"
|
|
196
|
+
name="nav-arrow-down"
|
|
197
|
+
.size=${this.size}
|
|
198
|
+
></sonic-icon>
|
|
199
|
+
`
|
|
200
|
+
: nothing}
|
|
201
|
+
</sonic-input>
|
|
78
202
|
<sonic-menu slot="content">
|
|
79
203
|
<sonic-queue
|
|
204
|
+
dataProvider="${this.queueDataProvider}"
|
|
80
205
|
filteredFields=${this.filteredFields}
|
|
81
206
|
dataProviderExpression="${this.dataProviderExpression}"
|
|
82
|
-
dataFilterProvider="${this.
|
|
207
|
+
dataFilterProvider="${this.searchDataProvider}"
|
|
83
208
|
key="${this.key}"
|
|
84
209
|
.templates=${this.templateList}
|
|
85
210
|
displayContents
|
|
86
211
|
>
|
|
87
212
|
</sonic-queue>
|
|
213
|
+
<sonic-queue
|
|
214
|
+
noLazyload
|
|
215
|
+
dataProvider="${this.initQueueDataProvider}"
|
|
216
|
+
filteredFields=${this.filteredFields}
|
|
217
|
+
dataProviderExpression="${this.dataProviderExpression}"
|
|
218
|
+
dataFilterProvider="${this.initSearchDataProvider}"
|
|
219
|
+
key="${this.key}"
|
|
220
|
+
displayContents
|
|
221
|
+
>
|
|
222
|
+
</sonic-queue>
|
|
88
223
|
</sonic-menu>
|
|
89
224
|
</sonic-pop>
|
|
90
225
|
`;
|
|
@@ -98,17 +233,8 @@ InputAutocomplete.styles = [
|
|
|
98
233
|
`,
|
|
99
234
|
];
|
|
100
235
|
__decorate([
|
|
101
|
-
property()
|
|
102
|
-
], InputAutocomplete.prototype, "
|
|
103
|
-
__decorate([
|
|
104
|
-
property()
|
|
105
|
-
], InputAutocomplete.prototype, "forceAutoFill", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
property()
|
|
108
|
-
], InputAutocomplete.prototype, "description", null);
|
|
109
|
-
__decorate([
|
|
110
|
-
property()
|
|
111
|
-
], InputAutocomplete.prototype, "label", null);
|
|
236
|
+
property({ type: String })
|
|
237
|
+
], InputAutocomplete.prototype, "size", void 0);
|
|
112
238
|
__decorate([
|
|
113
239
|
property({ type: String })
|
|
114
240
|
], InputAutocomplete.prototype, "placeholder", void 0);
|
|
@@ -121,12 +247,15 @@ __decorate([
|
|
|
121
247
|
__decorate([
|
|
122
248
|
property({ type: String })
|
|
123
249
|
], InputAutocomplete.prototype, "dataProviderExpression", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
property({ type: Boolean })
|
|
252
|
+
], InputAutocomplete.prototype, "select", void 0);
|
|
124
253
|
__decorate([
|
|
125
254
|
property({ type: String })
|
|
126
255
|
], InputAutocomplete.prototype, "key", void 0);
|
|
127
256
|
__decorate([
|
|
128
257
|
property({ type: String })
|
|
129
|
-
], InputAutocomplete.prototype, "
|
|
258
|
+
], InputAutocomplete.prototype, "searchParameter", void 0);
|
|
130
259
|
InputAutocomplete = __decorate([
|
|
131
260
|
customElement("sonic-input-autocomplete")
|
|
132
261
|
], InputAutocomplete);
|
|
@@ -203,9 +203,16 @@ Select.styles = [
|
|
|
203
203
|
opacity: 0;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
@supports selector(:has(*)) {
|
|
207
|
+
:host(:not([disabled])) .form-element:not(:has(option:only-child)) {
|
|
208
|
+
padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/*Firefox etc.*/
|
|
212
|
+
@supports not selector(:has(*)) {
|
|
213
|
+
:host(:not([disabled])) .form-element {
|
|
214
|
+
padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
|
|
215
|
+
}
|
|
209
216
|
}
|
|
210
217
|
|
|
211
218
|
.form-select-wrapper {
|
|
@@ -223,10 +230,15 @@ Select.styles = [
|
|
|
223
230
|
}
|
|
224
231
|
|
|
225
232
|
option {
|
|
226
|
-
padding: 0.1rem
|
|
233
|
+
padding: 0.1rem var(--sc-input-px);
|
|
227
234
|
color: var(--sc-base-content);
|
|
228
235
|
background: var(--sc-base);
|
|
229
236
|
}
|
|
237
|
+
|
|
238
|
+
select[multiple] option {
|
|
239
|
+
background: transparent;
|
|
240
|
+
padding: 0;
|
|
241
|
+
}
|
|
230
242
|
`,
|
|
231
243
|
];
|
|
232
244
|
__decorate([
|
|
@@ -55,6 +55,7 @@ declare const Textarea_base: {
|
|
|
55
55
|
getAttribute(name: string): string;
|
|
56
56
|
hasAttribute(attributeName: string): boolean;
|
|
57
57
|
disconnectedCallback(): void;
|
|
58
|
+
getBoundingClientRect(): DOMRect;
|
|
58
59
|
};
|
|
59
60
|
} & (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;
|
|
60
61
|
export declare class Textarea extends Textarea_base {
|
|
@@ -19,7 +19,7 @@ let Group = class Group extends LitElement {
|
|
|
19
19
|
this.hasLabel = false;
|
|
20
20
|
}
|
|
21
21
|
updated() {
|
|
22
|
-
const children = this.querySelectorAll("sonic-input, sonic-button");
|
|
22
|
+
const children = this.querySelectorAll("sonic-input, sonic-button, sonic-select");
|
|
23
23
|
const nbChildren = children.length;
|
|
24
24
|
if (nbChildren > 1) {
|
|
25
25
|
children.forEach((item, index) => {
|
|
@@ -91,6 +91,12 @@ Group.styles = [
|
|
|
91
91
|
.hidden {
|
|
92
92
|
display: none;
|
|
93
93
|
}
|
|
94
|
+
|
|
95
|
+
::slotted(sonic-button),
|
|
96
|
+
::slotted(sonic-input),
|
|
97
|
+
::slotted(sonic-select) {
|
|
98
|
+
flex-grow: 1;
|
|
99
|
+
}
|
|
94
100
|
`,
|
|
95
101
|
];
|
|
96
102
|
__decorate([
|
|
@@ -44,7 +44,7 @@ let Icon = class Icon extends LitElement {
|
|
|
44
44
|
return;
|
|
45
45
|
this.renderId++;
|
|
46
46
|
const frameRenderId = this.renderId;
|
|
47
|
-
window.requestAnimationFrame(() => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
(window.queueMicrotask || window.requestAnimationFrame)(() => __awaiter(this, void 0, void 0, function* () {
|
|
48
48
|
if (frameRenderId != this.renderId) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
@@ -26,9 +26,8 @@ ModalClose.styles = [
|
|
|
26
26
|
display: block;
|
|
27
27
|
align-self: flex-end;
|
|
28
28
|
height: 0;
|
|
29
|
-
top: 0;
|
|
30
|
-
|
|
31
|
-
padding-right: 0.5rem;
|
|
29
|
+
top: 0.5rem;
|
|
30
|
+
right: 0.5rem;
|
|
32
31
|
transform: translate3d(calc(var(--sc-modal-px)), calc(-1 * var(--sc-modal-py)), 0);
|
|
33
32
|
z-index: 20;
|
|
34
33
|
}
|
|
@@ -6,17 +6,25 @@ import "@supersoniks/concorde/core/components/ui/modal/modal-subtitle";
|
|
|
6
6
|
import "@supersoniks/concorde/core/components/ui/modal/modal-title";
|
|
7
7
|
declare type ModalCreateOptions = {
|
|
8
8
|
content?: string;
|
|
9
|
+
zIndex?: string;
|
|
10
|
+
paddingX?: string;
|
|
11
|
+
paddingY?: string;
|
|
12
|
+
width?: string;
|
|
13
|
+
maxWidth?: string;
|
|
14
|
+
removeOnHide?: boolean;
|
|
9
15
|
};
|
|
10
16
|
declare const Modal_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("@supersoniks/concorde/core/_types/types").CoreJSType>) & typeof LitElement;
|
|
11
17
|
export declare class Modal extends Modal_base {
|
|
12
18
|
static styles: import("lit").CSSResult[];
|
|
13
19
|
forceAction: boolean;
|
|
20
|
+
removeOnHide: boolean;
|
|
14
21
|
align: "center" | "right" | "left";
|
|
15
22
|
padding: string;
|
|
16
23
|
maxWidth: string;
|
|
17
24
|
maxHeight: string;
|
|
18
25
|
width: string;
|
|
19
26
|
height: string;
|
|
27
|
+
zIndex: string;
|
|
20
28
|
fullScreen: boolean;
|
|
21
29
|
visible: boolean;
|
|
22
30
|
modalWrapper: HTMLDivElement;
|