@supersoniks/concorde 1.1.47 → 1.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/concorde-core.bundle.js +16 -16
- package/concorde-core.es.js +254 -96
- package/core/components/functional/fetch/fetch.d.ts +4 -0
- package/core/components/functional/list/list.d.ts +4 -0
- package/core/components/functional/queue/queue.d.ts +2 -0
- package/core/components/functional/queue/queue.js +37 -11
- package/core/components/functional/sdui/sdui.d.ts +4 -0
- package/core/components/ui/badge/badge.js +3 -4
- package/core/components/ui/button/button.d.ts +4 -0
- package/core/components/ui/form/checkbox/checkbox.d.ts +8 -0
- package/core/components/ui/form/css/form-control.js +7 -5
- package/core/components/ui/form/form-layout/form-layout.js +3 -1
- package/core/components/ui/form/input/input.d.ts +8 -1
- package/core/components/ui/form/input/input.js +10 -3
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +102 -13
- package/core/components/ui/form/input-autocomplete/input-autocomplete.js +212 -53
- package/core/components/ui/form/textarea/textarea.d.ts +4 -0
- package/core/components/ui/modal/modal.d.ts +2 -0
- package/core/components/ui/modal/modal.js +6 -3
- package/core/components/ui/pop/pop.js +17 -6
- package/core/decorators/Subscriber.d.ts +3 -0
- package/core/decorators/Subscriber.js +78 -0
- package/core/mixins/Fetcher.d.ts +7 -1
- package/core/mixins/FormCheckable.d.ts +4 -0
- package/core/mixins/FormElement.d.ts +1 -0
- package/core/mixins/FormElement.js +6 -2
- package/core/mixins/FormInput.d.ts +5 -4
- package/core/mixins/Subscriber.d.ts +4 -0
- package/core/mixins/Subscriber.js +30 -4
- package/mixins.d.ts +12 -0
- package/package.json +2 -2
- package/concorde-customer.bundle.js +0 -129
- package/concorde-customer.es.js +0 -22004
package/concorde-core.es.js
CHANGED
|
@@ -1179,6 +1179,26 @@ const Subscriber$1 = (superClass, type) => {
|
|
|
1179
1179
|
this.props = v2;
|
|
1180
1180
|
};
|
|
1181
1181
|
}
|
|
1182
|
+
onConnected(callback) {
|
|
1183
|
+
if (!this.connectedCallbackCalls)
|
|
1184
|
+
this.connectedCallbackCalls = /* @__PURE__ */ new Set();
|
|
1185
|
+
this.connectedCallbackCalls.add(callback);
|
|
1186
|
+
}
|
|
1187
|
+
onDisconnected(callback) {
|
|
1188
|
+
if (!this.disconnectedCallbackCalls)
|
|
1189
|
+
this.disconnectedCallbackCalls = /* @__PURE__ */ new Set();
|
|
1190
|
+
this.disconnectedCallbackCalls.add(callback);
|
|
1191
|
+
}
|
|
1192
|
+
offConnected(callback) {
|
|
1193
|
+
if (!this.connectedCallbackCalls)
|
|
1194
|
+
this.connectedCallbackCalls = /* @__PURE__ */ new Set();
|
|
1195
|
+
this.connectedCallbackCalls.delete(callback);
|
|
1196
|
+
}
|
|
1197
|
+
offDisconnected(callback) {
|
|
1198
|
+
if (!this.disconnectedCallbackCalls)
|
|
1199
|
+
this.disconnectedCallbackCalls = /* @__PURE__ */ new Set();
|
|
1200
|
+
this.disconnectedCallbackCalls.delete(callback);
|
|
1201
|
+
}
|
|
1182
1202
|
hasAncestorAttribute(attributeName) {
|
|
1183
1203
|
return this.getAncestorAttributeValue(attributeName) != null;
|
|
1184
1204
|
}
|
|
@@ -1213,6 +1233,7 @@ const Subscriber$1 = (superClass, type) => {
|
|
|
1213
1233
|
this.style.removeProperty("display");
|
|
1214
1234
|
}
|
|
1215
1235
|
connectedCallback() {
|
|
1236
|
+
var _a2;
|
|
1216
1237
|
_SubscriberElement.instanceCounter++;
|
|
1217
1238
|
if (this.hasAttribute("lazyRendering")) {
|
|
1218
1239
|
const options = {
|
|
@@ -1239,9 +1260,11 @@ const Subscriber$1 = (superClass, type) => {
|
|
|
1239
1260
|
this.addDebugger();
|
|
1240
1261
|
}
|
|
1241
1262
|
super.connectedCallback();
|
|
1263
|
+
(_a2 = this.connectedCallbackCalls) == null ? void 0 : _a2.forEach((cb) => cb(this));
|
|
1242
1264
|
}
|
|
1243
1265
|
disconnectedCallback() {
|
|
1244
|
-
var _a2;
|
|
1266
|
+
var _a2, _b;
|
|
1267
|
+
(_a2 = this.disconnectedCallbackCalls) == null ? void 0 : _a2.forEach((cb) => cb(this));
|
|
1245
1268
|
this.removeDebugger();
|
|
1246
1269
|
super.disconnectedCallback();
|
|
1247
1270
|
if (this.publisher) {
|
|
@@ -1251,7 +1274,7 @@ const Subscriber$1 = (superClass, type) => {
|
|
|
1251
1274
|
if (this.wordingPublisher)
|
|
1252
1275
|
this.wordingPublisher.stopTemplateFilling(this);
|
|
1253
1276
|
if (this.onAssign)
|
|
1254
|
-
(
|
|
1277
|
+
(_b = this.publisher) == null ? void 0 : _b.offAssign(this.onAssign);
|
|
1255
1278
|
}
|
|
1256
1279
|
addDebugger() {
|
|
1257
1280
|
var _a2;
|
|
@@ -1342,7 +1365,8 @@ const Subscriber$1 = (superClass, type) => {
|
|
|
1342
1365
|
}
|
|
1343
1366
|
if (!hasWording)
|
|
1344
1367
|
return;
|
|
1345
|
-
const publisher = PublisherManager$1.get("sonic-wording");
|
|
1368
|
+
const publisher = PublisherManager$1.get("sonic-wording", { localStorageMode: "enabled" });
|
|
1369
|
+
await PublisherManager$1.getInstance().isLocalStrorageReady;
|
|
1346
1370
|
const wordingProvider = this.getAncestorAttributeValue("wordingProvider");
|
|
1347
1371
|
const api2 = new API(this.getApiConfiguration());
|
|
1348
1372
|
if (wordingProvider) {
|
|
@@ -1358,7 +1382,8 @@ const Subscriber$1 = (superClass, type) => {
|
|
|
1358
1382
|
}
|
|
1359
1383
|
}
|
|
1360
1384
|
if (wordings.length > 0) {
|
|
1361
|
-
const
|
|
1385
|
+
const calledURL = wordingProvider + "?labels[]=" + wordings.join("&labels[]=");
|
|
1386
|
+
const result = await api2.get(calledURL);
|
|
1362
1387
|
for (const elt in result) {
|
|
1363
1388
|
publisher["wording_" + elt] = result[elt];
|
|
1364
1389
|
}
|
|
@@ -2597,15 +2622,20 @@ const Form$2 = (superClass) => {
|
|
|
2597
2622
|
next = loop[index - 1];
|
|
2598
2623
|
}
|
|
2599
2624
|
}
|
|
2600
|
-
const elt = (_a2 = next == null ? void 0 : next.shadowRoot) == null ? void 0 : _a2.querySelector(
|
|
2625
|
+
const elt = (_a2 = next == null ? void 0 : next.shadowRoot) == null ? void 0 : _a2.querySelector(
|
|
2626
|
+
selector
|
|
2627
|
+
);
|
|
2601
2628
|
if (elt && elt.focus) {
|
|
2602
2629
|
elt.focus();
|
|
2603
2630
|
e2.preventDefault();
|
|
2631
|
+
e2.stopPropagation();
|
|
2604
2632
|
}
|
|
2605
2633
|
});
|
|
2606
2634
|
}
|
|
2607
2635
|
connectedCallback() {
|
|
2608
|
-
this.formDataProvider = this.getAncestorAttributeValue(
|
|
2636
|
+
this.formDataProvider = this.getAncestorAttributeValue(
|
|
2637
|
+
"formDataProvider"
|
|
2638
|
+
);
|
|
2609
2639
|
super.connectedCallback();
|
|
2610
2640
|
this.addKeyboardNavigation();
|
|
2611
2641
|
}
|
|
@@ -4612,6 +4642,7 @@ let Queue = class extends Subscriber$1(s$3) {
|
|
|
4612
4642
|
this.resultCount = 0;
|
|
4613
4643
|
this.noLazyload = false;
|
|
4614
4644
|
this.filteredFields = "";
|
|
4645
|
+
this.instanceId = 0;
|
|
4615
4646
|
this.localStorage = "disabled";
|
|
4616
4647
|
this.filterPublisher = null;
|
|
4617
4648
|
this.searchHash = "";
|
|
@@ -4631,19 +4662,22 @@ let Queue = class extends Subscriber$1(s$3) {
|
|
|
4631
4662
|
return;
|
|
4632
4663
|
}
|
|
4633
4664
|
async connectedCallback() {
|
|
4665
|
+
this.instanceId = Queue.instanceCounter++;
|
|
4634
4666
|
this.localStorage = this.getAttribute("localStorage") || this.localStorage;
|
|
4635
4667
|
this.removeAttribute("localStorage");
|
|
4636
4668
|
this.noShadowDom = "";
|
|
4637
4669
|
this.defferedDebug = this.hasAttribute("debug") || null;
|
|
4638
4670
|
if (!this.dataProvider)
|
|
4639
|
-
this.dataProvider = this.dataProviderExpression || "sonic-queue-" +
|
|
4671
|
+
this.dataProvider = this.dataProviderExpression || "sonic-queue-" + this.instanceId + "-" + Math.random().toString(36).substring(7);
|
|
4640
4672
|
if (!this.dataProviderExpression) {
|
|
4641
4673
|
this.dataProviderExpression = HTML.getAncestorAttributeValue(this.parentElement, "dataProvider") || "";
|
|
4642
4674
|
}
|
|
4643
4675
|
super.connectedCallback();
|
|
4644
4676
|
this.key = this.getAttribute("key");
|
|
4645
4677
|
if (!this.templates)
|
|
4646
|
-
this.templates = Array.from(
|
|
4678
|
+
this.templates = Array.from(
|
|
4679
|
+
this.querySelectorAll("template")
|
|
4680
|
+
);
|
|
4647
4681
|
this.lastRequestTime = new Date().getTime();
|
|
4648
4682
|
await PublisherManager$1.getInstance().isLocalStrorageReady;
|
|
4649
4683
|
this.configFilter();
|
|
@@ -4707,6 +4741,7 @@ let Queue = class extends Subscriber$1(s$3) {
|
|
|
4707
4741
|
const newTime = new Date().getTime();
|
|
4708
4742
|
const requestDuration = newTime - this.lastRequestTime;
|
|
4709
4743
|
if (!this.nextHadEvent && e2) {
|
|
4744
|
+
this.publisher.resultCount = 0;
|
|
4710
4745
|
this.resultCount = 0;
|
|
4711
4746
|
}
|
|
4712
4747
|
this.nextHadEvent = !!e2;
|
|
@@ -4729,7 +4764,9 @@ let Queue = class extends Subscriber$1(s$3) {
|
|
|
4729
4764
|
offset = parseInt(item.offset.toString()) + parseInt(item.limit.toString());
|
|
4730
4765
|
}
|
|
4731
4766
|
if (requestDuration > 0 && e2 && !this.localStorage)
|
|
4732
|
-
this.limit = Math.round(
|
|
4767
|
+
this.limit = Math.round(
|
|
4768
|
+
this.limit / requestDuration * this.targetRequestDuration
|
|
4769
|
+
);
|
|
4733
4770
|
if (this.limit < 1)
|
|
4734
4771
|
this.limit = 1;
|
|
4735
4772
|
if (this.limit > 15)
|
|
@@ -4741,7 +4778,7 @@ let Queue = class extends Subscriber$1(s$3) {
|
|
|
4741
4778
|
const filterData = (_a2 = this.filterPublisher) == null ? void 0 : _a2.get();
|
|
4742
4779
|
const filteredFieldsArray = this.filteredFields.split(" ");
|
|
4743
4780
|
for (const f2 in filterData) {
|
|
4744
|
-
if (this.filteredFields &&
|
|
4781
|
+
if (this.filteredFields && filteredFieldsArray.includes(f2) || filterData[f2] == null || filterData[f2] == "")
|
|
4745
4782
|
continue;
|
|
4746
4783
|
searchParams.set(f2, filterData[f2]);
|
|
4747
4784
|
}
|
|
@@ -4753,7 +4790,8 @@ let Queue = class extends Subscriber$1(s$3) {
|
|
|
4753
4790
|
...this.props,
|
|
4754
4791
|
{
|
|
4755
4792
|
id: searchParams.toString() + "/" + this.props.length,
|
|
4756
|
-
dataProvider,
|
|
4793
|
+
dataProvider: dataProvider + "_item_from_queue_" + this.instanceId,
|
|
4794
|
+
endPoint: dataProvider,
|
|
4757
4795
|
offset,
|
|
4758
4796
|
limit: this.limit
|
|
4759
4797
|
}
|
|
@@ -4765,10 +4803,16 @@ let Queue = class extends Subscriber$1(s$3) {
|
|
|
4765
4803
|
render() {
|
|
4766
4804
|
if (!Array.isArray(this.props))
|
|
4767
4805
|
return b$1;
|
|
4806
|
+
let lazyload = !this.noLazyload;
|
|
4807
|
+
if (this.props.length == 1) {
|
|
4808
|
+
lazyload = false;
|
|
4809
|
+
}
|
|
4768
4810
|
return y`${o$1(this.props, (item, index) => {
|
|
4769
4811
|
var _a2;
|
|
4770
|
-
const templates = index == 0 ? this.templates : (_a2 = this.templates) == null ? void 0 : _a2.filter(
|
|
4771
|
-
|
|
4812
|
+
const templates = index == 0 ? this.templates : (_a2 = this.templates) == null ? void 0 : _a2.filter(
|
|
4813
|
+
(elt) => elt.getAttribute("data-value") != "no-item"
|
|
4814
|
+
);
|
|
4815
|
+
return y`<sonic-list fetch cache="${this.cache}" displayContents lazyBoundsRatio="${this.lazyBoundsRatio}" ?lazyload="${lazyload}" localStorage="${this.localStorage}" requestId="${this.requestId}" .itemPropertyMap="${this.itemPropertyMap}" ?debug="${this.defferedDebug === true}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${item.dataProvider}" endPoint="${item.endPoint}" idKey="${this.idKey}" .templates="${templates}"></sonic-list>`;
|
|
4772
4816
|
})}`;
|
|
4773
4817
|
}
|
|
4774
4818
|
};
|
|
@@ -6602,7 +6646,7 @@ let Badge = class extends s$3 {
|
|
|
6602
6646
|
};
|
|
6603
6647
|
Badge.styles = [
|
|
6604
6648
|
fontSize,
|
|
6605
|
-
i$4`:host{--sc-badge-gap:0.3em;--sc-badge-py:0.17em;--sc-badge-px:0.66em;--sc-fs:1rem;--sc-badge-color:var(--sc-base-content, #1f2937);--sc-badge-bg:var(--sc-base-
|
|
6649
|
+
i$4`:host{--sc-badge-gap:0.3em;--sc-badge-py:0.17em;--sc-badge-px:0.66em;--sc-fs:1rem;--sc-badge-color:var(--sc-base-content, #1f2937);--sc-badge-bg:var(--sc-base-100, #e5e7eb);--sc-badge-border-with:var(--sc-form-border-width, 0.1rem);--sc-badge-border-color:transparent;--sc-badge-border:var(--sc-badge-border-with) solid var(--sc-badge-border-color);--sc-badge-rounded:0.85em;--sc-badge-fw:var(--sc-font-weight-base);display:inline-flex;align-items:center;box-sizing:border-box;line-height:var(--sc-lh);border-radius:var(--sc-badge-rounded);background:var(--sc-badge-bg);color:var(--sc-badge-color);font-family:var(--sc-badge-ff,var(--sc-font-family-base,inherit));font-weight:var(--sc-badge-fw);padding-top:var(--sc-badge-py);padding-bottom:var(--sc-badge-py);padding-left:var(--sc-badge-px);padding-right:var(--sc-badge-px);min-height:calc(var(--sc-badge-px) * 2);border:var(--sc-badge-border);-webkit-print-color-adjust:exact}:host([type=primary]){--sc-badge-color:var(--sc-primary-content);--sc-badge-bg:var(--sc-primary)}:host([type=warning]){--sc-badge-color:var(--sc-warning-content);--sc-badge-bg:var(--sc-warning)}:host([type=danger]){--sc-badge-color:var(--sc-danger-content);--sc-badge-bg:var(--sc-danger)}:host([type=info]){--sc-badge-color:var(--sc-info-content);--sc-badge-bg:var(--sc-info)}:host([type=success]){--sc-badge-color:var(--sc-success-content);--sc-badge-bg:var(--sc-success)}:host([type=neutral]){--sc-badge-color:var(--sc-base);--sc-badge-bg:var(--sc-base-content)}:host{font-size:var(--sc-fs);gap:var(--sc-badge-gap)}:host([size="2xs"]){--sc-badge-gap:0.35em}:host([size=xs]){--sc-badge-gap:0.35em}:host([size=sm]){--sc-badge-gap:0.35em}:host([size=lg]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([size=xl]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([contrast]){--sc-badge-color:var(--sc-contrast-content);--sc-badge-bg:var(--sc-contrast)}:host([variant=outline][type]){border-width:var(--sc-badge-border-with)!important;border-color:var(--sc-badge-bg);color:var(--sc-badge-bg);background:0 0}:host([variant=outline][type=default]){border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=ghost][type]){color:var(--sc-badge-bg);background:0 0;padding:0}:host([variant=ghost][type=default]){color:var(--sc-badge-color);background:0 0}:host([ellipsis]){flex-wrap:nowrap;white-space:nowrap;max-width:100%}:host([ellipsis]) slot{overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;max-width:100%}slot[name=prefix],slot[name=suffix]{flex-shrink:0}`
|
|
6606
6650
|
];
|
|
6607
6651
|
__decorateClass$I([
|
|
6608
6652
|
e$7({ type: String, reflect: true })
|
|
@@ -6754,7 +6798,7 @@ Progress = __decorateClass$G([
|
|
|
6754
6798
|
const passwordToggle = i$4`.password-toggle{color:var(--sc-input-c);font-size:var(--sc-input-fs);cursor:pointer;margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-suffix .password-toggle{margin-right:0}`;
|
|
6755
6799
|
const label = i$4`:host{--sc-label-fs:var(--sc-fs, 1rem);--sc-label-fw:var(--sc-label-font-weight)}label{font-size:var(--sc-label-fs);font-weight:var(--sc-label-fw);line-height:1.2}.form-label{margin-bottom:.22em;display:block}`;
|
|
6756
6800
|
const description = i$4`.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}`;
|
|
6757
|
-
const formControl = i$4`*{box-sizing:border-box}:host{--sc-input-height:var(--sc-form-height);--sc-input-c:var(--sc-input-color, var(--sc-base-content));--sc-input-b-width:var(--sc-form-border-width);--sc-input-b-color:var(--sc-input-border-color);--sc-item-rounded-tr:var(--sc-input-rounded);--sc-item-rounded-tl:var(--sc-input-rounded);--sc-item-rounded-bl:var(--sc-input-rounded);--sc-item-rounded-br:var(--sc-input-rounded);--sc-input-fs:var(--sc-fs, 1rem);--sc-input-ff:inherit;--sc-input-py:0.55em;--sc-input-px:clamp(0.3em, 8%, 1.1em);--sc-input-background:var(--sc-input-bg);--sc-input-addon-c:var(--sc-input-addon-color, var(--sc-base));--sc-input-addon-bg:var(--sc-input-c)}.form-element{display:block;flex-grow:1;width:100%;line-height:1.1;color:var(--sc-input-c);border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);font-family:var(--sc-input-ff);background-color:var(--sc-input-background);border:var(--sc-input-b-width) solid var(--sc-input-b-color,var(--sc-base-300,#aaa));width:100%;font-size:var(--sc-input-fs);padding-top:var(--sc-input-py);padding-bottom:var(--sc-input-py);padding-left:var(--sc-input-px);padding-right:var(--sc-input-px);min-height:var(--sc-input-height)}.form-control{display:flex;width:100%}:host(:not([inlineContent])) .has-prefix slot[name=prefix],:host(:not([inlineContent])) .has-suffix slot[name=suffix]{min-width:var(--sc-input-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1.1;flex-shrink:0;padding-left:clamp(.25em,3%,calc(.33 * var(--sc-input-px)));padding-right:clamp(.25em,3%,calc(.33 * var(--sc-input-px)))}:host(:not([inlineContent])) slot[name=prefix]{border-radius:var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) slot[name=suffix]{border-radius:0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) .has-prefix .form-element{border-top-left-radius:0;border-bottom-left-radius:0}:host(:not([inlineContent])) .has-suffix .form-element{border-top-right-radius:0;border-bottom-right-radius:0}slot[name=prefix]::slotted(sonic-icon),slot[name=suffix]::slotted(sonic-icon){font-size:1.2em}.form-element .form-element,.form-element>slot{all:unset}:host([inlineContent]) .form-element{display:flex;align-items:center;gap:.35em;min-height:var(--sc-form-height)}:host([inlineContent]) .form-element .form-element{appearance:none;background:0 0;border:none;padding:0;display:block;width:50%;min-width:0;flex:1 1 auto;height:auto;min-height:auto;border-radius:0}:host([inlineContent]) slot[name=prefix]::slotted(*),:host([inlineContent]) slot[name=suffix]::slotted(*){display:block;flex:0 0 auto;max-width:100%;max-width:100
|
|
6801
|
+
const formControl = i$4`*{box-sizing:border-box}:host{--sc-input-height:var(--sc-form-height);--sc-input-c:var(--sc-input-color, var(--sc-base-content));--sc-input-b-width:var(--sc-form-border-width);--sc-input-b-color:var(--sc-input-border-color);--sc-item-rounded-tr:var(--sc-input-rounded);--sc-item-rounded-tl:var(--sc-input-rounded);--sc-item-rounded-bl:var(--sc-input-rounded);--sc-item-rounded-br:var(--sc-input-rounded);--sc-input-fs:var(--sc-fs, 1rem);--sc-input-ff:inherit;--sc-input-py:0.55em;--sc-input-px:clamp(0.3em, 8%, 1.1em);--sc-input-background:var(--sc-input-bg);--sc-input-addon-c:var(--sc-input-addon-color, var(--sc-base));--sc-input-addon-bg:var(--sc-input-c)}.form-element{display:block;flex-grow:1;width:100%;line-height:1.1;color:var(--sc-input-c);border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);font-family:var(--sc-input-ff);background-color:var(--sc-input-background);border:var(--sc-input-b-width) solid var(--sc-input-b-color,var(--sc-base-300,#aaa));width:100%;font-size:var(--sc-input-fs);padding-top:var(--sc-input-py);padding-bottom:var(--sc-input-py);padding-left:var(--sc-input-px);padding-right:var(--sc-input-px);min-height:var(--sc-input-height)}.form-control{display:flex;width:100%}:host(:not([inlineContent])) .has-prefix slot[name=prefix],:host(:not([inlineContent])) .has-suffix slot[name=suffix]{min-width:var(--sc-input-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1.1;flex-shrink:0;padding-left:clamp(.25em,3%,calc(.33 * var(--sc-input-px)));padding-right:clamp(.25em,3%,calc(.33 * var(--sc-input-px)))}:host(:not([inlineContent])) slot[name=prefix]{border-radius:var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) slot[name=suffix]{border-radius:0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) .has-prefix .form-element{border-top-left-radius:0;border-bottom-left-radius:0}:host(:not([inlineContent])) .has-suffix .form-element{border-top-right-radius:0;border-bottom-right-radius:0}slot[name=prefix]::slotted(sonic-icon),slot[name=suffix]::slotted(sonic-icon){font-size:1.2em}.form-element .form-element,.form-element>slot{all:unset}:host([inlineContent]) .form-element{display:flex;align-items:center;gap:.35em;min-height:var(--sc-form-height)}:host([inlineContent]) .form-element .form-element{appearance:none;background:0 0;border:none;padding:0;display:block;width:50%;min-width:0;flex:1 1 auto;height:auto;min-height:auto;border-radius:0}:host([inlineContent]) slot[name=prefix]::slotted(*),:host([inlineContent]) slot[name=suffix]::slotted(*){display:block;flex:0 0 auto;max-width:100%;max-width:100%;white-space:nowrap}:host([inlineContent]) .has-suffix slot[name=suffix]{margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-prefix slot[name=prefix]{margin-left:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) slot[name=suffix]::slotted(*){margin-left:auto}:host([inlineContent]) .no-prefix slot[name=prefix],:host([inlineContent]) .no-suffix slot[name=suffix]{display:none}:host([disabled]) .form-control{cursor:not-allowed}:host([variant=ghost]) .form-element{--sc-input-bg:transparent}:host([disabled]) .form-element{pointer-events:none;opacity:.5}:host([disabled]) .select-chevron{display:none}::placeholder{color:inherit;opacity:.45}:host([placehoderAsLabel]) ::placeholder{opacity:1}:focus::placeholder{opacity:0!important}.form-element:focus,.form-element:focus-visible,:host(:not([disabled])) .form-element:hover{filter:brightness(.97);outline:0}.form-label{margin-bottom:.22em;display:block}.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}.hidden{display:none}.contents{display:contents}:host([error]){--sc-input-b-color:var(--sc-danger)}:host input:visited{display:none}:host([touched][required]) :not(:focus):invalid{--sc-input-b-color:var(--sc-danger);--sc-input-c:var(--sc-danger)}:host([touched][required]) :not(:focus):invalid+.select-chevron{--sc-input-c:var(--sc-danger)}:host([touched][required]) :not([value=""]):not(:focus):valid{--sc-input-b-color:var(--sc-success);--sc-input-c:var(--sc-success)}:host([touched][required]) :not(:focus):valid+.select-chevron{--sc-input-c:var(--sc-success)}:host([type=color]) .form-element{padding:0;border:0;min-width:var(--sc-input-height)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl)}:host([type=image]) .form-element{padding:0;border:none}input[type=reset],input[type=submit]{cursor:pointer}:host([type=search]){appearance:none!important}input[type=search]::-webkit-search-cancel-button{appearance:none;cursor:pointer;height:.65em;width:.65em;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);background-size:contain;background-repeat:no-repeat}:host([align=center]) .form-element{text-align:center}:host([align=left]) .form-element{text-align:left}:host([align=right]) .form-element{text-align:right}:host([noAppearance]) input[type=number]::-webkit-inner-spin-button,:host([noAppearance]) input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host([noAppearance]) input[type=number]{-moz-appearance:textfield!important}`;
|
|
6758
6802
|
/**
|
|
6759
6803
|
* @license
|
|
6760
6804
|
* Copyright 2018 Google LLC
|
|
@@ -6843,6 +6887,9 @@ let Input = class extends Form(Form$2(Subscriber$1(s$3))) {
|
|
|
6843
6887
|
this.hasSlotOrProps();
|
|
6844
6888
|
super.willUpdate(changedProperties);
|
|
6845
6889
|
}
|
|
6890
|
+
setSelectionRange(start, end) {
|
|
6891
|
+
this.input.setSelectionRange(start, end);
|
|
6892
|
+
}
|
|
6846
6893
|
hasSlotOrProps() {
|
|
6847
6894
|
var _a2, _b, _c, _d;
|
|
6848
6895
|
this.hasLabel = this.label || ((_a2 = this.slotLabelNodes) == null ? void 0 : _a2.length) ? true : false;
|
|
@@ -6863,7 +6910,10 @@ let Input = class extends Form(Form$2(Subscriber$1(s$3))) {
|
|
|
6863
6910
|
}
|
|
6864
6911
|
if (this.changeTimeoutId)
|
|
6865
6912
|
clearTimeout(this.changeTimeoutId);
|
|
6866
|
-
this.changeTimeoutId = setTimeout(
|
|
6913
|
+
this.changeTimeoutId = setTimeout(
|
|
6914
|
+
() => super.handleChange(e2),
|
|
6915
|
+
parseInt(this.getAttribute("inputDelayMs"))
|
|
6916
|
+
);
|
|
6867
6917
|
}
|
|
6868
6918
|
togglePasswordVisibility() {
|
|
6869
6919
|
this.isPassword = !this.isPassword;
|
|
@@ -6877,7 +6927,9 @@ let Input = class extends Form(Form$2(Subscriber$1(s$3))) {
|
|
|
6877
6927
|
"no-suffix": !this.hasSuffix,
|
|
6878
6928
|
"no-prefix": !this.hasPrefix
|
|
6879
6929
|
};
|
|
6880
|
-
return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$3(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${o(
|
|
6930
|
+
return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$3(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${o(
|
|
6931
|
+
slotClasses
|
|
6932
|
+
)}"><div class="${this.inlineContent ? "form-element form-element-wrapper" : "contents"}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><input id="form-element" part="input" class="form-element input" @input="${this.handleChange}" @blur="${this.handleBlur}" type="${this.type}" disabled="${l$2(this.disabled)}" ?readonly="${this.readonly}" ?autofocus="${this.autofocus}" list="${l$2(this.list)}" tabindex="${l$2(this.tabindex)}" pattern="${l$2(this.pattern)}" min="${l$2(this.min)}" max="${l$2(this.max)}" step="${l$2(this.step)}" src="${l$2(this.src)}" minlength="${l$2(this.minlength)}" maxlength="${l$2(this.maxlength)}" placeholder="${l$2(this.placeholder)}" required="${l$2(this.required)}" autocomplete="${l$2(this.autocomplete)}" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}" .name="${this.name}" .value="${this.value}"> ${this.showPasswordToggle ? y`<sonic-button shape="circle" class="password-toggle" @click="${this.togglePasswordVisibility}" aria-label="Toggle password visibility" variant="unstyled"><sonic-icon library="heroicons" name="${this.isPassword ? "eye" : "eye-slash"}"></sonic-icon></sonic-button>` : ""}<slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$3(this.description)}` : ""}</slot><slot name="list"></slot>`;
|
|
6881
6933
|
}
|
|
6882
6934
|
};
|
|
6883
6935
|
Input.styles = [
|
|
@@ -6986,7 +7038,9 @@ let Pop = class extends s$3 {
|
|
|
6986
7038
|
this.positioningRuns = false;
|
|
6987
7039
|
this.lastContentX = 0;
|
|
6988
7040
|
this.lastContentY = 0;
|
|
6989
|
-
this.resizeObserver = new ResizeObserver(
|
|
7041
|
+
this.resizeObserver = new ResizeObserver(
|
|
7042
|
+
() => this.computePosition(this.placement)
|
|
7043
|
+
);
|
|
6990
7044
|
}
|
|
6991
7045
|
runPositioningLoop() {
|
|
6992
7046
|
if (!this.positioningRuns)
|
|
@@ -7014,18 +7068,22 @@ let Pop = class extends s$3 {
|
|
|
7014
7068
|
this.lastContentY = 0;
|
|
7015
7069
|
this.runPositioningLoop();
|
|
7016
7070
|
}
|
|
7071
|
+
this.dispatchEvent(new CustomEvent("show"));
|
|
7017
7072
|
}
|
|
7018
7073
|
_hide() {
|
|
7019
7074
|
this.open = false;
|
|
7020
7075
|
this.popContent.setAttribute("tabindex", "-1");
|
|
7021
7076
|
this.positioningRuns = false;
|
|
7077
|
+
this.dispatchEvent(new CustomEvent("hide"));
|
|
7022
7078
|
}
|
|
7023
7079
|
_handleClosePop(e2) {
|
|
7024
7080
|
const path = e2.composedPath();
|
|
7025
7081
|
const target = path[0];
|
|
7026
7082
|
Pop.pops.forEach((pop) => {
|
|
7027
7083
|
const popContainsTarget = path.includes(pop);
|
|
7028
|
-
const popContentContainsTarget = path.includes(
|
|
7084
|
+
const popContentContainsTarget = path.includes(
|
|
7085
|
+
pop.querySelector('[slot="content"]')
|
|
7086
|
+
);
|
|
7029
7087
|
const isCloseManual = HTML$1.getAncestorAttributeValue(target, "data-on-select") === "keep";
|
|
7030
7088
|
if (e2.type == "pointerdown" && popContainsTarget)
|
|
7031
7089
|
return;
|
|
@@ -7188,6 +7246,36 @@ let MenuItem = class extends Button {
|
|
|
7188
7246
|
MenuItem = __decorateClass$D([
|
|
7189
7247
|
e$8(tagName$B)
|
|
7190
7248
|
], MenuItem);
|
|
7249
|
+
class s {
|
|
7250
|
+
constructor(s2, { target: t2, config: i2, callback: h2, skipInitial: e2 }) {
|
|
7251
|
+
this.t = /* @__PURE__ */ new Set(), this.o = false, this.i = false, this.h = s2, null !== t2 && this.t.add(null != t2 ? t2 : s2), this.l = i2, this.o = null != e2 ? e2 : this.o, this.callback = h2, window.ResizeObserver ? (this.u = new ResizeObserver((s3) => {
|
|
7252
|
+
this.handleChanges(s3), this.h.requestUpdate();
|
|
7253
|
+
}), s2.addController(this)) : console.warn("ResizeController error: browser does not support ResizeObserver.");
|
|
7254
|
+
}
|
|
7255
|
+
handleChanges(s2) {
|
|
7256
|
+
var t2;
|
|
7257
|
+
this.value = null === (t2 = this.callback) || void 0 === t2 ? void 0 : t2.call(this, s2, this.u);
|
|
7258
|
+
}
|
|
7259
|
+
hostConnected() {
|
|
7260
|
+
for (const s2 of this.t)
|
|
7261
|
+
this.observe(s2);
|
|
7262
|
+
}
|
|
7263
|
+
hostDisconnected() {
|
|
7264
|
+
this.disconnect();
|
|
7265
|
+
}
|
|
7266
|
+
async hostUpdated() {
|
|
7267
|
+
!this.o && this.i && this.handleChanges([]), this.i = false;
|
|
7268
|
+
}
|
|
7269
|
+
observe(s2) {
|
|
7270
|
+
this.t.add(s2), this.u.observe(s2, this.l), this.i = true, this.h.requestUpdate();
|
|
7271
|
+
}
|
|
7272
|
+
unobserve(s2) {
|
|
7273
|
+
this.t.delete(s2), this.u.unobserve(s2);
|
|
7274
|
+
}
|
|
7275
|
+
disconnect() {
|
|
7276
|
+
this.u.disconnect();
|
|
7277
|
+
}
|
|
7278
|
+
}
|
|
7191
7279
|
var __defProp$C = Object.defineProperty;
|
|
7192
7280
|
var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
|
|
7193
7281
|
var __decorateClass$C = (decorators, target, key, kind) => {
|
|
@@ -7199,69 +7287,156 @@ var __decorateClass$C = (decorators, target, key, kind) => {
|
|
|
7199
7287
|
__defProp$C(target, key, result);
|
|
7200
7288
|
return result;
|
|
7201
7289
|
};
|
|
7202
|
-
let InputAutocomplete = class extends TemplatesContainer(
|
|
7290
|
+
let InputAutocomplete = class extends TemplatesContainer(
|
|
7291
|
+
FormInput(FormElement(Subscriber(s$3)))
|
|
7292
|
+
) {
|
|
7203
7293
|
constructor() {
|
|
7204
7294
|
super(...arguments);
|
|
7205
|
-
this.
|
|
7206
|
-
this.forceAutoFill = false;
|
|
7295
|
+
this.size = "md";
|
|
7207
7296
|
this.placeholder = "";
|
|
7208
7297
|
this.filteredFields = "";
|
|
7209
7298
|
this.readonly = null;
|
|
7210
7299
|
this.dataProviderExpression = "";
|
|
7211
7300
|
this.key = "";
|
|
7212
|
-
this.
|
|
7213
|
-
this.
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7301
|
+
this.searchParameter = "";
|
|
7302
|
+
this.hasInputPrefix = false;
|
|
7303
|
+
this._resizeController = new s(this, {});
|
|
7304
|
+
this.searchDataProvider = "";
|
|
7305
|
+
this.initSearchDataProvider = "";
|
|
7306
|
+
this.queueDataProvider = "";
|
|
7307
|
+
this.initQueueDataProvider = "";
|
|
7308
|
+
this.lastValidSearch = "";
|
|
7309
|
+
this.updateSearchParameter = (value) => {
|
|
7310
|
+
if (value == "") {
|
|
7311
|
+
this.lastValidSearch = "";
|
|
7312
|
+
return;
|
|
7313
|
+
}
|
|
7314
|
+
this.queryQueueListItem(
|
|
7315
|
+
this.queueDataProvider,
|
|
7316
|
+
this.findSelection,
|
|
7317
|
+
this.setSearchFromSelection
|
|
7318
|
+
);
|
|
7319
|
+
};
|
|
7320
|
+
this.initSearchParameter = () => {
|
|
7321
|
+
this.queryQueueListItem(
|
|
7322
|
+
this.initQueueDataProvider,
|
|
7323
|
+
this.findSelection,
|
|
7324
|
+
this.setSearchFromSelection
|
|
7325
|
+
);
|
|
7326
|
+
};
|
|
7327
|
+
this.selectListItem = (listItem) => {
|
|
7328
|
+
var _a2;
|
|
7329
|
+
(_a2 = this.formValuePublisher) == null ? void 0 : _a2.set(listItem[this.name]);
|
|
7330
|
+
};
|
|
7331
|
+
this.findSearchedItem = (listItem) => {
|
|
7332
|
+
var _a2;
|
|
7333
|
+
return listItem[this.searchParameter || this.name] == ((_a2 = this.searchPublisher) == null ? void 0 : _a2.get());
|
|
7334
|
+
};
|
|
7335
|
+
this.findSelection = (listItem) => {
|
|
7336
|
+
return listItem[this.name] == this.value;
|
|
7337
|
+
};
|
|
7338
|
+
this.setSearchFromSelection = (listItem) => {
|
|
7339
|
+
var _a2;
|
|
7340
|
+
this.lastValidSearch = listItem[this.searchParameter || this.name];
|
|
7341
|
+
(_a2 = this.searchPublisher) == null ? void 0 : _a2.set(this.lastValidSearch);
|
|
7342
|
+
};
|
|
7343
|
+
this.updateActiveSelection = () => {
|
|
7344
|
+
var _a2, _b, _c;
|
|
7345
|
+
this.queryQueueListItem(
|
|
7346
|
+
this.queueDataProvider,
|
|
7347
|
+
this.findSearchedItem,
|
|
7348
|
+
this.selectListItem
|
|
7349
|
+
);
|
|
7350
|
+
if (!this.select && this.lastValidSearch && this.lastValidSearch != ((_a2 = this.searchPublisher) == null ? void 0 : _a2.get()) && ((_b = this.formValuePublisher) == null ? void 0 : _b.get())) {
|
|
7351
|
+
(_c = this.formValuePublisher) == null ? void 0 : _c.set("");
|
|
7352
|
+
}
|
|
7353
|
+
};
|
|
7223
7354
|
}
|
|
7224
|
-
|
|
7225
|
-
|
|
7355
|
+
hasSlotOrProps() {
|
|
7356
|
+
var _a2;
|
|
7357
|
+
this.hasInputPrefix = !!((_a2 = this.slotInputPrefixNodes) == null ? void 0 : _a2.length);
|
|
7226
7358
|
}
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
this.
|
|
7231
|
-
this.
|
|
7359
|
+
connectedCallback() {
|
|
7360
|
+
var _a2, _b, _c;
|
|
7361
|
+
super.connectedCallback();
|
|
7362
|
+
const searchParameter = this.searchParameter || this.name;
|
|
7363
|
+
const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
|
|
7364
|
+
const dpPrefix = formDataProvider + "__autocomplete";
|
|
7365
|
+
this.initSearchDataProvider = `${dpPrefix}_init_search__`;
|
|
7366
|
+
this.initQueueDataProvider = `${dpPrefix}_init_queue__`;
|
|
7367
|
+
this.searchDataProvider = `${dpPrefix}_search__`;
|
|
7368
|
+
this.queueDataProvider = `${dpPrefix}_queue__`;
|
|
7369
|
+
const getPublisher = PublisherManager.get;
|
|
7370
|
+
this.searchPublisher = getPublisher(this.searchDataProvider)[searchParameter];
|
|
7371
|
+
this.formValuePublisher = getPublisher(formDataProvider)[this.name];
|
|
7372
|
+
this.countPublisher = getPublisher(this.queueDataProvider).resultCount;
|
|
7373
|
+
this.initCountPublisher = getPublisher(
|
|
7374
|
+
this.initQueueDataProvider
|
|
7375
|
+
).resultCount;
|
|
7376
|
+
if (this.value) {
|
|
7377
|
+
PublisherManager.get(this.initSearchDataProvider)[this.name] = this.value;
|
|
7378
|
+
}
|
|
7379
|
+
(_a2 = this.initCountPublisher) == null ? void 0 : _a2.onAssign(this.initSearchParameter);
|
|
7380
|
+
(_b = this.formValuePublisher) == null ? void 0 : _b.onAssign(this.updateSearchParameter);
|
|
7381
|
+
(_c = this.countPublisher) == null ? void 0 : _c.onAssign(this.updateActiveSelection);
|
|
7232
7382
|
}
|
|
7233
|
-
|
|
7234
|
-
|
|
7383
|
+
disconnectedCallback() {
|
|
7384
|
+
var _a2, _b, _c;
|
|
7385
|
+
super.disconnectedCallback();
|
|
7386
|
+
(_a2 = this.initCountPublisher) == null ? void 0 : _a2.offAssign(this.initSearchParameter);
|
|
7387
|
+
(_b = this.formValuePublisher) == null ? void 0 : _b.offAssign(this.updateSearchParameter);
|
|
7388
|
+
(_c = this.countPublisher) == null ? void 0 : _c.offAssign(this.updateActiveSelection);
|
|
7389
|
+
const getPublisher = PublisherManager.get;
|
|
7390
|
+
getPublisher(this.initSearchDataProvider).delete();
|
|
7391
|
+
getPublisher(this.initQueueDataProvider).delete();
|
|
7392
|
+
getPublisher(this.searchDataProvider).delete();
|
|
7393
|
+
getPublisher(this.queueDataProvider).delete();
|
|
7394
|
+
}
|
|
7395
|
+
queryQueueListItem(queueDataProvider, itemFinder, itemMutator) {
|
|
7396
|
+
const queuePublisher = PublisherManager.get(queueDataProvider);
|
|
7397
|
+
let listItem;
|
|
7398
|
+
const listsDescriptors = queuePublisher.get();
|
|
7399
|
+
if (!Array.isArray(listsDescriptors))
|
|
7400
|
+
return;
|
|
7401
|
+
for (const listDescriptor of listsDescriptors) {
|
|
7402
|
+
const list = PublisherManager.get(listDescriptor.dataProvider).get();
|
|
7403
|
+
if (!Array.isArray(list))
|
|
7404
|
+
continue;
|
|
7405
|
+
listItem = list.find(itemFinder);
|
|
7406
|
+
if (listItem) {
|
|
7407
|
+
break;
|
|
7408
|
+
}
|
|
7409
|
+
}
|
|
7410
|
+
if (listItem) {
|
|
7411
|
+
itemMutator(listItem);
|
|
7412
|
+
}
|
|
7235
7413
|
}
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
this._label = value;
|
|
7240
|
-
this.requestUpdate();
|
|
7414
|
+
setSelectionRange(start, end) {
|
|
7415
|
+
var _a2;
|
|
7416
|
+
(_a2 = this.querySelector("sonic-input")) == null ? void 0 : _a2.setSelectionRange(start, end);
|
|
7241
7417
|
}
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7418
|
+
handleHide() {
|
|
7419
|
+
var _a2, _b, _c;
|
|
7420
|
+
if (!this.select)
|
|
7421
|
+
return;
|
|
7422
|
+
if (((_a2 = this.searchPublisher) == null ? void 0 : _a2.get()) == "") {
|
|
7423
|
+
this.lastValidSearch = "";
|
|
7424
|
+
(_b = this.formValuePublisher) == null ? void 0 : _b.set("");
|
|
7425
|
+
return;
|
|
7426
|
+
}
|
|
7427
|
+
(_c = this.searchPublisher) == null ? void 0 : _c.set(this.lastValidSearch);
|
|
7245
7428
|
}
|
|
7246
7429
|
render() {
|
|
7247
|
-
return y`<sonic-pop noToggle style="display:block"><sonic-input type="search" data-keyboard-nav="nav
|
|
7430
|
+
return y`<sonic-pop noToggle style="display:block" @hide="${this.handleHide}"><sonic-input dataProvider="${this.initSearchDataProvider + Math.random()}" formDataProvider="${this.searchDataProvider}" type="search" data-keyboard-nav="${this.getAttribute("data-keyboard-nav") || ""}" label="${l$2(this.label)}" description="${l$2(this.description)}" name="${l$2(this.searchParameter || this.name)}" placeholder="${l$2(this.placeholder)}" ?readonly="${this.readonly}" autocomplete="off" clearable inlineContent size="${this.size}"><slot name="prefix" slot="prefix" @slotchange="${this.hasSlotOrProps}"></slot>${this.select ? y`<sonic-icon slot="suffix" class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon>` : b$1}</sonic-input><sonic-menu slot="content" class="custom-scroll" style="${this.offsetWidth ? `width: ${this.offsetWidth}px` : ""}"><sonic-queue dataProvider="${this.queueDataProvider}" filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.searchDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue><sonic-queue noLazyload dataProvider="${this.initQueueDataProvider}" filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.initSearchDataProvider}" key="${this.key}" displayContents></sonic-queue></sonic-menu></sonic-pop>`;
|
|
7248
7431
|
}
|
|
7249
7432
|
};
|
|
7250
7433
|
InputAutocomplete.styles = [
|
|
7251
|
-
|
|
7434
|
+
customScroll,
|
|
7435
|
+
i$4`:host{display:block}sonic-menu{display:block;max-height:clamp(20rem,55vh,35rem);min-width:14rem;width:100%}`
|
|
7252
7436
|
];
|
|
7253
7437
|
__decorateClass$C([
|
|
7254
|
-
e$7()
|
|
7255
|
-
], InputAutocomplete.prototype, "
|
|
7256
|
-
__decorateClass$C([
|
|
7257
|
-
e$7()
|
|
7258
|
-
], InputAutocomplete.prototype, "forceAutoFill", 2);
|
|
7259
|
-
__decorateClass$C([
|
|
7260
|
-
e$7()
|
|
7261
|
-
], InputAutocomplete.prototype, "description", 1);
|
|
7262
|
-
__decorateClass$C([
|
|
7263
|
-
e$7()
|
|
7264
|
-
], InputAutocomplete.prototype, "label", 1);
|
|
7438
|
+
e$7({ type: String })
|
|
7439
|
+
], InputAutocomplete.prototype, "size", 2);
|
|
7265
7440
|
__decorateClass$C([
|
|
7266
7441
|
e$7({ type: String })
|
|
7267
7442
|
], InputAutocomplete.prototype, "placeholder", 2);
|
|
@@ -7274,12 +7449,21 @@ __decorateClass$C([
|
|
|
7274
7449
|
__decorateClass$C([
|
|
7275
7450
|
e$7({ type: String })
|
|
7276
7451
|
], InputAutocomplete.prototype, "dataProviderExpression", 2);
|
|
7452
|
+
__decorateClass$C([
|
|
7453
|
+
e$7({ type: Boolean })
|
|
7454
|
+
], InputAutocomplete.prototype, "select", 2);
|
|
7277
7455
|
__decorateClass$C([
|
|
7278
7456
|
e$7({ type: String })
|
|
7279
7457
|
], InputAutocomplete.prototype, "key", 2);
|
|
7280
7458
|
__decorateClass$C([
|
|
7281
7459
|
e$7({ type: String })
|
|
7282
|
-
], InputAutocomplete.prototype, "
|
|
7460
|
+
], InputAutocomplete.prototype, "searchParameter", 2);
|
|
7461
|
+
__decorateClass$C([
|
|
7462
|
+
o$9({ slot: "prefix" })
|
|
7463
|
+
], InputAutocomplete.prototype, "slotInputPrefixNodes", 2);
|
|
7464
|
+
__decorateClass$C([
|
|
7465
|
+
t$3()
|
|
7466
|
+
], InputAutocomplete.prototype, "hasInputPrefix", 2);
|
|
7283
7467
|
InputAutocomplete = __decorateClass$C([
|
|
7284
7468
|
e$8("sonic-input-autocomplete")
|
|
7285
7469
|
], InputAutocomplete);
|
|
@@ -7997,36 +8181,6 @@ __decorateClass$t([
|
|
|
7997
8181
|
Fieldset = __decorateClass$t([
|
|
7998
8182
|
e$8(tagName$t)
|
|
7999
8183
|
], Fieldset);
|
|
8000
|
-
class s {
|
|
8001
|
-
constructor(s2, { target: t2, config: i2, callback: h2, skipInitial: e2 }) {
|
|
8002
|
-
this.t = /* @__PURE__ */ new Set(), this.o = false, this.i = false, this.h = s2, null !== t2 && this.t.add(null != t2 ? t2 : s2), this.l = i2, this.o = null != e2 ? e2 : this.o, this.callback = h2, window.ResizeObserver ? (this.u = new ResizeObserver((s3) => {
|
|
8003
|
-
this.handleChanges(s3), this.h.requestUpdate();
|
|
8004
|
-
}), s2.addController(this)) : console.warn("ResizeController error: browser does not support ResizeObserver.");
|
|
8005
|
-
}
|
|
8006
|
-
handleChanges(s2) {
|
|
8007
|
-
var t2;
|
|
8008
|
-
this.value = null === (t2 = this.callback) || void 0 === t2 ? void 0 : t2.call(this, s2, this.u);
|
|
8009
|
-
}
|
|
8010
|
-
hostConnected() {
|
|
8011
|
-
for (const s2 of this.t)
|
|
8012
|
-
this.observe(s2);
|
|
8013
|
-
}
|
|
8014
|
-
hostDisconnected() {
|
|
8015
|
-
this.disconnect();
|
|
8016
|
-
}
|
|
8017
|
-
async hostUpdated() {
|
|
8018
|
-
!this.o && this.i && this.handleChanges([]), this.i = false;
|
|
8019
|
-
}
|
|
8020
|
-
observe(s2) {
|
|
8021
|
-
this.t.add(s2), this.u.observe(s2, this.l), this.i = true, this.h.requestUpdate();
|
|
8022
|
-
}
|
|
8023
|
-
unobserve(s2) {
|
|
8024
|
-
this.t.delete(s2), this.u.unobserve(s2);
|
|
8025
|
-
}
|
|
8026
|
-
disconnect() {
|
|
8027
|
-
this.u.disconnect();
|
|
8028
|
-
}
|
|
8029
|
-
}
|
|
8030
8184
|
var __defProp$s = Object.defineProperty;
|
|
8031
8185
|
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
8032
8186
|
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
@@ -8060,7 +8214,7 @@ let FormLayout = class extends Subscriber$1(s$3) {
|
|
|
8060
8214
|
}
|
|
8061
8215
|
};
|
|
8062
8216
|
FormLayout.styles = [
|
|
8063
|
-
i$4`:host{display:block}div{display:grid;grid-gap:1.5rem;align-items:flex-start}.cq--md{grid-gap:1.75rem;grid-template-columns:repeat(2,minmax(0,1fr))}.one-form-element{grid-template-columns:1fr}::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)){grid-column:1/-1}::slotted(sonic-divider){--sc-divider-my:0}`
|
|
8217
|
+
i$4`:host{display:block}div{display:grid;grid-gap:1.5rem;align-items:flex-start}.cq--md{grid-gap:1.75rem;grid-template-columns:repeat(2,minmax(0,1fr))}.one-form-element{grid-template-columns:1fr}::slotted(sonic-submit){display:contents}::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)){grid-column:1/-1}::slotted(sonic-divider){--sc-divider-my:0}`
|
|
8064
8218
|
];
|
|
8065
8219
|
__decorateClass$s([
|
|
8066
8220
|
l$6({ flatten: true })
|
|
@@ -8645,6 +8799,10 @@ let Modal = class extends Subscriber$1(s$3) {
|
|
|
8645
8799
|
modal.maxWidth = options == null ? void 0 : options.maxWidth;
|
|
8646
8800
|
if (options.width)
|
|
8647
8801
|
modal.width = options == null ? void 0 : options.width;
|
|
8802
|
+
if (options.maxHeight)
|
|
8803
|
+
modal.maxHeight = options == null ? void 0 : options.maxHeight;
|
|
8804
|
+
if (options.height)
|
|
8805
|
+
modal.height = options == null ? void 0 : options.height;
|
|
8648
8806
|
if (options.paddingX)
|
|
8649
8807
|
modal.style.setProperty("--sc-modal-px", options == null ? void 0 : options.paddingX);
|
|
8650
8808
|
if (options.paddingY)
|
|
@@ -8760,7 +8918,7 @@ let Modal = class extends Subscriber$1(s$3) {
|
|
|
8760
8918
|
};
|
|
8761
8919
|
Modal.styles = [
|
|
8762
8920
|
customScroll,
|
|
8763
|
-
i$4`:host{--sc-modal-py:2.5rem;--sc-modal-px:1.5rem;--sc-modal-max-w:min(100vw, 64ch);--sc-modal-max-h:
|
|
8921
|
+
i$4`:host{--sc-modal-py:2.5rem;--sc-modal-px:1.5rem;--sc-modal-max-w:min(100vw, 64ch);--sc-modal-max-h:85vh;--sc-modal-rounded:var(--sc-rounded-lg);--sc-modal-z-index:990}*{box-sizing:border-box}.modal-wrapper{position:fixed;bottom:0;left:0;width:100%;z-index:calc(var(--sc-modal-z-index) + 1);align-items:center;justify-content:center;flex-direction:column;display:flex;pointer-events:none}.modal-content{display:flex;flex-direction:column;min-height:10rem;line-height:1.25}.modal{background:var(--sc-base);color:var(--sc-base-content);width:100%;box-shadow:var(--sc-shadow-lg);border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;pointer-events:auto;transform:translateZ(0)}.overlay{background:var(--sc-modal-overlay-bg,var(--sc-base-200));left:0;top:0;right:0;bottom:0;z-index:var(--sc-modal-z-index);opacity:.8;position:fixed}::slotted(sonic-modal-title){margin-bottom:1.25rem}::slotted(sonic-modal-subtitle){margin-top:-.9rem;margin-bottom:1.25rem}@media (max-width:767.5px){.modal,.modal-wrapper{max-width:none!important;width:100%!important;border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0!important}}@media (min-width:768px){.modal-wrapper{top:50%;left:50%;bottom:auto;right:auto;transform:translateX(-50%) translateY(-50%)}.modal{top:50%;bottom:auto;right:auto;border-radius:var(--sc-modal-rounded)}}:host([align=left]) .modal-content{text-align:left;align-items:flex-start}:host([align=center]) .modal-content{text-align:center;align-items:center}:host([align=right]) .modal-content{text-align:right;align-items:flex-end}:host([rounded=none]) modal{--sc-img-radius:0!important}`
|
|
8764
8922
|
];
|
|
8765
8923
|
__decorateClass$i([
|
|
8766
8924
|
e$7({ type: Boolean })
|
|
@@ -47,6 +47,10 @@ declare const Fetch_base: {
|
|
|
47
47
|
getAttribute(name: string): string;
|
|
48
48
|
hasAttribute(attributeName: string): boolean;
|
|
49
49
|
getBoundingClientRect(): DOMRect;
|
|
50
|
+
onConnected(callback: (component: any) => void): void;
|
|
51
|
+
offConnected(callback: (component: any) => void): void;
|
|
52
|
+
onDisconnected(callback: (component: any) => void): void;
|
|
53
|
+
offDisconnected(callback: (component: any) => void): void;
|
|
50
54
|
};
|
|
51
55
|
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
52
56
|
/**
|