@scaleflex/asset-picker 1.0.2 → 1.0.3
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 +2 -2
- package/dist/{asset-picker-50AePany.js → asset-picker-BEueJ2xy.js} +945 -945
- package/dist/{asset-picker-DjEmkrjk.cjs → asset-picker-BPtXtAqM.cjs} +133 -133
- package/dist/components/views/ap-asset-card.d.ts.map +1 -1
- package/dist/components/views/ap-asset-row.d.ts.map +1 -1
- package/dist/define.cjs +1 -1
- package/dist/define.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/.claude/settings.local.json +0 -60
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
1
|
+
import { css as F, LitElement as E, html as n, nothing as f, svg as Ie } from "lit";
|
|
2
|
+
import { property as d, query as Ze, customElement as T, state as _ } from "lit/decorators.js";
|
|
3
3
|
class Ei {
|
|
4
4
|
constructor(e) {
|
|
5
5
|
this.listeners = /* @__PURE__ */ new Set(), this._notifying = !1, this._pendingState = null, this.state = e;
|
|
@@ -141,23 +141,23 @@ class Mi {
|
|
|
141
141
|
}
|
|
142
142
|
if (i.shiftKey && this.lastClickedIndex >= 0)
|
|
143
143
|
if (this._folderSelectionEnabled) {
|
|
144
|
-
const g = Math.min(this.lastClickedIndex, s),
|
|
145
|
-
this._applyRangeSelection(g,
|
|
144
|
+
const g = Math.min(this.lastClickedIndex, s), p = Math.max(this.lastClickedIndex, s), v = new Map(a.selectedFolders);
|
|
145
|
+
this._applyRangeSelection(g, p, o, v);
|
|
146
146
|
const b = (c = a.config) == null ? void 0 : c.maxSelections;
|
|
147
|
-
if (b && o.size +
|
|
148
|
-
this.store.setState({ selectedAssets: o, selectedFolders:
|
|
147
|
+
if (b && o.size + v.size > b) return;
|
|
148
|
+
this.store.setState({ selectedAssets: o, selectedFolders: v });
|
|
149
149
|
} else {
|
|
150
|
-
const g = Math.min(this.lastClickedIndex, s),
|
|
151
|
-
for (let
|
|
152
|
-
|
|
150
|
+
const g = Math.min(this.lastClickedIndex, s), p = Math.max(this.lastClickedIndex, s), v = a.assets;
|
|
151
|
+
for (let $ = g; $ <= p; $++)
|
|
152
|
+
v[$] && o.set(v[$].uuid, v[$]);
|
|
153
153
|
const b = (h = a.config) == null ? void 0 : h.maxSelections;
|
|
154
154
|
if (b && o.size > b) return;
|
|
155
155
|
this.store.setState({ selectedAssets: o });
|
|
156
156
|
}
|
|
157
157
|
else if (i.metaKey || i.ctrlKey) {
|
|
158
158
|
o.has(e.uuid) ? o.delete(e.uuid) : o.set(e.uuid, e);
|
|
159
|
-
const g = (u = a.config) == null ? void 0 : u.maxSelections,
|
|
160
|
-
if (g &&
|
|
159
|
+
const g = (u = a.config) == null ? void 0 : u.maxSelections, p = o.size + (this._folderSelectionEnabled ? a.selectedFolders.size : 0);
|
|
160
|
+
if (g && p > g) return;
|
|
161
161
|
this.store.setState({ selectedAssets: o });
|
|
162
162
|
} else
|
|
163
163
|
o.clear(), o.set(e.uuid, e), this.store.setState({ selectedAssets: o, selectedFolders: /* @__PURE__ */ new Map() });
|
|
@@ -172,11 +172,11 @@ class Mi {
|
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
174
|
if (i.shiftKey && this.lastClickedIndex >= 0) {
|
|
175
|
-
const u = Math.min(this.lastClickedIndex, s), g = Math.max(this.lastClickedIndex, s),
|
|
176
|
-
this._applyRangeSelection(u, g,
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
this.store.setState({ selectedAssets:
|
|
175
|
+
const u = Math.min(this.lastClickedIndex, s), g = Math.max(this.lastClickedIndex, s), p = new Map(a.selectedAssets);
|
|
176
|
+
this._applyRangeSelection(u, g, p, o);
|
|
177
|
+
const v = (c = a.config) == null ? void 0 : c.maxSelections;
|
|
178
|
+
if (v && p.size + o.size > v) return;
|
|
179
|
+
this.store.setState({ selectedAssets: p, selectedFolders: o });
|
|
180
180
|
} else if (i.metaKey || i.ctrlKey) {
|
|
181
181
|
o.has(e.uuid) ? o.delete(e.uuid) : o.set(e.uuid, e);
|
|
182
182
|
const u = (h = a.config) == null ? void 0 : h.maxSelections, g = o.size + a.selectedAssets.size;
|
|
@@ -339,16 +339,16 @@ class Pi {
|
|
|
339
339
|
if (!this.container) return;
|
|
340
340
|
const e = this.store.getState(), s = ((h = e.config) == null ? void 0 : h.folderSelection) === !0, { assetCards: i, folderCards: a } = this.querySelectableElements(), o = new Map(this.preMarqueeSelection), r = s ? new Map(this.preMarqueeFolderSelection) : e.selectedFolders;
|
|
341
341
|
i.forEach((g) => {
|
|
342
|
-
const
|
|
343
|
-
if (this.intersectsMarquee(
|
|
344
|
-
const b = e.assets.find((
|
|
345
|
-
b && o.set(
|
|
342
|
+
const p = this.getCardRelativeRect(g), v = g.dataset.assetUuid;
|
|
343
|
+
if (this.intersectsMarquee(p)) {
|
|
344
|
+
const b = e.assets.find(($) => $.uuid === v);
|
|
345
|
+
b && o.set(v, b);
|
|
346
346
|
}
|
|
347
347
|
}), s && a.forEach((g) => {
|
|
348
|
-
const
|
|
349
|
-
if (this.intersectsMarquee(
|
|
350
|
-
const b = e.folders.find((
|
|
351
|
-
b && r.set(
|
|
348
|
+
const p = this.getCardRelativeRect(g), v = g.dataset.folderUuid;
|
|
349
|
+
if (this.intersectsMarquee(p)) {
|
|
350
|
+
const b = e.folders.find(($) => $.uuid === v);
|
|
351
|
+
b && r.set(v, b);
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
354
|
const l = (u = e.config) == null ? void 0 : u.maxSelections, c = o.size + (s ? r.size : 0);
|
|
@@ -832,7 +832,7 @@ const y = {
|
|
|
832
832
|
APPROVER: "task_approver",
|
|
833
833
|
REQUESTOR: "task_requester",
|
|
834
834
|
DUE_DATE: "task_duedate"
|
|
835
|
-
},
|
|
835
|
+
}, L = {
|
|
836
836
|
IS: ":",
|
|
837
837
|
RANGE: "..",
|
|
838
838
|
IS_NOT: ":-",
|
|
@@ -843,7 +843,7 @@ const y = {
|
|
|
843
843
|
LESS_THAN_OR_EQUAL: "<="
|
|
844
844
|
}, ta = {
|
|
845
845
|
AND: "AND"
|
|
846
|
-
},
|
|
846
|
+
}, S = {
|
|
847
847
|
NUMERIC: "numeric",
|
|
848
848
|
SELECT_ONE: "select-one",
|
|
849
849
|
MULTI_SELECT: "multi-select",
|
|
@@ -858,19 +858,19 @@ const y = {
|
|
|
858
858
|
DECIMAL2: "decimal2",
|
|
859
859
|
INTEGER_LIST: "integer-list"
|
|
860
860
|
}, Xt = {
|
|
861
|
-
[
|
|
862
|
-
[
|
|
863
|
-
[
|
|
864
|
-
[
|
|
865
|
-
[
|
|
866
|
-
[
|
|
867
|
-
[
|
|
868
|
-
[
|
|
869
|
-
[
|
|
870
|
-
[
|
|
871
|
-
[
|
|
872
|
-
[
|
|
873
|
-
[
|
|
861
|
+
[S.DATE]: "date_",
|
|
862
|
+
[S.BOOLEAN]: "bool_",
|
|
863
|
+
[S.NUMERIC]: "num_",
|
|
864
|
+
[S.DECIMAL2]: "dec_",
|
|
865
|
+
[S.ATTACHMENTS_ASSETS]: "attach_",
|
|
866
|
+
[S.ATTACHMENT_URI]: "uri_",
|
|
867
|
+
[S.SELECT_ONE]: "one_",
|
|
868
|
+
[S.MULTI_SELECT]: "multi_",
|
|
869
|
+
[S.SUPERTAGS]: "tags_",
|
|
870
|
+
[S.TEXT]: "text_",
|
|
871
|
+
[S.TEXT_AREA]: "area_",
|
|
872
|
+
[S.GEO_POINT]: "geo_",
|
|
873
|
+
[S.INTEGER_LIST]: "intlist_"
|
|
874
874
|
};
|
|
875
875
|
Object.fromEntries(
|
|
876
876
|
Object.entries(Xt).map(([t, e]) => [e, t])
|
|
@@ -888,7 +888,7 @@ const pi = Object.values(Xt), bt = {
|
|
|
888
888
|
y.DATE,
|
|
889
889
|
y.TYPE,
|
|
890
890
|
y.SIZE
|
|
891
|
-
], fi =
|
|
891
|
+
], fi = L.IS, jt = "20", Nt = "1", sa = 0, ia = [
|
|
892
892
|
{ key: y.DATE, label: "Date", icon: "calendar", type: "date" },
|
|
893
893
|
{ key: y.TYPE, label: "Format", icon: "file-type", type: "string" },
|
|
894
894
|
{ key: y.SIZE, label: "Size", icon: "scaling", type: "string" },
|
|
@@ -1016,27 +1016,27 @@ const pi = Object.values(Xt), bt = {
|
|
|
1016
1016
|
{ label: "Medium", value: "2" },
|
|
1017
1017
|
{ label: "Large", value: "4" }
|
|
1018
1018
|
], ns = [
|
|
1019
|
-
{ label: "Is", value:
|
|
1020
|
-
{ label: "Contains", value:
|
|
1019
|
+
{ label: "Is", value: L.IS },
|
|
1020
|
+
{ label: "Contains", value: L.CONTAINS_IN_TEXT }
|
|
1021
1021
|
], Se = [
|
|
1022
|
-
{ label: "Is", value:
|
|
1023
|
-
{ label: "Is not", value:
|
|
1022
|
+
{ label: "Is", value: L.IS },
|
|
1023
|
+
{ label: "Is not", value: L.IS_NOT }
|
|
1024
1024
|
], ls = [
|
|
1025
|
-
{ label: "Is", value:
|
|
1026
|
-
{ label: "Contains", value:
|
|
1027
|
-
{ label: "Does not contain", value:
|
|
1025
|
+
{ label: "Is", value: L.IS_EXACT },
|
|
1026
|
+
{ label: "Contains", value: L.IS },
|
|
1027
|
+
{ label: "Does not contain", value: L.IS_NOT }
|
|
1028
1028
|
], cs = [
|
|
1029
|
-
{ label: "Is", value:
|
|
1030
|
-
{ label: "Greater than", value:
|
|
1031
|
-
{ label: "Is not", value:
|
|
1032
|
-
{ label: "Less than", value:
|
|
1033
|
-
{ label: "Between", value:
|
|
1029
|
+
{ label: "Is", value: L.IS },
|
|
1030
|
+
{ label: "Greater than", value: L.GREATER_THAN_OR_EQUAL },
|
|
1031
|
+
{ label: "Is not", value: L.IS_NOT },
|
|
1032
|
+
{ label: "Less than", value: L.LESS_THAN_OR_EQUAL },
|
|
1033
|
+
{ label: "Between", value: L.RANGE }
|
|
1034
1034
|
], ua = [
|
|
1035
|
-
{ label: "Is", value:
|
|
1036
|
-
{ label: "Is not", value:
|
|
1035
|
+
{ label: "Is", value: L.IS_EXACT },
|
|
1036
|
+
{ label: "Is not", value: L.IS_NOT }
|
|
1037
1037
|
], Js = [
|
|
1038
|
-
{ label: "Contains", value:
|
|
1039
|
-
{ label: "Does not contain", value:
|
|
1038
|
+
{ label: "Contains", value: L.CONTAINS },
|
|
1039
|
+
{ label: "Does not contain", value: L.IS_NOT }
|
|
1040
1040
|
], fa = [
|
|
1041
1041
|
{ value: "APPROVED", label: "Approved", icon: "circle-check-big", iconColor: "var(--ap-success, oklch(0.637 0.17 151.295))" },
|
|
1042
1042
|
{ value: "PENDING", label: "Pending", icon: "clock", iconColor: "var(--ap-warning, oklch(0.734 0.157 69.419))" },
|
|
@@ -1054,33 +1054,33 @@ const pi = Object.values(Xt), bt = {
|
|
|
1054
1054
|
{ label: "True", value: "true" },
|
|
1055
1055
|
{ label: "False", value: "false" }
|
|
1056
1056
|
], Ut = {
|
|
1057
|
-
[
|
|
1058
|
-
[
|
|
1059
|
-
[
|
|
1060
|
-
[
|
|
1061
|
-
[
|
|
1062
|
-
[
|
|
1063
|
-
[
|
|
1064
|
-
[
|
|
1065
|
-
[
|
|
1066
|
-
[
|
|
1067
|
-
[
|
|
1068
|
-
[
|
|
1069
|
-
[
|
|
1057
|
+
[S.DATE]: "calendar",
|
|
1058
|
+
[S.BOOLEAN]: "toggle-left",
|
|
1059
|
+
[S.NUMERIC]: "file-digit",
|
|
1060
|
+
[S.DECIMAL2]: "decimals-arrow-right",
|
|
1061
|
+
[S.ATTACHMENTS_ASSETS]: "paperclip",
|
|
1062
|
+
[S.ATTACHMENT_URI]: "link-2",
|
|
1063
|
+
[S.SELECT_ONE]: "circle-dot",
|
|
1064
|
+
[S.MULTI_SELECT]: "square-check",
|
|
1065
|
+
[S.SUPERTAGS]: "hash",
|
|
1066
|
+
[S.TEXT]: "text-initial",
|
|
1067
|
+
[S.TEXT_AREA]: "text-align-justify",
|
|
1068
|
+
[S.GEO_POINT]: "locate",
|
|
1069
|
+
[S.INTEGER_LIST]: "list-ordered"
|
|
1070
1070
|
}, va = {
|
|
1071
|
-
[
|
|
1072
|
-
[
|
|
1073
|
-
[
|
|
1074
|
-
[
|
|
1075
|
-
[
|
|
1076
|
-
[
|
|
1077
|
-
[
|
|
1078
|
-
[
|
|
1079
|
-
[
|
|
1080
|
-
[
|
|
1081
|
-
[
|
|
1082
|
-
[
|
|
1083
|
-
[
|
|
1071
|
+
[S.TEXT]: "text",
|
|
1072
|
+
[S.TEXT_AREA]: "text",
|
|
1073
|
+
[S.NUMERIC]: "number",
|
|
1074
|
+
[S.DECIMAL2]: "number",
|
|
1075
|
+
[S.BOOLEAN]: "boolean",
|
|
1076
|
+
[S.SELECT_ONE]: "select-one",
|
|
1077
|
+
[S.MULTI_SELECT]: "multi-select",
|
|
1078
|
+
[S.SUPERTAGS]: "tags",
|
|
1079
|
+
[S.DATE]: "date",
|
|
1080
|
+
[S.GEO_POINT]: "geo",
|
|
1081
|
+
[S.ATTACHMENTS_ASSETS]: "attachment",
|
|
1082
|
+
[S.ATTACHMENT_URI]: "attachment",
|
|
1083
|
+
[S.INTEGER_LIST]: "attachment"
|
|
1084
1084
|
};
|
|
1085
1085
|
async function ma(t) {
|
|
1086
1086
|
var i;
|
|
@@ -1101,43 +1101,43 @@ function ba(t) {
|
|
|
1101
1101
|
return (e !== -1 ? t.slice(e + 1).trim() : t).toUpperCase();
|
|
1102
1102
|
}
|
|
1103
1103
|
async function _a(t) {
|
|
1104
|
-
var b,
|
|
1105
|
-
const e = await t.request("/settings"), s = e.settings ?? e, i = (s == null ? void 0 : s.metadata) ?? e.metadata, o = ((i == null ? void 0 : i.model) ?? [])[sa], r = i == null ? void 0 : i.store, c = ((r == null ? void 0 : r.regional_variants_groups) ?? []).map((
|
|
1106
|
-
uuid:
|
|
1107
|
-
label:
|
|
1108
|
-
variants: (
|
|
1109
|
-
api_value:
|
|
1110
|
-
internal_unique_value:
|
|
1111
|
-
label:
|
|
1104
|
+
var b, $;
|
|
1105
|
+
const e = await t.request("/settings"), s = e.settings ?? e, i = (s == null ? void 0 : s.metadata) ?? e.metadata, o = ((i == null ? void 0 : i.model) ?? [])[sa], r = i == null ? void 0 : i.store, c = ((r == null ? void 0 : r.regional_variants_groups) ?? []).map((x) => ({
|
|
1106
|
+
uuid: x.uuid,
|
|
1107
|
+
label: x.label ?? x.name ?? "",
|
|
1108
|
+
variants: (x.variants ?? []).map((k) => ({
|
|
1109
|
+
api_value: k.api_value ?? k.value ?? "",
|
|
1110
|
+
internal_unique_value: k.internal_unique_value ?? k.api_value ?? "",
|
|
1111
|
+
label: k.label ?? k.name ?? ""
|
|
1112
1112
|
}))
|
|
1113
|
-
})).filter((
|
|
1114
|
-
for (const
|
|
1115
|
-
h[
|
|
1116
|
-
const u = (s == null ? void 0 : s.project_branding) ?? ((
|
|
1113
|
+
})).filter((x) => x.variants.length > 1), h = {};
|
|
1114
|
+
for (const x of c)
|
|
1115
|
+
h[x.uuid] = ((b = x.variants[0]) == null ? void 0 : b.api_value) ?? "";
|
|
1116
|
+
const u = (s == null ? void 0 : s.project_branding) ?? (($ = e.settings) == null ? void 0 : $.project_branding), g = u == null ? void 0 : u.brandColor;
|
|
1117
1117
|
if (!o) return { fields: [], regionalVariantGroups: c, regionalFilters: h, brandColor: g };
|
|
1118
|
-
const
|
|
1119
|
-
for (const
|
|
1120
|
-
const
|
|
1121
|
-
for (const
|
|
1122
|
-
const
|
|
1123
|
-
api_value:
|
|
1124
|
-
internal_unique_value:
|
|
1125
|
-
label:
|
|
1118
|
+
const p = o.groups ?? [], v = [];
|
|
1119
|
+
for (const x of p) {
|
|
1120
|
+
const k = x.name || "Root fields";
|
|
1121
|
+
for (const w of x.fields ?? []) {
|
|
1122
|
+
const P = w.possible_values, C = P == null ? void 0 : P.map((A) => ({
|
|
1123
|
+
api_value: A.api_value ?? A.value ?? "",
|
|
1124
|
+
internal_unique_value: A.internal_unique_value ?? A.api_value ?? "",
|
|
1125
|
+
label: A.label ?? A.name ?? A.api_value ?? ""
|
|
1126
1126
|
}));
|
|
1127
|
-
|
|
1127
|
+
v.push({
|
|
1128
1128
|
// Use field.key (not ckey) — this is what a.meta uses as keys
|
|
1129
|
-
key:
|
|
1130
|
-
label:
|
|
1131
|
-
type:
|
|
1132
|
-
slug:
|
|
1133
|
-
ckey:
|
|
1134
|
-
possible_values:
|
|
1135
|
-
group:
|
|
1136
|
-
regionalVariantsGroupUuid:
|
|
1129
|
+
key: w.key ?? w.ckey,
|
|
1130
|
+
label: w.title ?? w.label ?? w.key ?? "",
|
|
1131
|
+
type: w.type ?? "text",
|
|
1132
|
+
slug: w.slug,
|
|
1133
|
+
ckey: w.ckey,
|
|
1134
|
+
possible_values: C,
|
|
1135
|
+
group: k,
|
|
1136
|
+
regionalVariantsGroupUuid: w.regional_variants_group_uuid
|
|
1137
1137
|
});
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
|
-
return { fields:
|
|
1140
|
+
return { fields: v, regionalVariantGroups: c, regionalFilters: h, brandColor: g };
|
|
1141
1141
|
}
|
|
1142
1142
|
function qe(t) {
|
|
1143
1143
|
return t.toLocaleDateString("en-CA");
|
|
@@ -1320,17 +1320,17 @@ function La(t, e) {
|
|
|
1320
1320
|
const a = e, { operator: o = fi, values: r = [], logic: l, metadataType: c } = a;
|
|
1321
1321
|
if (r.length === 0) return [];
|
|
1322
1322
|
if (r.length === 1 && (r[0] === pe || r[0] === he)) {
|
|
1323
|
-
const h = c ===
|
|
1323
|
+
const h = c === S.GEO_POINT ? L.IS + "~" : L.IS;
|
|
1324
1324
|
return [`${s}${h}"${r[0]}"`];
|
|
1325
1325
|
}
|
|
1326
|
-
if ((c ===
|
|
1327
|
-
return [`${s}${
|
|
1328
|
-
if (c ===
|
|
1326
|
+
if ((c === S.NUMERIC || c === S.DECIMAL2) && o === L.RANGE)
|
|
1327
|
+
return [`${s}${L.IS}"${r.join('","')}"`];
|
|
1328
|
+
if (c === S.GEO_POINT) {
|
|
1329
1329
|
const h = r.map((u) => {
|
|
1330
1330
|
const g = u.indexOf("..");
|
|
1331
1331
|
if (g === -1) return `(${u})`;
|
|
1332
|
-
const
|
|
1333
|
-
return `(${
|
|
1332
|
+
const p = u.slice(0, g), v = u.slice(g);
|
|
1333
|
+
return `(${p})${v}`;
|
|
1334
1334
|
});
|
|
1335
1335
|
return He(s, o + "~", h, ",", l);
|
|
1336
1336
|
}
|
|
@@ -1473,9 +1473,9 @@ function ps(t) {
|
|
|
1473
1473
|
return t <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
|
1474
1474
|
}
|
|
1475
1475
|
function Ka(t, e, s) {
|
|
1476
|
-
const i = ps(t), a = ps(e), o = ps(s), r = 0.4122214708 * i + 0.5363325363 * a + 0.0514459929 * o, l = 0.2119034982 * i + 0.6806995451 * a + 0.1073969566 * o, c = 0.0883024619 * i + 0.2817188376 * a + 0.6299787005 * o, h = Math.cbrt(r), u = Math.cbrt(l), g = Math.cbrt(c),
|
|
1477
|
-
let
|
|
1478
|
-
return
|
|
1476
|
+
const i = ps(t), a = ps(e), o = ps(s), r = 0.4122214708 * i + 0.5363325363 * a + 0.0514459929 * o, l = 0.2119034982 * i + 0.6806995451 * a + 0.1073969566 * o, c = 0.0883024619 * i + 0.2817188376 * a + 0.6299787005 * o, h = Math.cbrt(r), u = Math.cbrt(l), g = Math.cbrt(c), p = 0.2104542553 * h + 0.793617785 * u - 0.0040720468 * g, v = 1.9779984951 * h - 2.428592205 * u + 0.4505937099 * g, b = 0.0259040371 * h + 0.7827717662 * u - 0.808675766 * g, $ = Math.sqrt(v * v + b * b);
|
|
1477
|
+
let x = Math.atan2(b, v) * (180 / Math.PI);
|
|
1478
|
+
return x < 0 && (x += 360), [p, $, x];
|
|
1479
1479
|
}
|
|
1480
1480
|
function Qa(t) {
|
|
1481
1481
|
return t > 0.7;
|
|
@@ -1528,7 +1528,7 @@ var to = Object.defineProperty, so = Object.getOwnPropertyDescriptor, ks = (t, e
|
|
|
1528
1528
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
1529
1529
|
return i && a && to(e, s, a), a;
|
|
1530
1530
|
};
|
|
1531
|
-
let _t = class extends
|
|
1531
|
+
let _t = class extends E {
|
|
1532
1532
|
constructor() {
|
|
1533
1533
|
super(...arguments), this.open = !1;
|
|
1534
1534
|
}
|
|
@@ -1575,7 +1575,7 @@ let _t = class extends C {
|
|
|
1575
1575
|
`;
|
|
1576
1576
|
}
|
|
1577
1577
|
};
|
|
1578
|
-
_t.styles =
|
|
1578
|
+
_t.styles = F`
|
|
1579
1579
|
:host {
|
|
1580
1580
|
display: contents;
|
|
1581
1581
|
}
|
|
@@ -1650,13 +1650,13 @@ _t.styles = S`
|
|
|
1650
1650
|
}
|
|
1651
1651
|
`;
|
|
1652
1652
|
ks([
|
|
1653
|
-
|
|
1653
|
+
d({ type: Boolean })
|
|
1654
1654
|
], _t.prototype, "open", 2);
|
|
1655
1655
|
ks([
|
|
1656
1656
|
Ze("dialog")
|
|
1657
1657
|
], _t.prototype, "dialog", 2);
|
|
1658
1658
|
_t = ks([
|
|
1659
|
-
|
|
1659
|
+
T("ap-modal")
|
|
1660
1660
|
], _t);
|
|
1661
1661
|
function io(t, e) {
|
|
1662
1662
|
let s;
|
|
@@ -1665,7 +1665,7 @@ function io(t, e) {
|
|
|
1665
1665
|
});
|
|
1666
1666
|
return i.cancel = () => clearTimeout(s), i;
|
|
1667
1667
|
}
|
|
1668
|
-
const ee =
|
|
1668
|
+
const ee = F`
|
|
1669
1669
|
*, *::before, *::after {
|
|
1670
1670
|
box-sizing: border-box;
|
|
1671
1671
|
}
|
|
@@ -1675,7 +1675,7 @@ var ao = Object.defineProperty, oo = Object.getOwnPropertyDescriptor, Zt = (t, e
|
|
|
1675
1675
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
1676
1676
|
return i && a && ao(e, s, a), a;
|
|
1677
1677
|
};
|
|
1678
|
-
let dt = class extends
|
|
1678
|
+
let dt = class extends E {
|
|
1679
1679
|
constructor() {
|
|
1680
1680
|
super(...arguments), this.groups = [], this.selectedFilters = {}, this._open = !1, this._handleOutsideClick = (t) => {
|
|
1681
1681
|
this._open && !t.composedPath().includes(this) && (this._open = !1);
|
|
@@ -1706,7 +1706,7 @@ let dt = class extends C {
|
|
|
1706
1706
|
<ap-icon name="globe" .size=${18}></ap-icon>
|
|
1707
1707
|
</button>
|
|
1708
1708
|
<div class="popover ${this._open ? "open" : ""}">
|
|
1709
|
-
${t ?
|
|
1709
|
+
${t ? f : n`
|
|
1710
1710
|
<div style="padding: 12px 12px; font-size: 0.8125rem; color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82));">
|
|
1711
1711
|
No regional settings configured
|
|
1712
1712
|
</div>
|
|
@@ -1733,7 +1733,7 @@ let dt = class extends C {
|
|
|
1733
1733
|
`;
|
|
1734
1734
|
}
|
|
1735
1735
|
};
|
|
1736
|
-
dt.styles =
|
|
1736
|
+
dt.styles = F`
|
|
1737
1737
|
:host {
|
|
1738
1738
|
position: relative;
|
|
1739
1739
|
display: inline-block;
|
|
@@ -1820,16 +1820,16 @@ dt.styles = S`
|
|
|
1820
1820
|
}
|
|
1821
1821
|
`;
|
|
1822
1822
|
Zt([
|
|
1823
|
-
|
|
1823
|
+
d({ type: Array })
|
|
1824
1824
|
], dt.prototype, "groups", 2);
|
|
1825
1825
|
Zt([
|
|
1826
|
-
|
|
1826
|
+
d({ type: Object })
|
|
1827
1827
|
], dt.prototype, "selectedFilters", 2);
|
|
1828
1828
|
Zt([
|
|
1829
1829
|
_()
|
|
1830
1830
|
], dt.prototype, "_open", 2);
|
|
1831
1831
|
dt = Zt([
|
|
1832
|
-
|
|
1832
|
+
T("ap-regional-settings")
|
|
1833
1833
|
], dt);
|
|
1834
1834
|
var ro = Object.defineProperty, no = Object.getOwnPropertyDescriptor, te = (t, e, s, i) => {
|
|
1835
1835
|
for (var a = i > 1 ? void 0 : i ? no(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -1842,7 +1842,7 @@ const lo = [
|
|
|
1842
1842
|
{ value: "labels", label: "Labels", icon: "tag" },
|
|
1843
1843
|
{ value: "collections", label: "Collections", icon: "layout-grid" }
|
|
1844
1844
|
];
|
|
1845
|
-
let H = class extends
|
|
1845
|
+
let H = class extends E {
|
|
1846
1846
|
constructor() {
|
|
1847
1847
|
super(...arguments), this.activeTab = "assets", this.tabs = ["assets", "folders"], this.isInsideLabel = !1, this.isInsideCollection = !1, this.isInsideCollectionLeaf = !1, this.viewMode = "grid", this.searchQuery = "", this.regionalGroups = [], this.regionalFilters = {}, this.hideClose = !1, this.enableAISearch = !1, this.isAISearchActive = !1, this._localSearch = "", this._debouncedSearch = io((t) => {
|
|
1848
1848
|
(t.length === 0 || t.length >= 3) && this.dispatchEvent(new CustomEvent("search-change", { detail: { value: t }, bubbles: !0, composed: !0 }));
|
|
@@ -1894,7 +1894,7 @@ let H = class extends C {
|
|
|
1894
1894
|
.value=${this.activeTab}
|
|
1895
1895
|
.options=${t}
|
|
1896
1896
|
@ap-change=${this._handleTabChange}
|
|
1897
|
-
></ap-dropdown>` :
|
|
1897
|
+
></ap-dropdown>` : f}
|
|
1898
1898
|
<div class="search-wrapper">
|
|
1899
1899
|
<ap-icon class="search-icon" name="search" .size=${16}></ap-icon>
|
|
1900
1900
|
<input
|
|
@@ -1936,7 +1936,7 @@ let H = class extends C {
|
|
|
1936
1936
|
>
|
|
1937
1937
|
<ap-icon name=${this.viewMode === "grid" ? "list" : "layout-grid"} .size=${18}></ap-icon>
|
|
1938
1938
|
</button>
|
|
1939
|
-
${this.hideClose ?
|
|
1939
|
+
${this.hideClose ? f : n`
|
|
1940
1940
|
<div class="divider"></div>
|
|
1941
1941
|
<button class="icon-btn" style="color: var(--ap-muted-foreground, oklch(0.685 0.033 249.82))" @click=${this._handleClose} aria-label="Close">
|
|
1942
1942
|
<ap-icon name="close" .size=${18}></ap-icon>
|
|
@@ -1947,7 +1947,7 @@ let H = class extends C {
|
|
|
1947
1947
|
`;
|
|
1948
1948
|
}
|
|
1949
1949
|
};
|
|
1950
|
-
H.styles = [ee,
|
|
1950
|
+
H.styles = [ee, F`
|
|
1951
1951
|
:host {
|
|
1952
1952
|
display: block;
|
|
1953
1953
|
padding: 16px 20px;
|
|
@@ -2100,53 +2100,53 @@ H.styles = [ee, S`
|
|
|
2100
2100
|
}
|
|
2101
2101
|
`];
|
|
2102
2102
|
te([
|
|
2103
|
-
|
|
2103
|
+
d()
|
|
2104
2104
|
], H.prototype, "activeTab", 2);
|
|
2105
2105
|
te([
|
|
2106
|
-
|
|
2106
|
+
d({ type: Array })
|
|
2107
2107
|
], H.prototype, "tabs", 2);
|
|
2108
2108
|
te([
|
|
2109
|
-
|
|
2109
|
+
d({ type: Boolean })
|
|
2110
2110
|
], H.prototype, "isInsideLabel", 2);
|
|
2111
2111
|
te([
|
|
2112
|
-
|
|
2112
|
+
d({ type: Boolean })
|
|
2113
2113
|
], H.prototype, "isInsideCollection", 2);
|
|
2114
2114
|
te([
|
|
2115
|
-
|
|
2115
|
+
d({ type: Boolean })
|
|
2116
2116
|
], H.prototype, "isInsideCollectionLeaf", 2);
|
|
2117
2117
|
te([
|
|
2118
|
-
|
|
2118
|
+
d()
|
|
2119
2119
|
], H.prototype, "viewMode", 2);
|
|
2120
2120
|
te([
|
|
2121
|
-
|
|
2121
|
+
d()
|
|
2122
2122
|
], H.prototype, "searchQuery", 2);
|
|
2123
2123
|
te([
|
|
2124
|
-
|
|
2124
|
+
d({ type: Array })
|
|
2125
2125
|
], H.prototype, "regionalGroups", 2);
|
|
2126
2126
|
te([
|
|
2127
|
-
|
|
2127
|
+
d({ type: Object })
|
|
2128
2128
|
], H.prototype, "regionalFilters", 2);
|
|
2129
2129
|
te([
|
|
2130
|
-
|
|
2130
|
+
d({ type: Boolean })
|
|
2131
2131
|
], H.prototype, "hideClose", 2);
|
|
2132
2132
|
te([
|
|
2133
|
-
|
|
2133
|
+
d({ type: Boolean, reflect: !0, attribute: "ai-search" })
|
|
2134
2134
|
], H.prototype, "enableAISearch", 2);
|
|
2135
2135
|
te([
|
|
2136
|
-
|
|
2136
|
+
d({ type: Boolean })
|
|
2137
2137
|
], H.prototype, "isAISearchActive", 2);
|
|
2138
2138
|
te([
|
|
2139
2139
|
_()
|
|
2140
2140
|
], H.prototype, "_localSearch", 2);
|
|
2141
2141
|
H = te([
|
|
2142
|
-
|
|
2142
|
+
T("ap-header")
|
|
2143
2143
|
], H);
|
|
2144
2144
|
var co = Object.defineProperty, po = Object.getOwnPropertyDescriptor, Ss = (t, e, s, i) => {
|
|
2145
2145
|
for (var a = i > 1 ? void 0 : i ? po(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
2146
2146
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
2147
2147
|
return i && a && co(e, s, a), a;
|
|
2148
2148
|
};
|
|
2149
|
-
let yt = class extends
|
|
2149
|
+
let yt = class extends E {
|
|
2150
2150
|
constructor() {
|
|
2151
2151
|
super(...arguments), this.items = [], this.rootLabel = "Root";
|
|
2152
2152
|
}
|
|
@@ -2167,7 +2167,7 @@ let yt = class extends C {
|
|
|
2167
2167
|
`;
|
|
2168
2168
|
}
|
|
2169
2169
|
};
|
|
2170
|
-
yt.styles =
|
|
2170
|
+
yt.styles = F`
|
|
2171
2171
|
:host {
|
|
2172
2172
|
display: block;
|
|
2173
2173
|
padding: 4px 20px 12px;
|
|
@@ -2205,20 +2205,20 @@ yt.styles = S`
|
|
|
2205
2205
|
}
|
|
2206
2206
|
`;
|
|
2207
2207
|
Ss([
|
|
2208
|
-
|
|
2208
|
+
d({ type: Array })
|
|
2209
2209
|
], yt.prototype, "items", 2);
|
|
2210
2210
|
Ss([
|
|
2211
|
-
|
|
2211
|
+
d()
|
|
2212
2212
|
], yt.prototype, "rootLabel", 2);
|
|
2213
2213
|
yt = Ss([
|
|
2214
|
-
|
|
2214
|
+
T("ap-breadcrumb")
|
|
2215
2215
|
], yt);
|
|
2216
2216
|
var ho = Object.defineProperty, uo = Object.getOwnPropertyDescriptor, Cs = (t, e, s, i) => {
|
|
2217
2217
|
for (var a = i > 1 ? void 0 : i ? uo(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
2218
2218
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
2219
2219
|
return i && a && ho(e, s, a), a;
|
|
2220
2220
|
};
|
|
2221
|
-
let xt = class extends
|
|
2221
|
+
let xt = class extends E {
|
|
2222
2222
|
constructor() {
|
|
2223
2223
|
super(...arguments), this.title = "", this.open = !1;
|
|
2224
2224
|
}
|
|
@@ -2231,7 +2231,7 @@ let xt = class extends C {
|
|
|
2231
2231
|
` : n``;
|
|
2232
2232
|
}
|
|
2233
2233
|
};
|
|
2234
|
-
xt.styles =
|
|
2234
|
+
xt.styles = F`
|
|
2235
2235
|
:host {
|
|
2236
2236
|
display: block;
|
|
2237
2237
|
}
|
|
@@ -2258,13 +2258,13 @@ xt.styles = S`
|
|
|
2258
2258
|
}
|
|
2259
2259
|
`;
|
|
2260
2260
|
Cs([
|
|
2261
|
-
|
|
2261
|
+
d()
|
|
2262
2262
|
], xt.prototype, "title", 2);
|
|
2263
2263
|
Cs([
|
|
2264
|
-
|
|
2264
|
+
d({ type: Boolean })
|
|
2265
2265
|
], xt.prototype, "open", 2);
|
|
2266
2266
|
xt = Cs([
|
|
2267
|
-
|
|
2267
|
+
T("ap-filter-popover")
|
|
2268
2268
|
], xt);
|
|
2269
2269
|
var fo = Object.defineProperty, go = Object.getOwnPropertyDescriptor, Lt = (t, e, s, i) => {
|
|
2270
2270
|
for (var a = i > 1 ? void 0 : i ? go(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -2299,7 +2299,7 @@ function ai(t) {
|
|
|
2299
2299
|
return (r === -1 ? 999 : r) - (l === -1 ? 999 : l);
|
|
2300
2300
|
});
|
|
2301
2301
|
}
|
|
2302
|
-
let Ke = class extends
|
|
2302
|
+
let Ke = class extends E {
|
|
2303
2303
|
constructor() {
|
|
2304
2304
|
super(...arguments), this.selected = [], this.fileTypes = [], this._search = "", this._expanded = /* @__PURE__ */ new Set();
|
|
2305
2305
|
}
|
|
@@ -2347,7 +2347,7 @@ let Ke = class extends C {
|
|
|
2347
2347
|
detail: {
|
|
2348
2348
|
key: y.TYPE,
|
|
2349
2349
|
values: t,
|
|
2350
|
-
operator:
|
|
2350
|
+
operator: L.IS
|
|
2351
2351
|
},
|
|
2352
2352
|
bubbles: !0,
|
|
2353
2353
|
composed: !0
|
|
@@ -2401,7 +2401,7 @@ let Ke = class extends C {
|
|
|
2401
2401
|
/>
|
|
2402
2402
|
<div class="header-row">
|
|
2403
2403
|
<span class="section-label">Formats</span>
|
|
2404
|
-
${s ? n`<button class="clear-btn" @click=${this._clearAll}>Clear all</button>` :
|
|
2404
|
+
${s ? n`<button class="clear-btn" @click=${this._clearAll}>Clear all</button>` : f}
|
|
2405
2405
|
</div>
|
|
2406
2406
|
<div class="groups">
|
|
2407
2407
|
${e.length === 0 && this._search.trim() ? n`<div class="no-results">No formats found</div>` : e.map((i) => this._renderGroup(i))}
|
|
@@ -2443,7 +2443,7 @@ let Ke = class extends C {
|
|
|
2443
2443
|
</div>
|
|
2444
2444
|
`)}
|
|
2445
2445
|
</div>
|
|
2446
|
-
` :
|
|
2446
|
+
` : f}
|
|
2447
2447
|
`;
|
|
2448
2448
|
}
|
|
2449
2449
|
_renderFallback() {
|
|
@@ -2466,7 +2466,7 @@ let Ke = class extends C {
|
|
|
2466
2466
|
`;
|
|
2467
2467
|
}
|
|
2468
2468
|
};
|
|
2469
|
-
Ke.styles =
|
|
2469
|
+
Ke.styles = F`
|
|
2470
2470
|
:host {
|
|
2471
2471
|
display: block;
|
|
2472
2472
|
}
|
|
@@ -2622,10 +2622,10 @@ Ke.styles = S`
|
|
|
2622
2622
|
}
|
|
2623
2623
|
`;
|
|
2624
2624
|
Lt([
|
|
2625
|
-
|
|
2625
|
+
d({ type: Array })
|
|
2626
2626
|
], Ke.prototype, "selected", 2);
|
|
2627
2627
|
Lt([
|
|
2628
|
-
|
|
2628
|
+
d({ type: Array })
|
|
2629
2629
|
], Ke.prototype, "fileTypes", 2);
|
|
2630
2630
|
Lt([
|
|
2631
2631
|
_()
|
|
@@ -2634,9 +2634,9 @@ Lt([
|
|
|
2634
2634
|
_()
|
|
2635
2635
|
], Ke.prototype, "_expanded", 2);
|
|
2636
2636
|
Ke = Lt([
|
|
2637
|
-
|
|
2637
|
+
T("ap-filter-type")
|
|
2638
2638
|
], Ke);
|
|
2639
|
-
const Te =
|
|
2639
|
+
const Te = F`
|
|
2640
2640
|
:host {
|
|
2641
2641
|
display: block;
|
|
2642
2642
|
}
|
|
@@ -2928,7 +2928,7 @@ var vo = Object.defineProperty, mo = Object.getOwnPropertyDescriptor, Je = (t, e
|
|
|
2928
2928
|
function hs(t) {
|
|
2929
2929
|
return t.toISOString().split("T")[0];
|
|
2930
2930
|
}
|
|
2931
|
-
let Ce = class extends
|
|
2931
|
+
let Ce = class extends E {
|
|
2932
2932
|
constructor() {
|
|
2933
2933
|
super(...arguments), this.filterKey = y.DATE, this.field = "created", this.kind = null, this.preset = "", this.from = "", this.to = "";
|
|
2934
2934
|
}
|
|
@@ -2994,7 +2994,7 @@ let Ce = class extends C {
|
|
|
2994
2994
|
this.preset === "after" && t === "from" && i && (this.to = (/* @__PURE__ */ new Date()).toISOString()), this.preset === "before" && t === "to" && i && (this.from = (/* @__PURE__ */ new Date(0)).toISOString()), this._dispatchChange();
|
|
2995
2995
|
}
|
|
2996
2996
|
_renderDateTypeSection() {
|
|
2997
|
-
return this._isLicenseExpiry ?
|
|
2997
|
+
return this._isLicenseExpiry ? f : n`
|
|
2998
2998
|
<div class="filter-section">
|
|
2999
2999
|
<span class="section-label">Date type</span>
|
|
3000
3000
|
<ap-radio-group
|
|
@@ -3021,7 +3021,7 @@ let Ce = class extends C {
|
|
|
3021
3021
|
}
|
|
3022
3022
|
_renderDateInputs() {
|
|
3023
3023
|
const t = this.preset;
|
|
3024
|
-
if (!["before", "after", "between", "specific"].includes(t)) return
|
|
3024
|
+
if (!["before", "after", "between", "specific"].includes(t)) return f;
|
|
3025
3025
|
const e = this.from ? hs(new Date(this.from)) : "", s = this.to ? hs(new Date(this.to)) : "", i = this._todayStr;
|
|
3026
3026
|
return t === "specific" ? n`
|
|
3027
3027
|
<div class="filter-section date-inputs">
|
|
@@ -3105,38 +3105,38 @@ let Ce = class extends C {
|
|
|
3105
3105
|
`;
|
|
3106
3106
|
}
|
|
3107
3107
|
};
|
|
3108
|
-
Ce.styles = [Te,
|
|
3108
|
+
Ce.styles = [Te, F`
|
|
3109
3109
|
.date-inputs {
|
|
3110
3110
|
margin-top: 4px;
|
|
3111
3111
|
}
|
|
3112
3112
|
`];
|
|
3113
3113
|
Je([
|
|
3114
|
-
|
|
3114
|
+
d()
|
|
3115
3115
|
], Ce.prototype, "filterKey", 2);
|
|
3116
3116
|
Je([
|
|
3117
|
-
|
|
3117
|
+
d()
|
|
3118
3118
|
], Ce.prototype, "field", 2);
|
|
3119
3119
|
Je([
|
|
3120
|
-
|
|
3120
|
+
d()
|
|
3121
3121
|
], Ce.prototype, "kind", 2);
|
|
3122
3122
|
Je([
|
|
3123
|
-
|
|
3123
|
+
d()
|
|
3124
3124
|
], Ce.prototype, "preset", 2);
|
|
3125
3125
|
Je([
|
|
3126
|
-
|
|
3126
|
+
d()
|
|
3127
3127
|
], Ce.prototype, "from", 2);
|
|
3128
3128
|
Je([
|
|
3129
|
-
|
|
3129
|
+
d()
|
|
3130
3130
|
], Ce.prototype, "to", 2);
|
|
3131
3131
|
Ce = Je([
|
|
3132
|
-
|
|
3132
|
+
T("ap-filter-date")
|
|
3133
3133
|
], Ce);
|
|
3134
3134
|
var bo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, gt = (t, e, s, i) => {
|
|
3135
3135
|
for (var a = i > 1 ? void 0 : i ? _o(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
3136
3136
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
3137
3137
|
return i && a && bo(e, s, a), a;
|
|
3138
3138
|
};
|
|
3139
|
-
let De = class extends
|
|
3139
|
+
let De = class extends E {
|
|
3140
3140
|
constructor() {
|
|
3141
3141
|
super(...arguments), this.tags = [], this.selected = [], this.filterKey = y.TAGS, this._search = "";
|
|
3142
3142
|
}
|
|
@@ -3167,7 +3167,7 @@ let De = class extends C {
|
|
|
3167
3167
|
detail: {
|
|
3168
3168
|
key: this.filterKey,
|
|
3169
3169
|
values: s,
|
|
3170
|
-
operator:
|
|
3170
|
+
operator: L.IS
|
|
3171
3171
|
},
|
|
3172
3172
|
bubbles: !0,
|
|
3173
3173
|
composed: !0
|
|
@@ -3181,7 +3181,7 @@ let De = class extends C {
|
|
|
3181
3181
|
detail: {
|
|
3182
3182
|
key: this.filterKey,
|
|
3183
3183
|
values: e,
|
|
3184
|
-
operator:
|
|
3184
|
+
operator: L.IS
|
|
3185
3185
|
},
|
|
3186
3186
|
bubbles: !0,
|
|
3187
3187
|
composed: !0
|
|
@@ -3194,7 +3194,7 @@ let De = class extends C {
|
|
|
3194
3194
|
detail: {
|
|
3195
3195
|
key: this.filterKey,
|
|
3196
3196
|
values: [],
|
|
3197
|
-
operator:
|
|
3197
|
+
operator: L.IS
|
|
3198
3198
|
},
|
|
3199
3199
|
bubbles: !0,
|
|
3200
3200
|
composed: !0
|
|
@@ -3215,7 +3215,7 @@ let De = class extends C {
|
|
|
3215
3215
|
return n`
|
|
3216
3216
|
<div
|
|
3217
3217
|
class="tag-item ${s ? "disabled" : ""}"
|
|
3218
|
-
title=${s ? `You can select up to ${as} tags` :
|
|
3218
|
+
title=${s ? `You can select up to ${as} tags` : f}
|
|
3219
3219
|
@click=${() => !s && this._toggle(t.sid)}
|
|
3220
3220
|
>
|
|
3221
3221
|
<ap-checkbox ?checked=${e}></ap-checkbox>
|
|
@@ -3240,7 +3240,7 @@ let De = class extends C {
|
|
|
3240
3240
|
<button class="search-clear" @click=${this._clearSearch}>
|
|
3241
3241
|
<ap-icon name="close" .size=${12}></ap-icon>
|
|
3242
3242
|
</button>
|
|
3243
|
-
` :
|
|
3243
|
+
` : f}
|
|
3244
3244
|
</div>
|
|
3245
3245
|
|
|
3246
3246
|
<!-- Selected chips (when not searching) -->
|
|
@@ -3263,11 +3263,11 @@ let De = class extends C {
|
|
|
3263
3263
|
<ap-icon name="close" .size=${10}></ap-icon>
|
|
3264
3264
|
</button>
|
|
3265
3265
|
</div>
|
|
3266
|
-
` :
|
|
3266
|
+
` : f;
|
|
3267
3267
|
})}
|
|
3268
3268
|
</div>
|
|
3269
3269
|
</div>
|
|
3270
|
-
` :
|
|
3270
|
+
` : f}
|
|
3271
3271
|
|
|
3272
3272
|
${this._isSearching ? this._renderSearchResults(t) : this._renderSections()}
|
|
3273
3273
|
|
|
@@ -3277,7 +3277,7 @@ let De = class extends C {
|
|
|
3277
3277
|
<ap-icon name="info" .size=${14}></ap-icon>
|
|
3278
3278
|
<span>You can select up to ${as} tags.</span>
|
|
3279
3279
|
</div>
|
|
3280
|
-
` :
|
|
3280
|
+
` : f}
|
|
3281
3281
|
</div>
|
|
3282
3282
|
`;
|
|
3283
3283
|
}
|
|
@@ -3298,7 +3298,7 @@ let De = class extends C {
|
|
|
3298
3298
|
${s.map((a) => this._renderTagItem(a))}
|
|
3299
3299
|
</div>
|
|
3300
3300
|
</div>
|
|
3301
|
-
` :
|
|
3301
|
+
` : f}
|
|
3302
3302
|
|
|
3303
3303
|
${i.length > 0 ? n`
|
|
3304
3304
|
<div class="filter-section">
|
|
@@ -3314,7 +3314,7 @@ let De = class extends C {
|
|
|
3314
3314
|
${i.map((a) => this._renderTagItem(a))}
|
|
3315
3315
|
</div>
|
|
3316
3316
|
</div>
|
|
3317
|
-
` :
|
|
3317
|
+
` : f}
|
|
3318
3318
|
`;
|
|
3319
3319
|
}
|
|
3320
3320
|
_renderSections() {
|
|
@@ -3325,21 +3325,21 @@ let De = class extends C {
|
|
|
3325
3325
|
);
|
|
3326
3326
|
return n`
|
|
3327
3327
|
<div class="filter-section">
|
|
3328
|
-
${t.length > 0 ? n`<span class="section-label">Suggested tags</span>` :
|
|
3328
|
+
${t.length > 0 ? n`<span class="section-label">Suggested tags</span>` : f}
|
|
3329
3329
|
${t.length > 0 ? n`
|
|
3330
3330
|
<div class="options-list short">
|
|
3331
3331
|
${t.map((e) => this._renderTagItem(e))}
|
|
3332
3332
|
</div>
|
|
3333
|
-
` :
|
|
3333
|
+
` : f}
|
|
3334
3334
|
</div>
|
|
3335
3335
|
|
|
3336
|
-
${t.length > 0 ? n`<div class="separator"></div>` :
|
|
3336
|
+
${t.length > 0 ? n`<div class="separator"></div>` : f}
|
|
3337
3337
|
|
|
3338
3338
|
<div class="hint-message">Find more tags by using search</div>
|
|
3339
3339
|
`;
|
|
3340
3340
|
}
|
|
3341
3341
|
};
|
|
3342
|
-
De.styles = [ee, Te,
|
|
3342
|
+
De.styles = [ee, Te, F`
|
|
3343
3343
|
.tag-item {
|
|
3344
3344
|
display: flex;
|
|
3345
3345
|
align-items: center;
|
|
@@ -3426,13 +3426,13 @@ De.styles = [ee, Te, S`
|
|
|
3426
3426
|
}
|
|
3427
3427
|
`];
|
|
3428
3428
|
gt([
|
|
3429
|
-
|
|
3429
|
+
d({ type: Array })
|
|
3430
3430
|
], De.prototype, "tags", 2);
|
|
3431
3431
|
gt([
|
|
3432
|
-
|
|
3432
|
+
d({ type: Array })
|
|
3433
3433
|
], De.prototype, "selected", 2);
|
|
3434
3434
|
gt([
|
|
3435
|
-
|
|
3435
|
+
d()
|
|
3436
3436
|
], De.prototype, "filterKey", 2);
|
|
3437
3437
|
gt([
|
|
3438
3438
|
Ze(".tag-search")
|
|
@@ -3441,14 +3441,14 @@ gt([
|
|
|
3441
3441
|
_()
|
|
3442
3442
|
], De.prototype, "_search", 2);
|
|
3443
3443
|
De = gt([
|
|
3444
|
-
|
|
3444
|
+
T("ap-filter-tags")
|
|
3445
3445
|
], De);
|
|
3446
3446
|
var yo = Object.defineProperty, xo = Object.getOwnPropertyDescriptor, Ot = (t, e, s, i) => {
|
|
3447
3447
|
for (var a = i > 1 ? void 0 : i ? xo(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
3448
3448
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
3449
3449
|
return i && a && yo(e, s, a), a;
|
|
3450
3450
|
};
|
|
3451
|
-
let Qe = class extends
|
|
3451
|
+
let Qe = class extends E {
|
|
3452
3452
|
constructor() {
|
|
3453
3453
|
super(...arguments), this.labels = [], this.selected = [], this._search = "";
|
|
3454
3454
|
}
|
|
@@ -3473,7 +3473,7 @@ let Qe = class extends C {
|
|
|
3473
3473
|
detail: {
|
|
3474
3474
|
key: y.LABELS,
|
|
3475
3475
|
values: s,
|
|
3476
|
-
operator:
|
|
3476
|
+
operator: L.IS
|
|
3477
3477
|
},
|
|
3478
3478
|
bubbles: !0,
|
|
3479
3479
|
composed: !0
|
|
@@ -3487,7 +3487,7 @@ let Qe = class extends C {
|
|
|
3487
3487
|
detail: {
|
|
3488
3488
|
key: y.LABELS,
|
|
3489
3489
|
values: e,
|
|
3490
|
-
operator:
|
|
3490
|
+
operator: L.IS
|
|
3491
3491
|
},
|
|
3492
3492
|
bubbles: !0,
|
|
3493
3493
|
composed: !0
|
|
@@ -3500,7 +3500,7 @@ let Qe = class extends C {
|
|
|
3500
3500
|
detail: {
|
|
3501
3501
|
key: y.LABELS,
|
|
3502
3502
|
values: [],
|
|
3503
|
-
operator:
|
|
3503
|
+
operator: L.IS
|
|
3504
3504
|
},
|
|
3505
3505
|
bubbles: !0,
|
|
3506
3506
|
composed: !0
|
|
@@ -3521,7 +3521,7 @@ let Qe = class extends C {
|
|
|
3521
3521
|
return n`
|
|
3522
3522
|
<div
|
|
3523
3523
|
class="label-item ${s ? "disabled" : ""}"
|
|
3524
|
-
title=${s ? `You can select up to ${os} labels` :
|
|
3524
|
+
title=${s ? `You can select up to ${os} labels` : f}
|
|
3525
3525
|
@click=${() => !s && this._toggle(t.sid)}
|
|
3526
3526
|
>
|
|
3527
3527
|
<ap-checkbox ?checked=${e}></ap-checkbox>
|
|
@@ -3553,7 +3553,7 @@ let Qe = class extends C {
|
|
|
3553
3553
|
<button class="search-clear" @click=${this._clearSearch}>
|
|
3554
3554
|
<ap-icon name="close" .size=${12}></ap-icon>
|
|
3555
3555
|
</button>
|
|
3556
|
-
` :
|
|
3556
|
+
` : f}
|
|
3557
3557
|
</div>
|
|
3558
3558
|
|
|
3559
3559
|
<!-- Selected chips (when not searching) -->
|
|
@@ -3579,11 +3579,11 @@ let Qe = class extends C {
|
|
|
3579
3579
|
<ap-icon name="close" .size=${10}></ap-icon>
|
|
3580
3580
|
</button>
|
|
3581
3581
|
</div>
|
|
3582
|
-
` :
|
|
3582
|
+
` : f;
|
|
3583
3583
|
})}
|
|
3584
3584
|
</div>
|
|
3585
3585
|
</div>
|
|
3586
|
-
` :
|
|
3586
|
+
` : f}
|
|
3587
3587
|
|
|
3588
3588
|
<!-- Labels list -->
|
|
3589
3589
|
<div class="filter-section">
|
|
@@ -3606,12 +3606,12 @@ let Qe = class extends C {
|
|
|
3606
3606
|
<ap-icon name="info" .size=${14}></ap-icon>
|
|
3607
3607
|
<span>You can select up to ${os} labels.</span>
|
|
3608
3608
|
</div>
|
|
3609
|
-
` :
|
|
3609
|
+
` : f}
|
|
3610
3610
|
</div>
|
|
3611
3611
|
`;
|
|
3612
3612
|
}
|
|
3613
3613
|
};
|
|
3614
|
-
Qe.styles = [Te,
|
|
3614
|
+
Qe.styles = [Te, F`
|
|
3615
3615
|
.label-item {
|
|
3616
3616
|
display: flex;
|
|
3617
3617
|
align-items: center;
|
|
@@ -3662,10 +3662,10 @@ Qe.styles = [Te, S`
|
|
|
3662
3662
|
}
|
|
3663
3663
|
`];
|
|
3664
3664
|
Ot([
|
|
3665
|
-
|
|
3665
|
+
d({ type: Array })
|
|
3666
3666
|
], Qe.prototype, "labels", 2);
|
|
3667
3667
|
Ot([
|
|
3668
|
-
|
|
3668
|
+
d({ type: Array })
|
|
3669
3669
|
], Qe.prototype, "selected", 2);
|
|
3670
3670
|
Ot([
|
|
3671
3671
|
Ze(".search-input")
|
|
@@ -3674,7 +3674,7 @@ Ot([
|
|
|
3674
3674
|
_()
|
|
3675
3675
|
], Qe.prototype, "_search", 2);
|
|
3676
3676
|
Qe = Ot([
|
|
3677
|
-
|
|
3677
|
+
T("ap-filter-labels")
|
|
3678
3678
|
], Qe);
|
|
3679
3679
|
var wo = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, vt = (t, e, s, i) => {
|
|
3680
3680
|
for (var a = i > 1 ? void 0 : i ? $o(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -3690,7 +3690,7 @@ function ko(t) {
|
|
|
3690
3690
|
coverage: e[3] || jt
|
|
3691
3691
|
};
|
|
3692
3692
|
}
|
|
3693
|
-
let ze = class extends
|
|
3693
|
+
let ze = class extends E {
|
|
3694
3694
|
constructor() {
|
|
3695
3695
|
super(...arguments), this.values = [], this._colors = [], this._advanced = !1, this._showPalette = !1, this._initialized = !1;
|
|
3696
3696
|
}
|
|
@@ -3883,7 +3883,7 @@ let ze = class extends C {
|
|
|
3883
3883
|
</div>
|
|
3884
3884
|
|
|
3885
3885
|
<div class="filter-section">
|
|
3886
|
-
${t ? this._renderPalette() :
|
|
3886
|
+
${t ? this._renderPalette() : f}
|
|
3887
3887
|
</div>
|
|
3888
3888
|
|
|
3889
3889
|
${this._colors.length > 0 ? n`
|
|
@@ -3892,7 +3892,7 @@ let ze = class extends C {
|
|
|
3892
3892
|
${this._colors.map((s, i) => this._renderColorEntry(s, i))}
|
|
3893
3893
|
</div>
|
|
3894
3894
|
</div>
|
|
3895
|
-
` :
|
|
3895
|
+
` : f}
|
|
3896
3896
|
|
|
3897
3897
|
${e ? n`
|
|
3898
3898
|
<div class="filter-section">
|
|
@@ -3901,7 +3901,7 @@ let ze = class extends C {
|
|
|
3901
3901
|
Add color
|
|
3902
3902
|
</button>
|
|
3903
3903
|
</div>
|
|
3904
|
-
` :
|
|
3904
|
+
` : f}
|
|
3905
3905
|
|
|
3906
3906
|
<div class="info-alert">
|
|
3907
3907
|
<ap-icon name="info" .size=${14}></ap-icon>
|
|
@@ -3911,7 +3911,7 @@ let ze = class extends C {
|
|
|
3911
3911
|
`;
|
|
3912
3912
|
}
|
|
3913
3913
|
};
|
|
3914
|
-
ze.styles = [ee, Te,
|
|
3914
|
+
ze.styles = [ee, Te, F`
|
|
3915
3915
|
/* ── Palette ── */
|
|
3916
3916
|
.palette {
|
|
3917
3917
|
display: grid;
|
|
@@ -4150,7 +4150,7 @@ ze.styles = [ee, Te, S`
|
|
|
4150
4150
|
}
|
|
4151
4151
|
`];
|
|
4152
4152
|
vt([
|
|
4153
|
-
|
|
4153
|
+
d({ type: Array })
|
|
4154
4154
|
], ze.prototype, "values", 2);
|
|
4155
4155
|
vt([
|
|
4156
4156
|
_()
|
|
@@ -4165,7 +4165,7 @@ vt([
|
|
|
4165
4165
|
_()
|
|
4166
4166
|
], ze.prototype, "_initialized", 2);
|
|
4167
4167
|
ze = vt([
|
|
4168
|
-
|
|
4168
|
+
T("ap-filter-color")
|
|
4169
4169
|
], ze);
|
|
4170
4170
|
var So = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, et = (t, e, s, i) => {
|
|
4171
4171
|
for (var a = i > 1 ? void 0 : i ? Co(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -4181,7 +4181,7 @@ const Fo = {
|
|
|
4181
4181
|
{ value: "MB", label: "MB" },
|
|
4182
4182
|
{ value: "GB", label: "GB" }
|
|
4183
4183
|
];
|
|
4184
|
-
let Fe = class extends
|
|
4184
|
+
let Fe = class extends E {
|
|
4185
4185
|
constructor() {
|
|
4186
4186
|
super(...arguments), this.min = 0, this.max = 0, this._minVal = "", this._maxVal = "", this._unit = "MB", this._initialized = !1;
|
|
4187
4187
|
}
|
|
@@ -4212,7 +4212,7 @@ let Fe = class extends C {
|
|
|
4212
4212
|
detail: {
|
|
4213
4213
|
key: y.SIZE,
|
|
4214
4214
|
values: [],
|
|
4215
|
-
operator:
|
|
4215
|
+
operator: L.RANGE
|
|
4216
4216
|
},
|
|
4217
4217
|
bubbles: !0,
|
|
4218
4218
|
composed: !0
|
|
@@ -4225,7 +4225,7 @@ let Fe = class extends C {
|
|
|
4225
4225
|
detail: {
|
|
4226
4226
|
key: y.SIZE,
|
|
4227
4227
|
values: [i],
|
|
4228
|
-
operator:
|
|
4228
|
+
operator: L.RANGE
|
|
4229
4229
|
},
|
|
4230
4230
|
bubbles: !0,
|
|
4231
4231
|
composed: !0
|
|
@@ -4288,7 +4288,7 @@ let Fe = class extends C {
|
|
|
4288
4288
|
};
|
|
4289
4289
|
Fe.styles = [
|
|
4290
4290
|
Te,
|
|
4291
|
-
|
|
4291
|
+
F`
|
|
4292
4292
|
/* Hide number input spinners */
|
|
4293
4293
|
.filter-input[type='number']::-webkit-inner-spin-button,
|
|
4294
4294
|
.filter-input[type='number']::-webkit-outer-spin-button {
|
|
@@ -4310,10 +4310,10 @@ Fe.styles = [
|
|
|
4310
4310
|
`
|
|
4311
4311
|
];
|
|
4312
4312
|
et([
|
|
4313
|
-
|
|
4313
|
+
d({ type: Number })
|
|
4314
4314
|
], Fe.prototype, "min", 2);
|
|
4315
4315
|
et([
|
|
4316
|
-
|
|
4316
|
+
d({ type: Number })
|
|
4317
4317
|
], Fe.prototype, "max", 2);
|
|
4318
4318
|
et([
|
|
4319
4319
|
_()
|
|
@@ -4328,7 +4328,7 @@ et([
|
|
|
4328
4328
|
_()
|
|
4329
4329
|
], Fe.prototype, "_initialized", 2);
|
|
4330
4330
|
Fe = et([
|
|
4331
|
-
|
|
4331
|
+
T("ap-filter-size")
|
|
4332
4332
|
], Fe);
|
|
4333
4333
|
var Eo = Object.defineProperty, To = Object.getOwnPropertyDescriptor, Jt = (t, e, s, i) => {
|
|
4334
4334
|
for (var a = i > 1 ? void 0 : i ? To(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -4367,7 +4367,7 @@ const Lo = Ie`
|
|
|
4367
4367
|
square: Mo,
|
|
4368
4368
|
panorama: Io
|
|
4369
4369
|
};
|
|
4370
|
-
let pt = class extends
|
|
4370
|
+
let pt = class extends E {
|
|
4371
4371
|
constructor() {
|
|
4372
4372
|
super(...arguments), this.selectedResolution = [], this.selectedOrientation = [], this.selectedFaces = [];
|
|
4373
4373
|
}
|
|
@@ -4470,7 +4470,7 @@ let pt = class extends C {
|
|
|
4470
4470
|
`;
|
|
4471
4471
|
}
|
|
4472
4472
|
};
|
|
4473
|
-
pt.styles = [Te,
|
|
4473
|
+
pt.styles = [Te, F`
|
|
4474
4474
|
.options-horizontal {
|
|
4475
4475
|
display: flex;
|
|
4476
4476
|
gap: 28px;
|
|
@@ -4493,26 +4493,26 @@ pt.styles = [Te, S`
|
|
|
4493
4493
|
}
|
|
4494
4494
|
`];
|
|
4495
4495
|
Jt([
|
|
4496
|
-
|
|
4496
|
+
d({ type: Array })
|
|
4497
4497
|
], pt.prototype, "selectedResolution", 2);
|
|
4498
4498
|
Jt([
|
|
4499
|
-
|
|
4499
|
+
d({ type: Array })
|
|
4500
4500
|
], pt.prototype, "selectedOrientation", 2);
|
|
4501
4501
|
Jt([
|
|
4502
|
-
|
|
4502
|
+
d({ type: Array })
|
|
4503
4503
|
], pt.prototype, "selectedFaces", 2);
|
|
4504
4504
|
pt = Jt([
|
|
4505
|
-
|
|
4505
|
+
T("ap-filter-image")
|
|
4506
4506
|
], pt);
|
|
4507
4507
|
var Do = Object.defineProperty, zo = Object.getOwnPropertyDescriptor, N = (t, e, s, i) => {
|
|
4508
4508
|
for (var a = i > 1 ? void 0 : i ? zo(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
4509
4509
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
4510
4510
|
return i && a && Do(e, s, a), a;
|
|
4511
4511
|
};
|
|
4512
|
-
function
|
|
4512
|
+
function I(t) {
|
|
4513
4513
|
return `${Xt[t.type] || ""}${t.key}`;
|
|
4514
4514
|
}
|
|
4515
|
-
let j = class extends
|
|
4515
|
+
let j = class extends E {
|
|
4516
4516
|
constructor() {
|
|
4517
4517
|
super(...arguments), this.fields = [], this.appliedFilters = {}, this.visibleFields = [], this.mode = "full", this.activeFieldKey = "", this.pinnedFields = [], this.appliedMetadata = {}, this._showFieldSelection = !1, this._fieldSearch = "", this._collapsedFields = /* @__PURE__ */ new Set(), this._tagInputs = {}, this._tagSuggestions = {}, this._tagLoading = {}, this._datePresets = {}, this._dateFroms = {}, this._dateTos = {}, this._specificModeFields = /* @__PURE__ */ new Set(), this._selectSearches = {}, this._tagDebounceTimers = {};
|
|
4518
4518
|
}
|
|
@@ -4533,7 +4533,7 @@ let j = class extends C {
|
|
|
4533
4533
|
return this.visibleFields.length >= zt;
|
|
4534
4534
|
}
|
|
4535
4535
|
_getField(t) {
|
|
4536
|
-
return this.fields.find((e) =>
|
|
4536
|
+
return this.fields.find((e) => I(e) === t);
|
|
4537
4537
|
}
|
|
4538
4538
|
_getUIType(t) {
|
|
4539
4539
|
return va[t.type];
|
|
@@ -4552,7 +4552,7 @@ let j = class extends C {
|
|
|
4552
4552
|
}
|
|
4553
4553
|
// ── Event dispatchers ────────────────────────────────────────────
|
|
4554
4554
|
_emitFilterChange(t, e, s) {
|
|
4555
|
-
const i =
|
|
4555
|
+
const i = I(t);
|
|
4556
4556
|
this.dispatchEvent(
|
|
4557
4557
|
new CustomEvent("metadata-filter-change", {
|
|
4558
4558
|
detail: {
|
|
@@ -4567,7 +4567,7 @@ let j = class extends C {
|
|
|
4567
4567
|
);
|
|
4568
4568
|
}
|
|
4569
4569
|
_emitFieldToggle(t, e) {
|
|
4570
|
-
const s =
|
|
4570
|
+
const s = I(t);
|
|
4571
4571
|
this.dispatchEvent(
|
|
4572
4572
|
new CustomEvent("metadata-field-toggle", {
|
|
4573
4573
|
detail: { fieldKey: s, visible: e },
|
|
@@ -4577,7 +4577,7 @@ let j = class extends C {
|
|
|
4577
4577
|
);
|
|
4578
4578
|
}
|
|
4579
4579
|
_emitFieldSelect(t) {
|
|
4580
|
-
const e =
|
|
4580
|
+
const e = I(t);
|
|
4581
4581
|
!this.visibleFields.includes(e) && this._atFieldLimit || (this.visibleFields.includes(e) || this._emitFieldToggle(t, !0), this.dispatchEvent(
|
|
4582
4582
|
new CustomEvent("metadata-field-select", {
|
|
4583
4583
|
detail: { fieldKey: e },
|
|
@@ -4604,7 +4604,7 @@ let j = class extends C {
|
|
|
4604
4604
|
}
|
|
4605
4605
|
_addField(t) {
|
|
4606
4606
|
if (this._atFieldLimit) return;
|
|
4607
|
-
const e =
|
|
4607
|
+
const e = I(t);
|
|
4608
4608
|
this.visibleFields.includes(e) || this._emitFieldToggle(t, !0);
|
|
4609
4609
|
}
|
|
4610
4610
|
_removeField(t) {
|
|
@@ -4616,12 +4616,12 @@ let j = class extends C {
|
|
|
4616
4616
|
}
|
|
4617
4617
|
// ── Operator change (via radio group) ─────────────────────────────
|
|
4618
4618
|
_onOperatorChange(t, e) {
|
|
4619
|
-
const i = this._getApplied(
|
|
4619
|
+
const i = this._getApplied(I(t)).values || [];
|
|
4620
4620
|
this._emitFilterChange(t, e, i);
|
|
4621
4621
|
}
|
|
4622
4622
|
// ── Content mode change ─────────────────────────────────────────
|
|
4623
4623
|
_onContentModeChange(t, e) {
|
|
4624
|
-
const s =
|
|
4624
|
+
const s = I(t);
|
|
4625
4625
|
if (e === Be) {
|
|
4626
4626
|
const i = new Set(this._specificModeFields);
|
|
4627
4627
|
i.add(s), this._specificModeFields = i;
|
|
@@ -4642,10 +4642,10 @@ let j = class extends C {
|
|
|
4642
4642
|
}
|
|
4643
4643
|
// ── Clear field filter ──────────────────────────────────────────
|
|
4644
4644
|
_clearFieldFilter(t) {
|
|
4645
|
-
const e =
|
|
4645
|
+
const e = I(t);
|
|
4646
4646
|
if (this._specificModeFields.has(e)) {
|
|
4647
|
-
const
|
|
4648
|
-
|
|
4647
|
+
const p = new Set(this._specificModeFields);
|
|
4648
|
+
p.delete(e), this._specificModeFields = p;
|
|
4649
4649
|
}
|
|
4650
4650
|
const { [e]: s, ...i } = this._datePresets;
|
|
4651
4651
|
this._datePresets = i;
|
|
@@ -4660,16 +4660,16 @@ let j = class extends C {
|
|
|
4660
4660
|
}
|
|
4661
4661
|
// ── Text filter ──────────────────────────────────────────────────
|
|
4662
4662
|
_onTextInput(t, e) {
|
|
4663
|
-
const s = e.target.value, a = this._getApplied(
|
|
4663
|
+
const s = e.target.value, a = this._getApplied(I(t)).operator || ns[0].value;
|
|
4664
4664
|
this._emitFilterChange(t, a, s ? [s] : []);
|
|
4665
4665
|
}
|
|
4666
4666
|
// ── Number filter ────────────────────────────────────────────────
|
|
4667
4667
|
_onNumberInput(t, e, s) {
|
|
4668
|
-
const i = e.target.value, a =
|
|
4668
|
+
const i = e.target.value, a = I(t), o = this._getApplied(a), r = o.operator || cs[0].value, l = [...o.values || []];
|
|
4669
4669
|
s === 0 ? l[0] = i : l[1] = i;
|
|
4670
4670
|
const c = l.filter((h) => h !== "" && h !== void 0);
|
|
4671
4671
|
if (c.length > 0) {
|
|
4672
|
-
const h = t.type ===
|
|
4672
|
+
const h = t.type === S.DECIMAL2;
|
|
4673
4673
|
if (!c.every(
|
|
4674
4674
|
(g) => h ? !isNaN(parseFloat(g)) : /^-?\d+$/.test(g)
|
|
4675
4675
|
)) return;
|
|
@@ -4679,22 +4679,22 @@ let j = class extends C {
|
|
|
4679
4679
|
// ── Boolean filter ───────────────────────────────────────────────
|
|
4680
4680
|
_onBooleanSelect(t, e) {
|
|
4681
4681
|
var a;
|
|
4682
|
-
const s = this._getApplied(
|
|
4682
|
+
const s = this._getApplied(I(t)), i = (a = s.values) == null ? void 0 : a[0];
|
|
4683
4683
|
!e || i === e ? this._emitFilterChange(t, void 0, []) : this._emitFilterChange(t, s.operator, [e]);
|
|
4684
4684
|
}
|
|
4685
4685
|
// ── Select-one filter ────────────────────────────────────────────
|
|
4686
4686
|
_onSelectOneToggle(t, e) {
|
|
4687
|
-
const s =
|
|
4687
|
+
const s = I(t), i = this._getApplied(s), a = i.operator || Se[0].value, o = i.values || [];
|
|
4688
4688
|
o.length === 1 && o[0] === e ? this._emitFilterChange(t, a, []) : this._emitFilterChange(t, a, [e]);
|
|
4689
4689
|
}
|
|
4690
4690
|
// ── Multi-select filter ──────────────────────────────────────────
|
|
4691
4691
|
_onMultiSelectToggle(t, e) {
|
|
4692
|
-
const s =
|
|
4692
|
+
const s = I(t), i = this._getApplied(s), a = i.operator || ls[0].value, o = i.values || [], r = o.includes(e) ? o.filter((l) => l !== e) : [...o, e];
|
|
4693
4693
|
this._emitFilterChange(t, a, r);
|
|
4694
4694
|
}
|
|
4695
4695
|
// ── Tags filter ──────────────────────────────────────────────────
|
|
4696
4696
|
_onTagKeydown(t, e) {
|
|
4697
|
-
const s =
|
|
4697
|
+
const s = I(t);
|
|
4698
4698
|
(e.key === "Enter" || e.key === ",") && (e.preventDefault(), this._commitTagInput(t, s));
|
|
4699
4699
|
}
|
|
4700
4700
|
_onTagInput(t, e, s) {
|
|
@@ -4707,7 +4707,7 @@ let j = class extends C {
|
|
|
4707
4707
|
this._tagInputs = { ...this._tagInputs, [e]: i }, this._fetchTagSuggestions(t, e, i.trim());
|
|
4708
4708
|
}
|
|
4709
4709
|
_selectTagSuggestion(t, e) {
|
|
4710
|
-
const s =
|
|
4710
|
+
const s = I(t), i = this._getApplied(s), a = i.operator || Se[0].value, o = i.values || [];
|
|
4711
4711
|
o.includes(e) || this._emitFilterChange(t, a, [...o, e]), this._tagInputs = { ...this._tagInputs, [s]: "" }, this._tagSuggestions = { ...this._tagSuggestions, [s]: [] };
|
|
4712
4712
|
}
|
|
4713
4713
|
_fetchTagSuggestions(t, e, s) {
|
|
@@ -4740,7 +4740,7 @@ let j = class extends C {
|
|
|
4740
4740
|
o.includes(s) || this._emitFilterChange(t, a, [...o, s]), this._tagInputs = { ...this._tagInputs, [e]: "" }, this._tagSuggestions = { ...this._tagSuggestions, [e]: [] };
|
|
4741
4741
|
}
|
|
4742
4742
|
_removeTag(t, e) {
|
|
4743
|
-
const s =
|
|
4743
|
+
const s = I(t), i = this._getApplied(s), a = i.operator || Se[0].value, o = i.values || [];
|
|
4744
4744
|
this._emitFilterChange(
|
|
4745
4745
|
t,
|
|
4746
4746
|
a,
|
|
@@ -4748,12 +4748,12 @@ let j = class extends C {
|
|
|
4748
4748
|
);
|
|
4749
4749
|
}
|
|
4750
4750
|
_onTagOperatorChange(t, e) {
|
|
4751
|
-
const s =
|
|
4751
|
+
const s = I(t), a = this._getApplied(s).values || [];
|
|
4752
4752
|
this._emitFilterChange(t, e, a);
|
|
4753
4753
|
}
|
|
4754
4754
|
// ── Date filter ──────────────────────────────────────────────────
|
|
4755
4755
|
_onDatePreset(t, e) {
|
|
4756
|
-
const s =
|
|
4756
|
+
const s = I(t);
|
|
4757
4757
|
if (!e) {
|
|
4758
4758
|
this._clearFieldFilter(t);
|
|
4759
4759
|
return;
|
|
@@ -4795,7 +4795,7 @@ let j = class extends C {
|
|
|
4795
4795
|
a && o && (this._dateFroms = { ...this._dateFroms, [s]: a }, this._dateTos = { ...this._dateTos, [s]: o }, this._emitFilterChange(t, "..", [a, o]));
|
|
4796
4796
|
}
|
|
4797
4797
|
_onDateInput(t, e, s) {
|
|
4798
|
-
const i = s.target.value, a =
|
|
4798
|
+
const i = s.target.value, a = I(t), o = this._datePresets[a] || "", r = i ? (/* @__PURE__ */ new Date(i + "T00:00:00")).toISOString() : "";
|
|
4799
4799
|
e === "from" ? this._dateFroms = { ...this._dateFroms, [a]: r } : this._dateTos = { ...this._dateTos, [a]: r };
|
|
4800
4800
|
let l = this._dateFroms[a] || "", c = this._dateTos[a] || "";
|
|
4801
4801
|
o === "after" && l && (c = (/* @__PURE__ */ new Date()).toISOString(), this._dateTos = { ...this._dateTos, [a]: c }), o === "before" && c && (l = (/* @__PURE__ */ new Date(0)).toISOString(), this._dateFroms = { ...this._dateFroms, [a]: l }), l && c && this._emitFilterChange(t, "..", [l, c]);
|
|
@@ -4803,32 +4803,32 @@ let j = class extends C {
|
|
|
4803
4803
|
// ── Geo filter ───────────────────────────────────────────────────
|
|
4804
4804
|
_onGeoLocationInput(t, e) {
|
|
4805
4805
|
var g;
|
|
4806
|
-
const s = e.target.value.trim(), i =
|
|
4806
|
+
const s = e.target.value.trim(), i = I(t), a = (g = this.shadowRoot) == null ? void 0 : g.querySelector(
|
|
4807
4807
|
`[data-geo-radius="${i}"]`
|
|
4808
4808
|
), o = (a == null ? void 0 : a.value) || "";
|
|
4809
4809
|
if (!s) {
|
|
4810
4810
|
this._emitFilterChange(t, void 0, []);
|
|
4811
4811
|
return;
|
|
4812
4812
|
}
|
|
4813
|
-
const r = s.split(",").map((
|
|
4814
|
-
if (r.length !== 2 || r.some((
|
|
4813
|
+
const r = s.split(",").map((p) => p.trim());
|
|
4814
|
+
if (r.length !== 2 || r.some((p) => isNaN(Number(p)) || p === ""))
|
|
4815
4815
|
return;
|
|
4816
4816
|
const [l, c] = r;
|
|
4817
4817
|
let u = `${l},${c}..${o || "0"}`;
|
|
4818
|
-
this._emitFilterChange(t,
|
|
4818
|
+
this._emitFilterChange(t, L.IS, [u]);
|
|
4819
4819
|
}
|
|
4820
4820
|
_onGeoRadiusInput(t, e) {
|
|
4821
4821
|
var c;
|
|
4822
|
-
const s = e.target.value, i =
|
|
4822
|
+
const s = e.target.value, i = I(t), a = this._getApplied(i);
|
|
4823
4823
|
if (!((c = a.values) != null && c[0])) return;
|
|
4824
4824
|
const o = a.values[0], [r] = o.split("..");
|
|
4825
4825
|
let l = r;
|
|
4826
|
-
s && (l += `..${s}`), this._emitFilterChange(t,
|
|
4826
|
+
s && (l += `..${s}`), this._emitFilterChange(t, L.IS, [l]);
|
|
4827
4827
|
}
|
|
4828
4828
|
// ── Empty/non-empty option click ─────────────────────────────────
|
|
4829
4829
|
_onEmptyOption(t, e) {
|
|
4830
4830
|
var a;
|
|
4831
|
-
const s = this._getApplied(
|
|
4831
|
+
const s = this._getApplied(I(t)), i = (a = s.values) == null ? void 0 : a[0];
|
|
4832
4832
|
!e || i === e ? this._emitFilterChange(t, s.operator, []) : this._emitFilterChange(t, s.operator, [e]);
|
|
4833
4833
|
}
|
|
4834
4834
|
// ── Render: Field selection panel ────────────────────────────────
|
|
@@ -4843,10 +4843,10 @@ let j = class extends C {
|
|
|
4843
4843
|
_renderFieldSelection() {
|
|
4844
4844
|
const t = this._fieldSearch.toLowerCase(), e = this.fields.filter(
|
|
4845
4845
|
(a) => a.label.toLowerCase().includes(t)
|
|
4846
|
-
), s = this._getGroupedFields(e), i = (a, o) => o.length === 0 ?
|
|
4846
|
+
), s = this._getGroupedFields(e), i = (a, o) => o.length === 0 ? f : n`
|
|
4847
4847
|
<div class="field-group-label">${a}</div>
|
|
4848
4848
|
${o.map((r) => {
|
|
4849
|
-
const l =
|
|
4849
|
+
const l = I(r), c = this.visibleFields.includes(l), h = !c && this._atFieldLimit;
|
|
4850
4850
|
return n`
|
|
4851
4851
|
<div
|
|
4852
4852
|
class="field-item ${c ? "selected" : ""} ${h ? "disabled" : ""}"
|
|
@@ -4892,7 +4892,7 @@ let j = class extends C {
|
|
|
4892
4892
|
// ── Render: Text filter ──────────────────────────────────────────
|
|
4893
4893
|
_renderTextFilter(t) {
|
|
4894
4894
|
var h, u;
|
|
4895
|
-
const e =
|
|
4895
|
+
const e = I(t), s = this._getApplied(e), a = this._isSpecialValue(s.values) ? "" : ((h = s.values) == null ? void 0 : h[0]) || "", o = this._getContentMode(e), r = o === pe || o === he, l = s.operator || ns[0].value, c = t.type === S.TEXT_AREA;
|
|
4896
4896
|
return n`
|
|
4897
4897
|
<div class="filter-content" style="position: relative;">
|
|
4898
4898
|
<button
|
|
@@ -4945,19 +4945,19 @@ let j = class extends C {
|
|
|
4945
4945
|
/>
|
|
4946
4946
|
`}
|
|
4947
4947
|
</div>
|
|
4948
|
-
` :
|
|
4948
|
+
` : f}
|
|
4949
4949
|
</div>
|
|
4950
4950
|
`;
|
|
4951
4951
|
}
|
|
4952
4952
|
// ── Render: Number filter ────────────────────────────────────────
|
|
4953
4953
|
_renderNumberFilter(t) {
|
|
4954
|
-
var
|
|
4955
|
-
const e =
|
|
4954
|
+
var w, P, C;
|
|
4955
|
+
const e = I(t), s = this._getApplied(e), i = s.operator || cs[0].value, a = this._isSpecialValue(s.values), o = this._getContentMode(e), r = o === pe || o === he, l = i === L.RANGE, c = i === L.GREATER_THAN_OR_EQUAL, h = i === L.LESS_THAN_OR_EQUAL, u = t.type === S.DECIMAL2, g = u ? "0.01" : "1", p = u ? "0.00" : "0", v = a ? "" : ((w = s.values) == null ? void 0 : w[0]) || "", b = a ? "" : ((P = s.values) == null ? void 0 : P[1]) || "", $ = l || c || h, x = l || c || h ? "Min" : "Value";
|
|
4956
4956
|
return n`
|
|
4957
4957
|
<div class="filter-content" style="position: relative;">
|
|
4958
4958
|
<button
|
|
4959
4959
|
class="clear-btn"
|
|
4960
|
-
?disabled=${!((
|
|
4960
|
+
?disabled=${!((C = s.values) != null && C.length) && !s.operator}
|
|
4961
4961
|
@click=${() => this._clearFieldFilter(t)}
|
|
4962
4962
|
>Clear all</button>
|
|
4963
4963
|
|
|
@@ -4968,7 +4968,7 @@ let j = class extends C {
|
|
|
4968
4968
|
.options=${cs}
|
|
4969
4969
|
.value=${i}
|
|
4970
4970
|
?disabled=${r}
|
|
4971
|
-
@ap-change=${(
|
|
4971
|
+
@ap-change=${(A) => this._onOperatorChange(t, A.detail.value)}
|
|
4972
4972
|
></ap-radio-group>
|
|
4973
4973
|
</div>
|
|
4974
4974
|
|
|
@@ -4978,7 +4978,7 @@ let j = class extends C {
|
|
|
4978
4978
|
clearable
|
|
4979
4979
|
.options=${ds}
|
|
4980
4980
|
.value=${o}
|
|
4981
|
-
@ap-change=${(
|
|
4981
|
+
@ap-change=${(A) => this._onContentModeChange(t, A.detail.value)}
|
|
4982
4982
|
></ap-radio-group>
|
|
4983
4983
|
</div>
|
|
4984
4984
|
|
|
@@ -4986,41 +4986,41 @@ let j = class extends C {
|
|
|
4986
4986
|
<div class="filter-section">
|
|
4987
4987
|
<div class="grid-2">
|
|
4988
4988
|
<div>
|
|
4989
|
-
<span class="input-label" aria-disabled=${h ? "true" :
|
|
4989
|
+
<span class="input-label" aria-disabled=${h ? "true" : f}>${x}</span>
|
|
4990
4990
|
<input
|
|
4991
4991
|
class="filter-input"
|
|
4992
4992
|
type="number"
|
|
4993
4993
|
step=${g}
|
|
4994
|
-
placeholder=${
|
|
4995
|
-
.value=${
|
|
4994
|
+
placeholder=${p}
|
|
4995
|
+
.value=${v}
|
|
4996
4996
|
?disabled=${h}
|
|
4997
|
-
@change=${(
|
|
4997
|
+
@change=${(A) => this._onNumberInput(t, A, 0)}
|
|
4998
4998
|
/>
|
|
4999
4999
|
</div>
|
|
5000
|
-
${
|
|
5000
|
+
${$ ? n`
|
|
5001
5001
|
<div>
|
|
5002
|
-
<span class="input-label" aria-disabled=${c ? "true" :
|
|
5002
|
+
<span class="input-label" aria-disabled=${c ? "true" : f}>${"Max"}</span>
|
|
5003
5003
|
<input
|
|
5004
5004
|
class="filter-input"
|
|
5005
5005
|
type="number"
|
|
5006
5006
|
step=${g}
|
|
5007
|
-
placeholder=${
|
|
5007
|
+
placeholder=${p}
|
|
5008
5008
|
.value=${b}
|
|
5009
5009
|
?disabled=${c}
|
|
5010
|
-
@change=${(
|
|
5010
|
+
@change=${(A) => this._onNumberInput(t, A, 1)}
|
|
5011
5011
|
/>
|
|
5012
5012
|
</div>
|
|
5013
|
-
` :
|
|
5013
|
+
` : f}
|
|
5014
5014
|
</div>
|
|
5015
5015
|
</div>
|
|
5016
|
-
` :
|
|
5016
|
+
` : f}
|
|
5017
5017
|
</div>
|
|
5018
5018
|
`;
|
|
5019
5019
|
}
|
|
5020
5020
|
// ── Render: Boolean filter ───────────────────────────────────────
|
|
5021
5021
|
_renderBooleanFilter(t) {
|
|
5022
5022
|
var i, a;
|
|
5023
|
-
const e = this._getApplied(
|
|
5023
|
+
const e = this._getApplied(I(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
|
|
5024
5024
|
return n`
|
|
5025
5025
|
<div class="filter-content" style="position: relative;">
|
|
5026
5026
|
<button
|
|
@@ -5043,7 +5043,7 @@ let j = class extends C {
|
|
|
5043
5043
|
}
|
|
5044
5044
|
// ── Render: Select-one filter ────────────────────────────────────
|
|
5045
5045
|
_renderSelectOneFilter(t) {
|
|
5046
|
-
const e =
|
|
5046
|
+
const e = I(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], o = t.possible_values || [], r = s.operator || Se[0].value, l = (this._selectSearches[e] || "").toLowerCase(), c = l.length > 0, h = a.length > 0 || i, u = l ? o.filter((p) => p.label.toLowerCase().includes(l)) : o, g = a.length >= zt;
|
|
5047
5047
|
return n`
|
|
5048
5048
|
<div class="filter-content">
|
|
5049
5049
|
<!-- Search input -->
|
|
@@ -5054,10 +5054,10 @@ let j = class extends C {
|
|
|
5054
5054
|
type="text"
|
|
5055
5055
|
placeholder="Search options"
|
|
5056
5056
|
.value=${this._selectSearches[e] || ""}
|
|
5057
|
-
@input=${(
|
|
5057
|
+
@input=${(p) => {
|
|
5058
5058
|
this._selectSearches = {
|
|
5059
5059
|
...this._selectSearches,
|
|
5060
|
-
[e]:
|
|
5060
|
+
[e]: p.target.value
|
|
5061
5061
|
};
|
|
5062
5062
|
}}
|
|
5063
5063
|
/>
|
|
@@ -5067,7 +5067,7 @@ let j = class extends C {
|
|
|
5067
5067
|
}}>
|
|
5068
5068
|
<ap-icon name="close" .size=${12}></ap-icon>
|
|
5069
5069
|
</button>
|
|
5070
|
-
` :
|
|
5070
|
+
` : f}
|
|
5071
5071
|
</div>
|
|
5072
5072
|
|
|
5073
5073
|
${c ? n`
|
|
@@ -5094,7 +5094,7 @@ let j = class extends C {
|
|
|
5094
5094
|
direction="horizontal"
|
|
5095
5095
|
.options=${Se}
|
|
5096
5096
|
.value=${r}
|
|
5097
|
-
@ap-change=${(
|
|
5097
|
+
@ap-change=${(p) => this._onOperatorChange(t, p.detail.value)}
|
|
5098
5098
|
></ap-radio-group>
|
|
5099
5099
|
</div>
|
|
5100
5100
|
|
|
@@ -5109,12 +5109,12 @@ let j = class extends C {
|
|
|
5109
5109
|
>Clear all</button>
|
|
5110
5110
|
</div>
|
|
5111
5111
|
<div class="chips-wrap">
|
|
5112
|
-
${a.map((
|
|
5113
|
-
const
|
|
5112
|
+
${a.map((p) => {
|
|
5113
|
+
const v = o.find((b) => b.api_value === p);
|
|
5114
5114
|
return n`
|
|
5115
5115
|
<div class="chip">
|
|
5116
|
-
<span class="chip-label">${(
|
|
5117
|
-
<button class="chip-remove" @click=${() => this._onSelectOneToggle(t,
|
|
5116
|
+
<span class="chip-label">${(v == null ? void 0 : v.label) || p}</span>
|
|
5117
|
+
<button class="chip-remove" @click=${() => this._onSelectOneToggle(t, p)}>
|
|
5118
5118
|
<ap-icon name="close" .size=${10}></ap-icon>
|
|
5119
5119
|
</button>
|
|
5120
5120
|
</div>
|
|
@@ -5122,7 +5122,7 @@ let j = class extends C {
|
|
|
5122
5122
|
})}
|
|
5123
5123
|
</div>
|
|
5124
5124
|
</div>
|
|
5125
|
-
` :
|
|
5125
|
+
` : f}
|
|
5126
5126
|
`}
|
|
5127
5127
|
|
|
5128
5128
|
<!-- Options list -->
|
|
@@ -5132,15 +5132,15 @@ let j = class extends C {
|
|
|
5132
5132
|
<!-- Empty/Not empty checkboxes -->
|
|
5133
5133
|
<div class="options-list short">
|
|
5134
5134
|
${Ve.map(
|
|
5135
|
-
(
|
|
5136
|
-
var
|
|
5135
|
+
(p) => {
|
|
5136
|
+
var v;
|
|
5137
5137
|
return n`
|
|
5138
5138
|
<div
|
|
5139
5139
|
class="option-item"
|
|
5140
|
-
@click=${() => this._onEmptyOption(t,
|
|
5140
|
+
@click=${() => this._onEmptyOption(t, p.value)}
|
|
5141
5141
|
>
|
|
5142
|
-
<ap-checkbox ?checked=${((
|
|
5143
|
-
<span>${
|
|
5142
|
+
<ap-checkbox ?checked=${((v = s.values) == null ? void 0 : v[0]) === p.value}></ap-checkbox>
|
|
5143
|
+
<span>${p.label}</span>
|
|
5144
5144
|
</div>
|
|
5145
5145
|
`;
|
|
5146
5146
|
}
|
|
@@ -5151,15 +5151,15 @@ let j = class extends C {
|
|
|
5151
5151
|
|
|
5152
5152
|
<!-- Regular options -->
|
|
5153
5153
|
<div class="options-list">
|
|
5154
|
-
${u.length === 0 ? n`<div class="no-results">No options found</div>` : u.map((
|
|
5155
|
-
const
|
|
5154
|
+
${u.length === 0 ? n`<div class="no-results">No options found</div>` : u.map((p) => {
|
|
5155
|
+
const v = a.includes(p.api_value), b = !v && g;
|
|
5156
5156
|
return n`
|
|
5157
5157
|
<div
|
|
5158
5158
|
class="option-item ${b ? "disabled" : ""}"
|
|
5159
|
-
@click=${() => !b && this._onSelectOneToggle(t,
|
|
5159
|
+
@click=${() => !b && this._onSelectOneToggle(t, p.api_value)}
|
|
5160
5160
|
>
|
|
5161
|
-
<ap-checkbox ?checked=${
|
|
5162
|
-
<span>${
|
|
5161
|
+
<ap-checkbox ?checked=${v}></ap-checkbox>
|
|
5162
|
+
<span>${p.label}</span>
|
|
5163
5163
|
</div>
|
|
5164
5164
|
`;
|
|
5165
5165
|
})}
|
|
@@ -5170,7 +5170,7 @@ let j = class extends C {
|
|
|
5170
5170
|
}
|
|
5171
5171
|
// ── Render: Multi-select filter ──────────────────────────────────
|
|
5172
5172
|
_renderMultiSelectFilter(t) {
|
|
5173
|
-
const e =
|
|
5173
|
+
const e = I(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], o = t.possible_values || [], r = s.operator || ls[0].value, l = (this._selectSearches[e] || "").toLowerCase(), c = l.length > 0, h = a.length > 0 || i, u = l ? o.filter((p) => p.label.toLowerCase().includes(l)) : o, g = a.length >= zt;
|
|
5174
5174
|
return n`
|
|
5175
5175
|
<div class="filter-content">
|
|
5176
5176
|
<!-- Search input -->
|
|
@@ -5181,10 +5181,10 @@ let j = class extends C {
|
|
|
5181
5181
|
type="text"
|
|
5182
5182
|
placeholder="Search options"
|
|
5183
5183
|
.value=${this._selectSearches[e] || ""}
|
|
5184
|
-
@input=${(
|
|
5184
|
+
@input=${(p) => {
|
|
5185
5185
|
this._selectSearches = {
|
|
5186
5186
|
...this._selectSearches,
|
|
5187
|
-
[e]:
|
|
5187
|
+
[e]: p.target.value
|
|
5188
5188
|
};
|
|
5189
5189
|
}}
|
|
5190
5190
|
/>
|
|
@@ -5194,7 +5194,7 @@ let j = class extends C {
|
|
|
5194
5194
|
}}>
|
|
5195
5195
|
<ap-icon name="close" .size=${12}></ap-icon>
|
|
5196
5196
|
</button>
|
|
5197
|
-
` :
|
|
5197
|
+
` : f}
|
|
5198
5198
|
</div>
|
|
5199
5199
|
|
|
5200
5200
|
${c ? n`
|
|
@@ -5221,7 +5221,7 @@ let j = class extends C {
|
|
|
5221
5221
|
direction="horizontal"
|
|
5222
5222
|
.options=${ls}
|
|
5223
5223
|
.value=${r}
|
|
5224
|
-
@ap-change=${(
|
|
5224
|
+
@ap-change=${(p) => this._onOperatorChange(t, p.detail.value)}
|
|
5225
5225
|
></ap-radio-group>
|
|
5226
5226
|
</div>
|
|
5227
5227
|
|
|
@@ -5236,12 +5236,12 @@ let j = class extends C {
|
|
|
5236
5236
|
>Clear all</button>
|
|
5237
5237
|
</div>
|
|
5238
5238
|
<div class="chips-wrap">
|
|
5239
|
-
${a.map((
|
|
5240
|
-
const
|
|
5239
|
+
${a.map((p) => {
|
|
5240
|
+
const v = o.find((b) => b.api_value === p);
|
|
5241
5241
|
return n`
|
|
5242
5242
|
<div class="chip">
|
|
5243
|
-
<span class="chip-label">${(
|
|
5244
|
-
<button class="chip-remove" @click=${() => this._onMultiSelectToggle(t,
|
|
5243
|
+
<span class="chip-label">${(v == null ? void 0 : v.label) || p}</span>
|
|
5244
|
+
<button class="chip-remove" @click=${() => this._onMultiSelectToggle(t, p)}>
|
|
5245
5245
|
<ap-icon name="close" .size=${10}></ap-icon>
|
|
5246
5246
|
</button>
|
|
5247
5247
|
</div>
|
|
@@ -5249,7 +5249,7 @@ let j = class extends C {
|
|
|
5249
5249
|
})}
|
|
5250
5250
|
</div>
|
|
5251
5251
|
</div>
|
|
5252
|
-
` :
|
|
5252
|
+
` : f}
|
|
5253
5253
|
`}
|
|
5254
5254
|
|
|
5255
5255
|
<!-- Options list -->
|
|
@@ -5259,15 +5259,15 @@ let j = class extends C {
|
|
|
5259
5259
|
<!-- Empty/Not empty checkboxes -->
|
|
5260
5260
|
<div class="options-list short">
|
|
5261
5261
|
${Ve.map(
|
|
5262
|
-
(
|
|
5263
|
-
var
|
|
5262
|
+
(p) => {
|
|
5263
|
+
var v;
|
|
5264
5264
|
return n`
|
|
5265
5265
|
<div
|
|
5266
5266
|
class="option-item"
|
|
5267
|
-
@click=${() => this._onEmptyOption(t,
|
|
5267
|
+
@click=${() => this._onEmptyOption(t, p.value)}
|
|
5268
5268
|
>
|
|
5269
|
-
<ap-checkbox ?checked=${((
|
|
5270
|
-
<span>${
|
|
5269
|
+
<ap-checkbox ?checked=${((v = s.values) == null ? void 0 : v[0]) === p.value}></ap-checkbox>
|
|
5270
|
+
<span>${p.label}</span>
|
|
5271
5271
|
</div>
|
|
5272
5272
|
`;
|
|
5273
5273
|
}
|
|
@@ -5278,15 +5278,15 @@ let j = class extends C {
|
|
|
5278
5278
|
|
|
5279
5279
|
<!-- Regular options -->
|
|
5280
5280
|
<div class="options-list">
|
|
5281
|
-
${u.length === 0 ? n`<div class="no-results">No options found</div>` : u.map((
|
|
5282
|
-
const
|
|
5281
|
+
${u.length === 0 ? n`<div class="no-results">No options found</div>` : u.map((p) => {
|
|
5282
|
+
const v = a.includes(p.api_value), b = !v && g;
|
|
5283
5283
|
return n`
|
|
5284
5284
|
<div
|
|
5285
5285
|
class="option-item ${b ? "disabled" : ""}"
|
|
5286
|
-
@click=${() => !b && this._onMultiSelectToggle(t,
|
|
5286
|
+
@click=${() => !b && this._onMultiSelectToggle(t, p.api_value)}
|
|
5287
5287
|
>
|
|
5288
|
-
<ap-checkbox ?checked=${
|
|
5289
|
-
<span>${
|
|
5288
|
+
<ap-checkbox ?checked=${v}></ap-checkbox>
|
|
5289
|
+
<span>${p.label}</span>
|
|
5290
5290
|
</div>
|
|
5291
5291
|
`;
|
|
5292
5292
|
})}
|
|
@@ -5297,7 +5297,7 @@ let j = class extends C {
|
|
|
5297
5297
|
}
|
|
5298
5298
|
// ── Render: Tags filter ──────────────────────────────────────────
|
|
5299
5299
|
_renderTagsFilter(t) {
|
|
5300
|
-
const e =
|
|
5300
|
+
const e = I(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = i ? [] : s.values || [], o = this._tagInputs[e] || "", r = s.operator || Se[0].value, l = a.length > 0 || i, c = this._tagSuggestions[e] || [], h = this._tagLoading[e] || !1, u = o.trim().length > 0, g = a.length >= zt;
|
|
5301
5301
|
return n`
|
|
5302
5302
|
<div class="filter-content">
|
|
5303
5303
|
<!-- Search input -->
|
|
@@ -5308,8 +5308,8 @@ let j = class extends C {
|
|
|
5308
5308
|
type="text"
|
|
5309
5309
|
placeholder="Search tags"
|
|
5310
5310
|
.value=${o}
|
|
5311
|
-
@input=${(
|
|
5312
|
-
@keydown=${(
|
|
5311
|
+
@input=${(p) => this._onTagInput(t, e, p)}
|
|
5312
|
+
@keydown=${(p) => this._onTagKeydown(t, p)}
|
|
5313
5313
|
/>
|
|
5314
5314
|
${u ? n`
|
|
5315
5315
|
<button class="search-clear" @click=${() => {
|
|
@@ -5317,7 +5317,7 @@ let j = class extends C {
|
|
|
5317
5317
|
}}>
|
|
5318
5318
|
<ap-icon name="close" .size=${12}></ap-icon>
|
|
5319
5319
|
</button>
|
|
5320
|
-
` :
|
|
5320
|
+
` : f}
|
|
5321
5321
|
</div>
|
|
5322
5322
|
|
|
5323
5323
|
${u ? n`
|
|
@@ -5345,7 +5345,7 @@ let j = class extends C {
|
|
|
5345
5345
|
.options=${Se}
|
|
5346
5346
|
.value=${r}
|
|
5347
5347
|
?disabled=${i}
|
|
5348
|
-
@ap-change=${(
|
|
5348
|
+
@ap-change=${(p) => this._onTagOperatorChange(t, p.detail.value)}
|
|
5349
5349
|
></ap-radio-group>
|
|
5350
5350
|
</div>
|
|
5351
5351
|
|
|
@@ -5361,10 +5361,10 @@ let j = class extends C {
|
|
|
5361
5361
|
</div>
|
|
5362
5362
|
<div class="chips-wrap">
|
|
5363
5363
|
${a.map(
|
|
5364
|
-
(
|
|
5364
|
+
(p) => n`
|
|
5365
5365
|
<div class="chip">
|
|
5366
|
-
<span class="chip-label">${
|
|
5367
|
-
<button class="chip-remove" @click=${() => this._removeTag(t,
|
|
5366
|
+
<span class="chip-label">${p}</span>
|
|
5367
|
+
<button class="chip-remove" @click=${() => this._removeTag(t, p)}>
|
|
5368
5368
|
<ap-icon name="close" .size=${10}></ap-icon>
|
|
5369
5369
|
</button>
|
|
5370
5370
|
</div>
|
|
@@ -5372,22 +5372,22 @@ let j = class extends C {
|
|
|
5372
5372
|
)}
|
|
5373
5373
|
</div>
|
|
5374
5374
|
</div>
|
|
5375
|
-
` :
|
|
5375
|
+
` : f}
|
|
5376
5376
|
|
|
5377
5377
|
<!-- Empty/Not empty -->
|
|
5378
5378
|
<div class="filter-section">
|
|
5379
5379
|
<span class="section-label">All options</span>
|
|
5380
5380
|
<div class="options-list short">
|
|
5381
5381
|
${Ve.map(
|
|
5382
|
-
(
|
|
5383
|
-
var
|
|
5382
|
+
(p) => {
|
|
5383
|
+
var v;
|
|
5384
5384
|
return n`
|
|
5385
5385
|
<div
|
|
5386
5386
|
class="option-item"
|
|
5387
|
-
@click=${() => this._onEmptyOption(t,
|
|
5387
|
+
@click=${() => this._onEmptyOption(t, p.value)}
|
|
5388
5388
|
>
|
|
5389
|
-
<ap-checkbox ?checked=${((
|
|
5390
|
-
<span>${
|
|
5389
|
+
<ap-checkbox ?checked=${((v = s.values) == null ? void 0 : v[0]) === p.value}></ap-checkbox>
|
|
5390
|
+
<span>${p.label}</span>
|
|
5391
5391
|
</div>
|
|
5392
5392
|
`;
|
|
5393
5393
|
}
|
|
@@ -5401,29 +5401,29 @@ let j = class extends C {
|
|
|
5401
5401
|
<div class="filter-section">
|
|
5402
5402
|
<div class="options-list">
|
|
5403
5403
|
${h ? n`<div class="option-item disabled"><span>Loading...</span></div>` : c.length > 0 ? c.map(
|
|
5404
|
-
(
|
|
5405
|
-
const
|
|
5404
|
+
(p) => {
|
|
5405
|
+
const v = a.includes(p), b = !v && g;
|
|
5406
5406
|
return n`
|
|
5407
5407
|
<div
|
|
5408
5408
|
class="option-item ${b ? "disabled" : ""}"
|
|
5409
|
-
@click=${() => !b && (
|
|
5409
|
+
@click=${() => !b && (v ? this._removeTag(t, p) : this._selectTagSuggestion(t, p))}
|
|
5410
5410
|
>
|
|
5411
|
-
<ap-checkbox ?checked=${
|
|
5412
|
-
<span>${
|
|
5411
|
+
<ap-checkbox ?checked=${v}></ap-checkbox>
|
|
5412
|
+
<span>${p}</span>
|
|
5413
5413
|
</div>
|
|
5414
5414
|
`;
|
|
5415
5415
|
}
|
|
5416
5416
|
) : n`<div class="option-item disabled"><span>No results</span></div>`}
|
|
5417
5417
|
</div>
|
|
5418
5418
|
</div>
|
|
5419
|
-
` :
|
|
5419
|
+
` : f}
|
|
5420
5420
|
</div>
|
|
5421
5421
|
`;
|
|
5422
5422
|
}
|
|
5423
5423
|
// ── Render: Date filter ──────────────────────────────────────────
|
|
5424
5424
|
_renderDateFilter(t) {
|
|
5425
5425
|
var u, g;
|
|
5426
|
-
const e =
|
|
5426
|
+
const e = I(t), s = this._datePresets[e] || "", i = this._getApplied(e), o = this._isSpecialValue(i.values) ? ((u = i.values) == null ? void 0 : u[0]) || "" : s, r = [
|
|
5427
5427
|
{ value: "empty", label: "Empty" },
|
|
5428
5428
|
{ value: "non-empty", label: "Not empty" }
|
|
5429
5429
|
], l = this._dateFroms[e] ? new Date(this._dateFroms[e]).toISOString().split("T")[0] : "", c = this._dateTos[e] ? new Date(this._dateTos[e]).toISOString().split("T")[0] : "", h = ["before", "after", "between"].includes(o);
|
|
@@ -5440,7 +5440,7 @@ let j = class extends C {
|
|
|
5440
5440
|
clearable
|
|
5441
5441
|
.options=${r}
|
|
5442
5442
|
.value=${o === "empty" || o === "non-empty" ? o : ""}
|
|
5443
|
-
@ap-change=${(
|
|
5443
|
+
@ap-change=${(p) => this._onDatePreset(t, p.detail.value)}
|
|
5444
5444
|
></ap-radio-group>
|
|
5445
5445
|
|
|
5446
5446
|
<div class="separator"></div>
|
|
@@ -5450,7 +5450,7 @@ let j = class extends C {
|
|
|
5450
5450
|
columns="2"
|
|
5451
5451
|
.options=${ws}
|
|
5452
5452
|
.value=${o !== "empty" && o !== "non-empty" ? o : ""}
|
|
5453
|
-
@ap-change=${(
|
|
5453
|
+
@ap-change=${(p) => this._onDatePreset(t, p.detail.value)}
|
|
5454
5454
|
></ap-radio-group>
|
|
5455
5455
|
</div>
|
|
5456
5456
|
|
|
@@ -5464,7 +5464,7 @@ let j = class extends C {
|
|
|
5464
5464
|
type="date"
|
|
5465
5465
|
class="filter-input"
|
|
5466
5466
|
.value=${c}
|
|
5467
|
-
@change=${(
|
|
5467
|
+
@change=${(p) => this._onDateInput(t, "to", p)}
|
|
5468
5468
|
/>
|
|
5469
5469
|
</div>
|
|
5470
5470
|
` : o === "after" ? n`
|
|
@@ -5474,7 +5474,7 @@ let j = class extends C {
|
|
|
5474
5474
|
type="date"
|
|
5475
5475
|
class="filter-input"
|
|
5476
5476
|
.value=${l}
|
|
5477
|
-
@change=${(
|
|
5477
|
+
@change=${(p) => this._onDateInput(t, "from", p)}
|
|
5478
5478
|
/>
|
|
5479
5479
|
</div>
|
|
5480
5480
|
` : n`
|
|
@@ -5484,7 +5484,7 @@ let j = class extends C {
|
|
|
5484
5484
|
type="date"
|
|
5485
5485
|
class="filter-input"
|
|
5486
5486
|
.value=${l}
|
|
5487
|
-
@change=${(
|
|
5487
|
+
@change=${(p) => this._onDateInput(t, "from", p)}
|
|
5488
5488
|
/>
|
|
5489
5489
|
</div>
|
|
5490
5490
|
<div>
|
|
@@ -5493,26 +5493,26 @@ let j = class extends C {
|
|
|
5493
5493
|
type="date"
|
|
5494
5494
|
class="filter-input"
|
|
5495
5495
|
.value=${c}
|
|
5496
|
-
@change=${(
|
|
5496
|
+
@change=${(p) => this._onDateInput(t, "to", p)}
|
|
5497
5497
|
/>
|
|
5498
5498
|
</div>
|
|
5499
5499
|
`}
|
|
5500
5500
|
</div>
|
|
5501
5501
|
</div>
|
|
5502
|
-
` :
|
|
5502
|
+
` : f}
|
|
5503
5503
|
</div>
|
|
5504
5504
|
`;
|
|
5505
5505
|
}
|
|
5506
5506
|
// ── Render: Geo filter ───────────────────────────────────────────
|
|
5507
5507
|
_renderGeoFilter(t) {
|
|
5508
5508
|
var u, g;
|
|
5509
|
-
const e =
|
|
5509
|
+
const e = I(t), s = this._getApplied(e), i = this._isSpecialValue(s.values), a = this._getContentMode(e);
|
|
5510
5510
|
let o = "", r = "";
|
|
5511
5511
|
if (!i && ((u = s.values) != null && u[0])) {
|
|
5512
|
-
const
|
|
5513
|
-
o =
|
|
5512
|
+
const p = s.values[0], [v, b] = p.split("..");
|
|
5513
|
+
o = v || "", r = b || "";
|
|
5514
5514
|
}
|
|
5515
|
-
const l = o.length > 0, c = o.split(",").map((
|
|
5515
|
+
const l = o.length > 0, c = o.split(",").map((p) => p.trim()), h = !l || c.length === 2 && c.every((p) => !isNaN(Number(p)) && p !== "");
|
|
5516
5516
|
return n`
|
|
5517
5517
|
<div class="filter-content" style="position: relative;">
|
|
5518
5518
|
<button
|
|
@@ -5527,7 +5527,7 @@ let j = class extends C {
|
|
|
5527
5527
|
clearable
|
|
5528
5528
|
.options=${ds}
|
|
5529
5529
|
.value=${a}
|
|
5530
|
-
@ap-change=${(
|
|
5530
|
+
@ap-change=${(p) => this._onContentModeChange(t, p.detail.value)}
|
|
5531
5531
|
></ap-radio-group>
|
|
5532
5532
|
</div>
|
|
5533
5533
|
|
|
@@ -5541,9 +5541,9 @@ let j = class extends C {
|
|
|
5541
5541
|
type="text"
|
|
5542
5542
|
placeholder="Latitude, longitude"
|
|
5543
5543
|
.value=${o}
|
|
5544
|
-
@change=${(
|
|
5544
|
+
@change=${(p) => this._onGeoLocationInput(t, p)}
|
|
5545
5545
|
/>
|
|
5546
|
-
${l && !h ? n`<div class="error-text">Enter coordinates as "latitude, longitude"</div>` :
|
|
5546
|
+
${l && !h ? n`<div class="error-text">Enter coordinates as "latitude, longitude"</div>` : f}
|
|
5547
5547
|
</div>
|
|
5548
5548
|
<div class="geo-radius">
|
|
5549
5549
|
<span class="input-label">Max radius (°)</span>
|
|
@@ -5553,19 +5553,19 @@ let j = class extends C {
|
|
|
5553
5553
|
placeholder="0"
|
|
5554
5554
|
data-geo-radius=${e}
|
|
5555
5555
|
.value=${r}
|
|
5556
|
-
@change=${(
|
|
5556
|
+
@change=${(p) => this._onGeoRadiusInput(t, p)}
|
|
5557
5557
|
/>
|
|
5558
5558
|
</div>
|
|
5559
5559
|
</div>
|
|
5560
5560
|
</div>
|
|
5561
|
-
` :
|
|
5561
|
+
` : f}
|
|
5562
5562
|
</div>
|
|
5563
5563
|
`;
|
|
5564
5564
|
}
|
|
5565
5565
|
// ── Render: Attachment filter ────────────────────────────────────
|
|
5566
5566
|
_renderAttachmentFilter(t) {
|
|
5567
5567
|
var i, a;
|
|
5568
|
-
const e = this._getApplied(
|
|
5568
|
+
const e = this._getApplied(I(t)), s = ((i = e.values) == null ? void 0 : i[0]) || "";
|
|
5569
5569
|
return n`
|
|
5570
5570
|
<div class="filter-content" style="position: relative;">
|
|
5571
5571
|
<button
|
|
@@ -5587,7 +5587,7 @@ let j = class extends C {
|
|
|
5587
5587
|
}
|
|
5588
5588
|
// ── Render: Face matcher (integer-list with slug face_matcher) ──
|
|
5589
5589
|
_renderFaceMatcherFilter(t) {
|
|
5590
|
-
const e =
|
|
5590
|
+
const e = I(t), s = this._getApplied(e), i = s.values || [], a = s.operator || L.IS;
|
|
5591
5591
|
return n`
|
|
5592
5592
|
<div class="filter-content" style="position: relative;">
|
|
5593
5593
|
<button
|
|
@@ -5638,15 +5638,15 @@ let j = class extends C {
|
|
|
5638
5638
|
case "geo":
|
|
5639
5639
|
return this._renderGeoFilter(t);
|
|
5640
5640
|
case "attachment":
|
|
5641
|
-
return t.type ===
|
|
5641
|
+
return t.type === S.INTEGER_LIST && t.slug === "face_matcher" ? this._renderFaceMatcherFilter(t) : this._renderAttachmentFilter(t);
|
|
5642
5642
|
default:
|
|
5643
|
-
return
|
|
5643
|
+
return f;
|
|
5644
5644
|
}
|
|
5645
5645
|
}
|
|
5646
5646
|
// ── Render: Single field section ─────────────────────────────────
|
|
5647
5647
|
_renderFieldSection(t) {
|
|
5648
5648
|
const e = this._getField(t);
|
|
5649
|
-
if (!e) return
|
|
5649
|
+
if (!e) return f;
|
|
5650
5650
|
const s = this._collapsedFields.has(t);
|
|
5651
5651
|
return n`
|
|
5652
5652
|
<div class="field-section">
|
|
@@ -5685,10 +5685,10 @@ let j = class extends C {
|
|
|
5685
5685
|
_renderSelectorMode() {
|
|
5686
5686
|
const t = this._fieldSearch.toLowerCase(), e = this.fields.filter(
|
|
5687
5687
|
(a) => a.label.toLowerCase().includes(t)
|
|
5688
|
-
), s = this._getGroupedFields(e), i = (a, o) => o.length === 0 ?
|
|
5688
|
+
), s = this._getGroupedFields(e), i = (a, o) => o.length === 0 ? f : n`
|
|
5689
5689
|
<div class="field-group-label">${a}</div>
|
|
5690
5690
|
${o.map((r) => {
|
|
5691
|
-
const l =
|
|
5691
|
+
const l = I(r), c = this.visibleFields.includes(l), h = !!this.appliedMetadata[l] || !!this.appliedFilters[l], u = this.pinnedFields.includes(l), g = !c && this._atFieldLimit;
|
|
5692
5692
|
return n`
|
|
5693
5693
|
<div
|
|
5694
5694
|
class="field-item ${h ? "has-filter" : ""} ${g ? "disabled" : ""}"
|
|
@@ -5698,14 +5698,14 @@ let j = class extends C {
|
|
|
5698
5698
|
<span class="field-item-label">${r.label}</span>
|
|
5699
5699
|
<button
|
|
5700
5700
|
class="field-item-pin ${u ? "pinned" : ""}"
|
|
5701
|
-
@click=${(
|
|
5702
|
-
|
|
5701
|
+
@click=${(p) => {
|
|
5702
|
+
p.stopPropagation(), this._emitPin(l, !u);
|
|
5703
5703
|
}}
|
|
5704
5704
|
title=${u ? "Unpin field" : "Pin field"}
|
|
5705
5705
|
>
|
|
5706
5706
|
<ap-icon name="pin" .size=${12}></ap-icon>
|
|
5707
5707
|
</button>
|
|
5708
|
-
${h ? n`<ap-icon name="check" .size=${14}></ap-icon>` :
|
|
5708
|
+
${h ? n`<ap-icon name="check" .size=${14}></ap-icon>` : f}
|
|
5709
5709
|
</div>
|
|
5710
5710
|
`;
|
|
5711
5711
|
})}
|
|
@@ -5745,7 +5745,7 @@ let j = class extends C {
|
|
|
5745
5745
|
return this._renderFieldMode();
|
|
5746
5746
|
const t = this.visibleFields.length > 0;
|
|
5747
5747
|
return n`
|
|
5748
|
-
${this._showFieldSelection || !t ? this._renderFieldSelection() :
|
|
5748
|
+
${this._showFieldSelection || !t ? this._renderFieldSelection() : f}
|
|
5749
5749
|
|
|
5750
5750
|
${t ? n`
|
|
5751
5751
|
<div class="field-filters">
|
|
@@ -5761,12 +5761,12 @@ let j = class extends C {
|
|
|
5761
5761
|
<ap-icon name="filter" .size=${14}></ap-icon>
|
|
5762
5762
|
Add field
|
|
5763
5763
|
</button>
|
|
5764
|
-
` :
|
|
5765
|
-
` :
|
|
5764
|
+
` : f}
|
|
5765
|
+
` : f}
|
|
5766
5766
|
`;
|
|
5767
5767
|
}
|
|
5768
5768
|
};
|
|
5769
|
-
j.styles = [ee, Te,
|
|
5769
|
+
j.styles = [ee, Te, F`
|
|
5770
5770
|
/* ── Field selection panel ─────────────────────────────── */
|
|
5771
5771
|
|
|
5772
5772
|
.add-field-btn {
|
|
@@ -6145,28 +6145,28 @@ j.styles = [ee, Te, S`
|
|
|
6145
6145
|
}
|
|
6146
6146
|
`];
|
|
6147
6147
|
N([
|
|
6148
|
-
|
|
6148
|
+
d({ type: Array })
|
|
6149
6149
|
], j.prototype, "fields", 2);
|
|
6150
6150
|
N([
|
|
6151
|
-
|
|
6151
|
+
d({ type: Object })
|
|
6152
6152
|
], j.prototype, "appliedFilters", 2);
|
|
6153
6153
|
N([
|
|
6154
|
-
|
|
6154
|
+
d({ type: Array })
|
|
6155
6155
|
], j.prototype, "visibleFields", 2);
|
|
6156
6156
|
N([
|
|
6157
|
-
|
|
6157
|
+
d()
|
|
6158
6158
|
], j.prototype, "mode", 2);
|
|
6159
6159
|
N([
|
|
6160
|
-
|
|
6160
|
+
d()
|
|
6161
6161
|
], j.prototype, "activeFieldKey", 2);
|
|
6162
6162
|
N([
|
|
6163
|
-
|
|
6163
|
+
d({ type: Array })
|
|
6164
6164
|
], j.prototype, "pinnedFields", 2);
|
|
6165
6165
|
N([
|
|
6166
|
-
|
|
6166
|
+
d({ type: Object })
|
|
6167
6167
|
], j.prototype, "appliedMetadata", 2);
|
|
6168
6168
|
N([
|
|
6169
|
-
|
|
6169
|
+
d({ attribute: !1 })
|
|
6170
6170
|
], j.prototype, "apiClient", 2);
|
|
6171
6171
|
N([
|
|
6172
6172
|
_()
|
|
@@ -6202,14 +6202,14 @@ N([
|
|
|
6202
6202
|
_()
|
|
6203
6203
|
], j.prototype, "_selectSearches", 2);
|
|
6204
6204
|
j = N([
|
|
6205
|
-
|
|
6205
|
+
T("ap-filter-metadata")
|
|
6206
6206
|
], j);
|
|
6207
6207
|
var Ro = Object.defineProperty, jo = Object.getOwnPropertyDescriptor, we = (t, e, s, i) => {
|
|
6208
6208
|
for (var a = i > 1 ? void 0 : i ? jo(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
6209
6209
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
6210
6210
|
return i && a && Ro(e, s, a), a;
|
|
6211
6211
|
};
|
|
6212
|
-
let ue = class extends
|
|
6212
|
+
let ue = class extends E {
|
|
6213
6213
|
constructor() {
|
|
6214
6214
|
super(...arguments), this.selectedStatus = [], this.statusOperator = ":=", this.approverValue = "", this.approverOperator = "~", this.requesterValue = "", this.requesterOperator = "~", this.dueDatePreset = "", this.dueDateFrom = "", this.dueDateTo = "";
|
|
6215
6215
|
}
|
|
@@ -6470,7 +6470,7 @@ let ue = class extends C {
|
|
|
6470
6470
|
@change=${this._handleDueDateFrom}
|
|
6471
6471
|
/>
|
|
6472
6472
|
</div>
|
|
6473
|
-
` :
|
|
6473
|
+
` : f}
|
|
6474
6474
|
${this.dueDatePreset !== "after" && this.dueDatePreset !== "specific" ? n`
|
|
6475
6475
|
<div class="date-input-col">
|
|
6476
6476
|
<span class="input-label">End date</span>
|
|
@@ -6481,9 +6481,9 @@ let ue = class extends C {
|
|
|
6481
6481
|
@change=${this._handleDueDateTo}
|
|
6482
6482
|
/>
|
|
6483
6483
|
</div>
|
|
6484
|
-
` :
|
|
6484
|
+
` : f}
|
|
6485
6485
|
</div>
|
|
6486
|
-
` :
|
|
6486
|
+
` : f}
|
|
6487
6487
|
</div>
|
|
6488
6488
|
`;
|
|
6489
6489
|
}
|
|
@@ -6501,7 +6501,7 @@ let ue = class extends C {
|
|
|
6501
6501
|
`;
|
|
6502
6502
|
}
|
|
6503
6503
|
};
|
|
6504
|
-
ue.styles = [ee, Te,
|
|
6504
|
+
ue.styles = [ee, Te, F`
|
|
6505
6505
|
.options-list.short {
|
|
6506
6506
|
max-height: none;
|
|
6507
6507
|
}
|
|
@@ -6522,34 +6522,34 @@ ue.styles = [ee, Te, S`
|
|
|
6522
6522
|
}
|
|
6523
6523
|
`];
|
|
6524
6524
|
we([
|
|
6525
|
-
|
|
6525
|
+
d({ type: Array })
|
|
6526
6526
|
], ue.prototype, "selectedStatus", 2);
|
|
6527
6527
|
we([
|
|
6528
|
-
|
|
6528
|
+
d()
|
|
6529
6529
|
], ue.prototype, "statusOperator", 2);
|
|
6530
6530
|
we([
|
|
6531
|
-
|
|
6531
|
+
d()
|
|
6532
6532
|
], ue.prototype, "approverValue", 2);
|
|
6533
6533
|
we([
|
|
6534
|
-
|
|
6534
|
+
d()
|
|
6535
6535
|
], ue.prototype, "approverOperator", 2);
|
|
6536
6536
|
we([
|
|
6537
|
-
|
|
6537
|
+
d()
|
|
6538
6538
|
], ue.prototype, "requesterValue", 2);
|
|
6539
6539
|
we([
|
|
6540
|
-
|
|
6540
|
+
d()
|
|
6541
6541
|
], ue.prototype, "requesterOperator", 2);
|
|
6542
6542
|
we([
|
|
6543
|
-
|
|
6543
|
+
d()
|
|
6544
6544
|
], ue.prototype, "dueDatePreset", 2);
|
|
6545
6545
|
we([
|
|
6546
|
-
|
|
6546
|
+
d()
|
|
6547
6547
|
], ue.prototype, "dueDateFrom", 2);
|
|
6548
6548
|
we([
|
|
6549
|
-
|
|
6549
|
+
d()
|
|
6550
6550
|
], ue.prototype, "dueDateTo", 2);
|
|
6551
6551
|
ue = we([
|
|
6552
|
-
|
|
6552
|
+
T("ap-filter-approval")
|
|
6553
6553
|
], ue);
|
|
6554
6554
|
var No = Object.defineProperty, Uo = Object.getOwnPropertyDescriptor, $e = (t, e, s, i) => {
|
|
6555
6555
|
for (var a = i > 1 ? void 0 : i ? Uo(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -6564,7 +6564,7 @@ function qo(t) {
|
|
|
6564
6564
|
)
|
|
6565
6565
|
);
|
|
6566
6566
|
}
|
|
6567
|
-
let fe = class extends
|
|
6567
|
+
let fe = class extends E {
|
|
6568
6568
|
constructor() {
|
|
6569
6569
|
super(...arguments), this.selected = [], this._search = "", this._debouncedSearch = "", this._products = [], this._isLoading = !1, this._showAddList = !1, this._addListText = "";
|
|
6570
6570
|
}
|
|
@@ -6587,7 +6587,7 @@ let fe = class extends C {
|
|
|
6587
6587
|
detail: {
|
|
6588
6588
|
key: y.PRODUCT_REF,
|
|
6589
6589
|
values: e,
|
|
6590
|
-
operator:
|
|
6590
|
+
operator: L.IS
|
|
6591
6591
|
},
|
|
6592
6592
|
bubbles: !0,
|
|
6593
6593
|
composed: !0
|
|
@@ -6680,7 +6680,7 @@ let fe = class extends C {
|
|
|
6680
6680
|
<button class="search-clear" @click=${this._clearSearch}>
|
|
6681
6681
|
<ap-icon name="close" .size=${12}></ap-icon>
|
|
6682
6682
|
</button>
|
|
6683
|
-
` :
|
|
6683
|
+
` : f}
|
|
6684
6684
|
</div>
|
|
6685
6685
|
|
|
6686
6686
|
<!-- Clear all (when searching and has selection) -->
|
|
@@ -6693,7 +6693,7 @@ let fe = class extends C {
|
|
|
6693
6693
|
@click=${this._clearAll}
|
|
6694
6694
|
>Clear all</button>
|
|
6695
6695
|
</div>
|
|
6696
|
-
` :
|
|
6696
|
+
` : f}
|
|
6697
6697
|
|
|
6698
6698
|
<!-- Selected chips (when not searching) -->
|
|
6699
6699
|
${!this._isSearching && this.selected.length > 0 ? n`
|
|
@@ -6718,7 +6718,7 @@ let fe = class extends C {
|
|
|
6718
6718
|
)}
|
|
6719
6719
|
</div>
|
|
6720
6720
|
</div>
|
|
6721
|
-
` :
|
|
6721
|
+
` : f}
|
|
6722
6722
|
|
|
6723
6723
|
<!-- Search results -->
|
|
6724
6724
|
${this._isSearching ? n`
|
|
@@ -6726,16 +6726,16 @@ let fe = class extends C {
|
|
|
6726
6726
|
<span class="section-label">Product references</span>
|
|
6727
6727
|
<div class="options-list">
|
|
6728
6728
|
<!-- Wildcard "Select all" option when multiple results -->
|
|
6729
|
-
${this._products.length > 1 ? this._renderProductItem(`${this._search.trim()}*`) :
|
|
6729
|
+
${this._products.length > 1 ? this._renderProductItem(`${this._search.trim()}*`) : f}
|
|
6730
6730
|
${this._products.map(({ ref: e }) => this._renderProductItem(e))}
|
|
6731
6731
|
</div>
|
|
6732
6732
|
</div>
|
|
6733
|
-
` :
|
|
6733
|
+
` : f}
|
|
6734
6734
|
|
|
6735
6735
|
<!-- Placeholder (when not searching) -->
|
|
6736
|
-
${this._isSearching ?
|
|
6736
|
+
${this._isSearching ? f : n`
|
|
6737
6737
|
<div class="placeholder">
|
|
6738
|
-
${t ? n`<ap-icon name="box" .size=${40} style="color: var(--ap-border, oklch(92.86% 0.009 247.92)); margin-bottom: 4px;"></ap-icon>` :
|
|
6738
|
+
${t ? n`<ap-icon name="box" .size=${40} style="color: var(--ap-border, oklch(92.86% 0.009 247.92)); margin-bottom: 4px;"></ap-icon>` : f}
|
|
6739
6739
|
<div class="placeholder-title">Find product reference</div>
|
|
6740
6740
|
<div class="placeholder-text">By using the search or pressing the button below to import the product references list.</div>
|
|
6741
6741
|
<button class="add-list-btn" @click=${this._openAddList}>
|
|
@@ -6752,10 +6752,10 @@ let fe = class extends C {
|
|
|
6752
6752
|
<div class="skeleton-item"></div>
|
|
6753
6753
|
<div class="skeleton-item"></div>
|
|
6754
6754
|
</div>
|
|
6755
|
-
` :
|
|
6755
|
+
` : f}
|
|
6756
6756
|
|
|
6757
6757
|
<!-- No results -->
|
|
6758
|
-
${this._isSearching && !this._isLoading && this._products.length === 0 ? n`<div class="no-results">No results found</div>` :
|
|
6758
|
+
${this._isSearching && !this._isLoading && this._products.length === 0 ? n`<div class="no-results">No results found</div>` : f}
|
|
6759
6759
|
</div>
|
|
6760
6760
|
|
|
6761
6761
|
<!-- Add List Dialog -->
|
|
@@ -6785,11 +6785,11 @@ let fe = class extends C {
|
|
|
6785
6785
|
</div>
|
|
6786
6786
|
</div>
|
|
6787
6787
|
</div>
|
|
6788
|
-
` :
|
|
6788
|
+
` : f}
|
|
6789
6789
|
`;
|
|
6790
6790
|
}
|
|
6791
6791
|
};
|
|
6792
|
-
fe.styles = [ee, Te,
|
|
6792
|
+
fe.styles = [ee, Te, F`
|
|
6793
6793
|
.product-item {
|
|
6794
6794
|
display: flex;
|
|
6795
6795
|
align-items: center;
|
|
@@ -7031,10 +7031,10 @@ fe.styles = [ee, Te, S`
|
|
|
7031
7031
|
}
|
|
7032
7032
|
`];
|
|
7033
7033
|
$e([
|
|
7034
|
-
|
|
7034
|
+
d({ type: Array })
|
|
7035
7035
|
], fe.prototype, "selected", 2);
|
|
7036
7036
|
$e([
|
|
7037
|
-
|
|
7037
|
+
d({ attribute: !1 })
|
|
7038
7038
|
], fe.prototype, "apiClient", 2);
|
|
7039
7039
|
$e([
|
|
7040
7040
|
Ze(".product-search")
|
|
@@ -7058,14 +7058,14 @@ $e([
|
|
|
7058
7058
|
_()
|
|
7059
7059
|
], fe.prototype, "_addListText", 2);
|
|
7060
7060
|
fe = $e([
|
|
7061
|
-
|
|
7061
|
+
T("ap-filter-product-ref")
|
|
7062
7062
|
], fe);
|
|
7063
|
-
var Vo = Object.defineProperty, Ho = Object.getOwnPropertyDescriptor,
|
|
7063
|
+
var Vo = Object.defineProperty, Ho = Object.getOwnPropertyDescriptor, z = (t, e, s, i) => {
|
|
7064
7064
|
for (var a = i > 1 ? void 0 : i ? Ho(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
7065
7065
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
7066
7066
|
return i && a && Vo(e, s, a), a;
|
|
7067
7067
|
};
|
|
7068
|
-
let
|
|
7068
|
+
let D = class extends E {
|
|
7069
7069
|
constructor() {
|
|
7070
7070
|
super(...arguments), this.totalCount = 0, this.totalFolderCount = 0, this.isLoading = !1, this.showUpload = !1, this.showFilters = !0, this.countLabel = "", this.sortBy = "created_at", this.sortDirection = "desc", this.sortOptions = $s, this.filters = {
|
|
7071
7071
|
metadata: { pinned: [], visible: [], applied: {} },
|
|
@@ -7351,7 +7351,7 @@ let P = class extends C {
|
|
|
7351
7351
|
></ap-filter-product-ref>`;
|
|
7352
7352
|
}
|
|
7353
7353
|
default:
|
|
7354
|
-
return
|
|
7354
|
+
return f;
|
|
7355
7355
|
}
|
|
7356
7356
|
}
|
|
7357
7357
|
_renderFilterButton(t) {
|
|
@@ -7393,7 +7393,7 @@ let P = class extends C {
|
|
|
7393
7393
|
@metadata-pin=${this._handleMetadataPin}
|
|
7394
7394
|
></ap-filter-metadata>
|
|
7395
7395
|
</div>
|
|
7396
|
-
` :
|
|
7396
|
+
` : f}
|
|
7397
7397
|
</div>
|
|
7398
7398
|
` : a;
|
|
7399
7399
|
}
|
|
@@ -7418,9 +7418,9 @@ let P = class extends C {
|
|
|
7418
7418
|
<div class="dropdown-menu">
|
|
7419
7419
|
${ms.filter((e) => !this.forcedFilterKeys.includes(e.key)).map((e) => this._renderFilterButton(e))}
|
|
7420
7420
|
</div>
|
|
7421
|
-
` :
|
|
7421
|
+
` : f}
|
|
7422
7422
|
</div>
|
|
7423
|
-
` :
|
|
7423
|
+
` : f}
|
|
7424
7424
|
<ap-dropdown
|
|
7425
7425
|
variant="borderless"
|
|
7426
7426
|
label="Sort"
|
|
@@ -7442,12 +7442,12 @@ let P = class extends C {
|
|
|
7442
7442
|
<ap-icon name="upload" .size=${16}></ap-icon>
|
|
7443
7443
|
Upload
|
|
7444
7444
|
</button>
|
|
7445
|
-
` :
|
|
7445
|
+
` : f}
|
|
7446
7446
|
</div>
|
|
7447
7447
|
</div>
|
|
7448
7448
|
${this._openFilter ? n`
|
|
7449
7449
|
<div class="popover-anchor ${this._externalTrigger ? "external" : ""}" style=${this._externalTrigger && this._externalTop != null ? `top: ${this._externalTop + 4}px` : ""}>
|
|
7450
|
-
${this._externalTrigger ?
|
|
7450
|
+
${this._externalTrigger ? f : n`
|
|
7451
7451
|
<div class="anchor-tab">
|
|
7452
7452
|
${this._openFilter === "metadata" && this._openMetadataField ? n`
|
|
7453
7453
|
<button class="anchor-back" @click=${(e) => {
|
|
@@ -7471,11 +7471,11 @@ let P = class extends C {
|
|
|
7471
7471
|
${this._renderFilterContent(this._openFilter)}
|
|
7472
7472
|
</div>
|
|
7473
7473
|
</div>
|
|
7474
|
-
` :
|
|
7474
|
+
` : f}
|
|
7475
7475
|
`;
|
|
7476
7476
|
}
|
|
7477
7477
|
};
|
|
7478
|
-
|
|
7478
|
+
D.styles = F`
|
|
7479
7479
|
:host {
|
|
7480
7480
|
display: block;
|
|
7481
7481
|
padding: 8px 20px 6px;
|
|
@@ -7814,90 +7814,90 @@ P.styles = S`
|
|
|
7814
7814
|
top: 0;
|
|
7815
7815
|
}
|
|
7816
7816
|
`;
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
],
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
],
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
],
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
],
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
],
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
],
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
],
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
],
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
],
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
],
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
],
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
],
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
],
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
],
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
],
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
],
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
],
|
|
7868
|
-
|
|
7817
|
+
z([
|
|
7818
|
+
d({ type: Number })
|
|
7819
|
+
], D.prototype, "totalCount", 2);
|
|
7820
|
+
z([
|
|
7821
|
+
d({ type: Number })
|
|
7822
|
+
], D.prototype, "totalFolderCount", 2);
|
|
7823
|
+
z([
|
|
7824
|
+
d({ type: Boolean })
|
|
7825
|
+
], D.prototype, "isLoading", 2);
|
|
7826
|
+
z([
|
|
7827
|
+
d({ type: Boolean })
|
|
7828
|
+
], D.prototype, "showUpload", 2);
|
|
7829
|
+
z([
|
|
7830
|
+
d({ type: Boolean })
|
|
7831
|
+
], D.prototype, "showFilters", 2);
|
|
7832
|
+
z([
|
|
7833
|
+
d()
|
|
7834
|
+
], D.prototype, "countLabel", 2);
|
|
7835
|
+
z([
|
|
7836
|
+
d()
|
|
7837
|
+
], D.prototype, "sortBy", 2);
|
|
7838
|
+
z([
|
|
7839
|
+
d()
|
|
7840
|
+
], D.prototype, "sortDirection", 2);
|
|
7841
|
+
z([
|
|
7842
|
+
d({ type: Array })
|
|
7843
|
+
], D.prototype, "sortOptions", 2);
|
|
7844
|
+
z([
|
|
7845
|
+
d({ type: Object })
|
|
7846
|
+
], D.prototype, "filters", 2);
|
|
7847
|
+
z([
|
|
7848
|
+
d({ type: Array })
|
|
7849
|
+
], D.prototype, "labels", 2);
|
|
7850
|
+
z([
|
|
7851
|
+
d({ type: Array })
|
|
7852
|
+
], D.prototype, "tags", 2);
|
|
7853
|
+
z([
|
|
7854
|
+
d({ type: Array })
|
|
7855
|
+
], D.prototype, "fileTypes", 2);
|
|
7856
|
+
z([
|
|
7857
|
+
d({ type: Array })
|
|
7858
|
+
], D.prototype, "metadataFields", 2);
|
|
7859
|
+
z([
|
|
7860
|
+
d({ type: Array })
|
|
7861
|
+
], D.prototype, "pinnedFilters", 2);
|
|
7862
|
+
z([
|
|
7863
|
+
d({ type: Array })
|
|
7864
|
+
], D.prototype, "forcedFilterKeys", 2);
|
|
7865
|
+
z([
|
|
7866
|
+
d({ attribute: !1 })
|
|
7867
|
+
], D.prototype, "apiClient", 2);
|
|
7868
|
+
z([
|
|
7869
7869
|
Ze("ap-dropdown")
|
|
7870
|
-
],
|
|
7871
|
-
|
|
7870
|
+
], D.prototype, "_sortDropdown", 2);
|
|
7871
|
+
z([
|
|
7872
7872
|
_()
|
|
7873
|
-
],
|
|
7874
|
-
|
|
7873
|
+
], D.prototype, "_showDropdown", 2);
|
|
7874
|
+
z([
|
|
7875
7875
|
_()
|
|
7876
|
-
],
|
|
7877
|
-
|
|
7876
|
+
], D.prototype, "_showMetadataSelector", 2);
|
|
7877
|
+
z([
|
|
7878
7878
|
_()
|
|
7879
|
-
],
|
|
7880
|
-
|
|
7879
|
+
], D.prototype, "_openFilter", 2);
|
|
7880
|
+
z([
|
|
7881
7881
|
_()
|
|
7882
|
-
],
|
|
7883
|
-
|
|
7882
|
+
], D.prototype, "_openMetadataField", 2);
|
|
7883
|
+
z([
|
|
7884
7884
|
_()
|
|
7885
|
-
],
|
|
7886
|
-
|
|
7885
|
+
], D.prototype, "_externalTrigger", 2);
|
|
7886
|
+
z([
|
|
7887
7887
|
_()
|
|
7888
|
-
],
|
|
7889
|
-
|
|
7888
|
+
], D.prototype, "_externalLeft", 2);
|
|
7889
|
+
z([
|
|
7890
7890
|
_()
|
|
7891
|
-
],
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
],
|
|
7891
|
+
], D.prototype, "_externalTop", 2);
|
|
7892
|
+
D = z([
|
|
7893
|
+
T("ap-content-toolbar")
|
|
7894
|
+
], D);
|
|
7895
7895
|
var Go = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, ne = (t, e, s, i) => {
|
|
7896
7896
|
for (var a = i > 1 ? void 0 : i ? Ko(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
7897
7897
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
7898
7898
|
return i && a && Go(e, s, a), a;
|
|
7899
7899
|
};
|
|
7900
|
-
let Q = class extends
|
|
7900
|
+
let Q = class extends E {
|
|
7901
7901
|
constructor() {
|
|
7902
7902
|
super(...arguments), this.appliedFilters = {}, this.appliedMetadata = {}, this.forcedFilters = {}, this.metadataFields = [], this.pinnedFilters = [], this.pinnedMetadataFields = [], this.tags = [], this.labels = [], this.activeFilter = null, this.activeMetadataField = null, this.pendingFilter = null, this.pendingMetadataField = null;
|
|
7903
7903
|
}
|
|
@@ -8033,7 +8033,7 @@ let Q = class extends C {
|
|
|
8033
8033
|
<span class="chip forced">
|
|
8034
8034
|
${(i || t === y.TYPE || t === y.SIZE) && s ? n`<span class="chip-label">${s}</span>` : n`
|
|
8035
8035
|
<span class="chip-label">${nt[t] || t}</span>
|
|
8036
|
-
${s ? n`<span class="chip-summary">${s}</span>` :
|
|
8036
|
+
${s ? n`<span class="chip-summary">${s}</span>` : f}
|
|
8037
8037
|
`}
|
|
8038
8038
|
<span class="chip-lock">
|
|
8039
8039
|
<ap-icon name="lock" .size=${12}></ap-icon>
|
|
@@ -8057,7 +8057,7 @@ let Q = class extends C {
|
|
|
8057
8057
|
<span class="chip-icon"><ap-icon name=${this._getFilterIcon(t)} .size=${16}></ap-icon></span>
|
|
8058
8058
|
<span class="chip-label">${s}</span>` : n`
|
|
8059
8059
|
<span class="chip-label">${nt[t] || t}</span>
|
|
8060
|
-
${s ? n`<span class="chip-summary">${s}</span>` :
|
|
8060
|
+
${s ? n`<span class="chip-summary">${s}</span>` : f}
|
|
8061
8061
|
`}
|
|
8062
8062
|
<button class="chip-remove" @click=${(a) => {
|
|
8063
8063
|
a.stopPropagation(), this._removeFilter(t);
|
|
@@ -8083,7 +8083,7 @@ let Q = class extends C {
|
|
|
8083
8083
|
<span class="chip ${t === this.activeMetadataField ? "active" : ""}" @click=${(o) => this._openMetadataFilter(t, o)}>
|
|
8084
8084
|
<span class="chip-icon"><ap-icon name=${a} .size=${16}></ap-icon></span>
|
|
8085
8085
|
<span class="chip-label">${i}</span>
|
|
8086
|
-
${s ? n`<span class="chip-summary">${s}</span>` :
|
|
8086
|
+
${s ? n`<span class="chip-summary">${s}</span>` : f}
|
|
8087
8087
|
<button class="chip-remove" @click=${(o) => {
|
|
8088
8088
|
o.stopPropagation(), this._removeMetadataFilter(t);
|
|
8089
8089
|
}} title="Remove filter">
|
|
@@ -8093,46 +8093,46 @@ let Q = class extends C {
|
|
|
8093
8093
|
`;
|
|
8094
8094
|
}
|
|
8095
8095
|
render() {
|
|
8096
|
-
const t = bs(this.forcedFilters), e = new Set(Object.keys(t)), s = Object.keys(this.appliedFilters).filter((
|
|
8097
|
-
return e.size + r.length + this.pinnedMetadataFields.length + l.length + c.length + (h ? 1 : 0) + (u ? 1 : 0) === 0 ?
|
|
8096
|
+
const t = bs(this.forcedFilters), e = new Set(Object.keys(t)), s = Object.keys(this.appliedFilters).filter((v) => !e.has(v)), i = Object.keys(this.appliedMetadata), a = new Set(this.pinnedFilters), o = new Set(this.pinnedMetadataFields), r = this.pinnedFilters.filter((v) => !e.has(v)), l = s.filter((v) => !a.has(v)), c = i.filter((v) => !o.has(v)), h = this.pendingFilter && !a.has(this.pendingFilter) && !(this.pendingFilter in this.appliedFilters), u = this.pendingMetadataField && !o.has(this.pendingMetadataField) && !(this.pendingMetadataField in this.appliedMetadata), g = s.length + i.length > 0;
|
|
8097
|
+
return e.size + r.length + this.pinnedMetadataFields.length + l.length + c.length + (h ? 1 : 0) + (u ? 1 : 0) === 0 ? f : n`
|
|
8098
8098
|
<div class="chips-row">
|
|
8099
8099
|
<div class="chips">
|
|
8100
8100
|
${[...e].map(
|
|
8101
|
-
(
|
|
8101
|
+
(v) => this._renderForcedChip(v, t[v])
|
|
8102
8102
|
)}
|
|
8103
8103
|
${r.map(
|
|
8104
|
-
(
|
|
8104
|
+
(v) => this._renderFilterChip(v, this.appliedFilters[v])
|
|
8105
8105
|
)}
|
|
8106
8106
|
${this.pinnedMetadataFields.map(
|
|
8107
|
-
(
|
|
8107
|
+
(v) => this._renderMetadataChip(v, this.appliedMetadata[v])
|
|
8108
8108
|
)}
|
|
8109
8109
|
${l.map(
|
|
8110
|
-
(
|
|
8110
|
+
(v) => this._renderFilterChip(v, this.appliedFilters[v])
|
|
8111
8111
|
)}
|
|
8112
8112
|
${h ? n`
|
|
8113
|
-
<span class="chip pinned-empty active pending" @click=${(
|
|
8113
|
+
<span class="chip pinned-empty active pending" @click=${(v) => this._openFilter(this.pendingFilter, v)}>
|
|
8114
8114
|
<span class="chip-icon"><ap-icon name=${this._getFilterIcon(this.pendingFilter)} .size=${16}></ap-icon></span>
|
|
8115
8115
|
<span class="chip-label">${nt[this.pendingFilter] || this.pendingFilter}</span>
|
|
8116
8116
|
<span class="chip-chevron"><ap-icon name="chevron-down" .size=${14}></ap-icon></span>
|
|
8117
8117
|
</span>
|
|
8118
|
-
` :
|
|
8118
|
+
` : f}
|
|
8119
8119
|
${c.map(
|
|
8120
|
-
(
|
|
8120
|
+
(v) => this._renderMetadataChip(v, this.appliedMetadata[v])
|
|
8121
8121
|
)}
|
|
8122
8122
|
${u ? n`
|
|
8123
|
-
<span class="chip pinned-empty active pending" @click=${(
|
|
8123
|
+
<span class="chip pinned-empty active pending" @click=${(v) => this._openMetadataFilter(this.pendingMetadataField, v)}>
|
|
8124
8124
|
<span class="chip-icon"><ap-icon name=${this._getMetadataIcon(this.pendingMetadataField)} .size=${16}></ap-icon></span>
|
|
8125
8125
|
<span class="chip-label">${this._getMetadataLabel(this.pendingMetadataField)}</span>
|
|
8126
8126
|
<span class="chip-chevron"><ap-icon name="chevron-down" .size=${14}></ap-icon></span>
|
|
8127
8127
|
</span>
|
|
8128
|
-
` :
|
|
8129
|
-
${g ? n`<button class="clear-all" @click=${this._clearAll}>Clear filters</button>` :
|
|
8128
|
+
` : f}
|
|
8129
|
+
${g ? n`<button class="clear-all" @click=${this._clearAll}>Clear filters</button>` : f}
|
|
8130
8130
|
</div>
|
|
8131
8131
|
</div>
|
|
8132
8132
|
`;
|
|
8133
8133
|
}
|
|
8134
8134
|
};
|
|
8135
|
-
Q.styles =
|
|
8135
|
+
Q.styles = F`
|
|
8136
8136
|
:host {
|
|
8137
8137
|
display: block;
|
|
8138
8138
|
}
|
|
@@ -8281,43 +8281,43 @@ Q.styles = S`
|
|
|
8281
8281
|
}
|
|
8282
8282
|
`;
|
|
8283
8283
|
ne([
|
|
8284
|
-
|
|
8284
|
+
d({ type: Object })
|
|
8285
8285
|
], Q.prototype, "appliedFilters", 2);
|
|
8286
8286
|
ne([
|
|
8287
|
-
|
|
8287
|
+
d({ type: Object })
|
|
8288
8288
|
], Q.prototype, "appliedMetadata", 2);
|
|
8289
8289
|
ne([
|
|
8290
|
-
|
|
8290
|
+
d({ type: Object })
|
|
8291
8291
|
], Q.prototype, "forcedFilters", 2);
|
|
8292
8292
|
ne([
|
|
8293
|
-
|
|
8293
|
+
d({ type: Array })
|
|
8294
8294
|
], Q.prototype, "metadataFields", 2);
|
|
8295
8295
|
ne([
|
|
8296
|
-
|
|
8296
|
+
d({ type: Array })
|
|
8297
8297
|
], Q.prototype, "pinnedFilters", 2);
|
|
8298
8298
|
ne([
|
|
8299
|
-
|
|
8299
|
+
d({ type: Array })
|
|
8300
8300
|
], Q.prototype, "pinnedMetadataFields", 2);
|
|
8301
8301
|
ne([
|
|
8302
|
-
|
|
8302
|
+
d({ type: Array })
|
|
8303
8303
|
], Q.prototype, "tags", 2);
|
|
8304
8304
|
ne([
|
|
8305
|
-
|
|
8305
|
+
d({ type: Array })
|
|
8306
8306
|
], Q.prototype, "labels", 2);
|
|
8307
8307
|
ne([
|
|
8308
|
-
|
|
8308
|
+
d()
|
|
8309
8309
|
], Q.prototype, "activeFilter", 2);
|
|
8310
8310
|
ne([
|
|
8311
|
-
|
|
8311
|
+
d()
|
|
8312
8312
|
], Q.prototype, "activeMetadataField", 2);
|
|
8313
8313
|
ne([
|
|
8314
|
-
|
|
8314
|
+
d()
|
|
8315
8315
|
], Q.prototype, "pendingFilter", 2);
|
|
8316
8316
|
ne([
|
|
8317
|
-
|
|
8317
|
+
d()
|
|
8318
8318
|
], Q.prototype, "pendingMetadataField", 2);
|
|
8319
8319
|
Q = ne([
|
|
8320
|
-
|
|
8320
|
+
T("ap-filters-bar")
|
|
8321
8321
|
], Q);
|
|
8322
8322
|
var Qo = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, ke = (t, e, s, i) => {
|
|
8323
8323
|
for (var a = i > 1 ? void 0 : i ? Yo(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -8325,7 +8325,7 @@ var Qo = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, ke = (t, e
|
|
|
8325
8325
|
return i && a && Qo(e, s, a), a;
|
|
8326
8326
|
};
|
|
8327
8327
|
const Wo = 6;
|
|
8328
|
-
let ge = class extends
|
|
8328
|
+
let ge = class extends E {
|
|
8329
8329
|
constructor() {
|
|
8330
8330
|
super(...arguments), this.assets = [], this.folders = [], this.folderPreviews = {}, this.selectedIds = [], this.selectedFolderIds = [], this.isLoading = !1, this.multiSelect = !0, this.folderSelectable = !1, this.gridSize = "normal", this._prevCount = 0;
|
|
8331
8331
|
}
|
|
@@ -8382,12 +8382,12 @@ let ge = class extends C {
|
|
|
8382
8382
|
<div class="ghost-line ghost-name"></div>
|
|
8383
8383
|
<div class="ghost-line ghost-meta"></div>
|
|
8384
8384
|
</div>
|
|
8385
|
-
</div>`) :
|
|
8385
|
+
</div>`) : f}
|
|
8386
8386
|
</div>
|
|
8387
8387
|
`;
|
|
8388
8388
|
}
|
|
8389
8389
|
};
|
|
8390
|
-
ge.styles =
|
|
8390
|
+
ge.styles = F`
|
|
8391
8391
|
:host {
|
|
8392
8392
|
display: block;
|
|
8393
8393
|
padding: 0 20px 16px;
|
|
@@ -8444,34 +8444,34 @@ ge.styles = S`
|
|
|
8444
8444
|
}
|
|
8445
8445
|
`;
|
|
8446
8446
|
ke([
|
|
8447
|
-
|
|
8447
|
+
d({ type: Array })
|
|
8448
8448
|
], ge.prototype, "assets", 2);
|
|
8449
8449
|
ke([
|
|
8450
|
-
|
|
8450
|
+
d({ type: Array })
|
|
8451
8451
|
], ge.prototype, "folders", 2);
|
|
8452
8452
|
ke([
|
|
8453
|
-
|
|
8453
|
+
d({ type: Object })
|
|
8454
8454
|
], ge.prototype, "folderPreviews", 2);
|
|
8455
8455
|
ke([
|
|
8456
|
-
|
|
8456
|
+
d({ type: Array })
|
|
8457
8457
|
], ge.prototype, "selectedIds", 2);
|
|
8458
8458
|
ke([
|
|
8459
|
-
|
|
8459
|
+
d({ type: Array })
|
|
8460
8460
|
], ge.prototype, "selectedFolderIds", 2);
|
|
8461
8461
|
ke([
|
|
8462
|
-
|
|
8462
|
+
d({ type: Boolean })
|
|
8463
8463
|
], ge.prototype, "isLoading", 2);
|
|
8464
8464
|
ke([
|
|
8465
|
-
|
|
8465
|
+
d({ type: Boolean })
|
|
8466
8466
|
], ge.prototype, "multiSelect", 2);
|
|
8467
8467
|
ke([
|
|
8468
|
-
|
|
8468
|
+
d({ type: Boolean })
|
|
8469
8469
|
], ge.prototype, "folderSelectable", 2);
|
|
8470
8470
|
ke([
|
|
8471
|
-
|
|
8471
|
+
d({ type: String })
|
|
8472
8472
|
], ge.prototype, "gridSize", 2);
|
|
8473
8473
|
ge = ke([
|
|
8474
|
-
|
|
8474
|
+
T("ap-grid-view")
|
|
8475
8475
|
], ge);
|
|
8476
8476
|
var Xo = Object.defineProperty, Zo = Object.getOwnPropertyDescriptor, ve = (t, e, s, i) => {
|
|
8477
8477
|
for (var a = i > 1 ? void 0 : i ? Zo(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -8479,7 +8479,7 @@ var Xo = Object.defineProperty, Zo = Object.getOwnPropertyDescriptor, ve = (t, e
|
|
|
8479
8479
|
return i && a && Xo(e, s, a), a;
|
|
8480
8480
|
};
|
|
8481
8481
|
const Jo = 5;
|
|
8482
|
-
let J = class extends
|
|
8482
|
+
let J = class extends E {
|
|
8483
8483
|
constructor() {
|
|
8484
8484
|
super(...arguments), this.assets = [], this.folders = [], this.selectedIds = [], this.selectedFolderIds = [], this.isLoading = !1, this.multiSelect = !0, this.folderSelectable = !1, this.totalCount = 0, this.isSelectingAll = !1, this.folderPreviews = {}, this._compactLevel = 0;
|
|
8485
8485
|
}
|
|
@@ -8523,12 +8523,12 @@ let J = class extends C {
|
|
|
8523
8523
|
<path d="M5 12h14"></path>
|
|
8524
8524
|
</svg>
|
|
8525
8525
|
</div>
|
|
8526
|
-
</span>` :
|
|
8526
|
+
</span>` : f}
|
|
8527
8527
|
<span></span>
|
|
8528
8528
|
<span>Name</span>
|
|
8529
8529
|
<span>Type</span>
|
|
8530
|
-
${this._compactLevel < 2 ? n`<span>Size</span>` :
|
|
8531
|
-
${this._compactLevel < 1 ? n`<span>Date</span>` :
|
|
8530
|
+
${this._compactLevel < 2 ? n`<span>Size</span>` : f}
|
|
8531
|
+
${this._compactLevel < 1 ? n`<span>Date</span>` : f}
|
|
8532
8532
|
<span></span>
|
|
8533
8533
|
</div>
|
|
8534
8534
|
<div class="list-body" role="list" aria-label="Assets">
|
|
@@ -8571,21 +8571,21 @@ let J = class extends C {
|
|
|
8571
8571
|
const o = ["70%", "55%", "80%", "45%", "65%"];
|
|
8572
8572
|
return n`
|
|
8573
8573
|
<div class="ghost-row" style="grid-template-columns: ${this._getGridColumns(this.multiSelect)}">
|
|
8574
|
-
${this.multiSelect ? n`<div class="ghost-el ghost-check"></div>` :
|
|
8574
|
+
${this.multiSelect ? n`<div class="ghost-el ghost-check"></div>` : f}
|
|
8575
8575
|
<div class="ghost-el ghost-thumb"></div>
|
|
8576
8576
|
<div class="ghost-el ghost-name" style="width: ${o[a]}"></div>
|
|
8577
8577
|
<div class="ghost-el ghost-type"></div>
|
|
8578
|
-
${this._compactLevel < 2 ? n`<div class="ghost-el ghost-size"></div>` :
|
|
8579
|
-
${this._compactLevel < 1 ? n`<div class="ghost-el ghost-date"></div>` :
|
|
8578
|
+
${this._compactLevel < 2 ? n`<div class="ghost-el ghost-size"></div>` : f}
|
|
8579
|
+
${this._compactLevel < 1 ? n`<div class="ghost-el ghost-date"></div>` : f}
|
|
8580
8580
|
<div></div>
|
|
8581
8581
|
</div>
|
|
8582
8582
|
`;
|
|
8583
|
-
}) :
|
|
8583
|
+
}) : f}
|
|
8584
8584
|
</div>
|
|
8585
8585
|
`;
|
|
8586
8586
|
}
|
|
8587
8587
|
};
|
|
8588
|
-
J.styles =
|
|
8588
|
+
J.styles = F`
|
|
8589
8589
|
:host {
|
|
8590
8590
|
display: block;
|
|
8591
8591
|
padding: 0 20px 16px;
|
|
@@ -8674,40 +8674,40 @@ J.styles = S`
|
|
|
8674
8674
|
}
|
|
8675
8675
|
`;
|
|
8676
8676
|
ve([
|
|
8677
|
-
|
|
8677
|
+
d({ type: Array })
|
|
8678
8678
|
], J.prototype, "assets", 2);
|
|
8679
8679
|
ve([
|
|
8680
|
-
|
|
8680
|
+
d({ type: Array })
|
|
8681
8681
|
], J.prototype, "folders", 2);
|
|
8682
8682
|
ve([
|
|
8683
|
-
|
|
8683
|
+
d({ type: Array })
|
|
8684
8684
|
], J.prototype, "selectedIds", 2);
|
|
8685
8685
|
ve([
|
|
8686
|
-
|
|
8686
|
+
d({ type: Array })
|
|
8687
8687
|
], J.prototype, "selectedFolderIds", 2);
|
|
8688
8688
|
ve([
|
|
8689
|
-
|
|
8689
|
+
d({ type: Boolean })
|
|
8690
8690
|
], J.prototype, "isLoading", 2);
|
|
8691
8691
|
ve([
|
|
8692
|
-
|
|
8692
|
+
d({ type: Boolean })
|
|
8693
8693
|
], J.prototype, "multiSelect", 2);
|
|
8694
8694
|
ve([
|
|
8695
|
-
|
|
8695
|
+
d({ type: Boolean })
|
|
8696
8696
|
], J.prototype, "folderSelectable", 2);
|
|
8697
8697
|
ve([
|
|
8698
|
-
|
|
8698
|
+
d({ type: Number })
|
|
8699
8699
|
], J.prototype, "totalCount", 2);
|
|
8700
8700
|
ve([
|
|
8701
|
-
|
|
8701
|
+
d({ type: Boolean })
|
|
8702
8702
|
], J.prototype, "isSelectingAll", 2);
|
|
8703
8703
|
ve([
|
|
8704
|
-
|
|
8704
|
+
d({ type: Object })
|
|
8705
8705
|
], J.prototype, "folderPreviews", 2);
|
|
8706
8706
|
ve([
|
|
8707
8707
|
_()
|
|
8708
8708
|
], J.prototype, "_compactLevel", 2);
|
|
8709
8709
|
J = ve([
|
|
8710
|
-
|
|
8710
|
+
T("ap-list-view")
|
|
8711
8711
|
], J);
|
|
8712
8712
|
function Fs(t) {
|
|
8713
8713
|
if (t === 0) return "0 B";
|
|
@@ -8731,7 +8731,7 @@ var er = Object.defineProperty, tr = Object.getOwnPropertyDescriptor, Mt = (t, e
|
|
|
8731
8731
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
8732
8732
|
return i && a && er(e, s, a), a;
|
|
8733
8733
|
};
|
|
8734
|
-
let Ye = class extends
|
|
8734
|
+
let Ye = class extends E {
|
|
8735
8735
|
constructor() {
|
|
8736
8736
|
super(...arguments), this.index = 0, this.selected = !1, this.multiSelect = !0;
|
|
8737
8737
|
}
|
|
@@ -8767,35 +8767,35 @@ let Ye = class extends C {
|
|
|
8767
8767
|
}));
|
|
8768
8768
|
}
|
|
8769
8769
|
render() {
|
|
8770
|
-
var
|
|
8770
|
+
var h, u, g, p, v, b, $, x;
|
|
8771
8771
|
const t = this.asset;
|
|
8772
8772
|
if (!t) return n``;
|
|
8773
|
-
const s = lt(t.type) === "video", i = ((
|
|
8774
|
-
let
|
|
8775
|
-
s ?
|
|
8776
|
-
const
|
|
8773
|
+
const s = lt(t.type) === "video", i = ((h = t.extension) == null ? void 0 : h.toLowerCase()) === "pdf", a = !!((u = t.info) != null && u.thumbnail || (g = t.info) != null && g.image_thumbnail || (p = t.info) != null && p.preview), o = ri(t.extension || "") || a;
|
|
8774
|
+
let r = "";
|
|
8775
|
+
s ? r = li(t) : i ? r = xs(t) : o && (r = Bt(t));
|
|
8776
|
+
const l = Tt(t.extension || ""), c = ys(t.extension || "");
|
|
8777
8777
|
return n`
|
|
8778
8778
|
<div class="card" @click=${this._handleSelect}>
|
|
8779
|
-
<div class="thumbnail ${
|
|
8780
|
-
${
|
|
8781
|
-
src=${
|
|
8779
|
+
<div class="thumbnail ${c && r ? "chess" : ""}">
|
|
8780
|
+
${r ? n`<img
|
|
8781
|
+
src=${r}
|
|
8782
8782
|
alt=${t.name}
|
|
8783
8783
|
loading="lazy"
|
|
8784
|
-
class="thumb-img ${
|
|
8785
|
-
@error=${(
|
|
8786
|
-
const
|
|
8787
|
-
|
|
8784
|
+
class="thumb-img ${c ? "transparent-asset" : ""}"
|
|
8785
|
+
@error=${(k) => {
|
|
8786
|
+
const w = k.target, P = ct();
|
|
8787
|
+
w.src !== l && w.src !== P ? (w.src = l, w.classList.add("icon-fallback")) : w.src !== P && (w.src = P);
|
|
8788
8788
|
}}
|
|
8789
8789
|
/>` : n`<img
|
|
8790
|
-
src=${
|
|
8790
|
+
src=${l}
|
|
8791
8791
|
alt=${t.name}
|
|
8792
8792
|
class="thumb-img icon-fallback"
|
|
8793
|
-
@error=${(
|
|
8794
|
-
const
|
|
8795
|
-
|
|
8793
|
+
@error=${(k) => {
|
|
8794
|
+
const w = k.target, P = ct();
|
|
8795
|
+
w.src !== P && (w.src = P);
|
|
8796
8796
|
}}
|
|
8797
8797
|
/>`}
|
|
8798
|
-
${s && (((
|
|
8798
|
+
${s && (((v = t.info) == null ? void 0 : v.video_duration) ?? ((b = t.info) == null ? void 0 : b.duration)) != null ? n`<span class="duration">${this._formatDuration(t.info.video_duration ?? t.info.duration)}</span>` : f}
|
|
8799
8799
|
<div class="overlay">
|
|
8800
8800
|
<button class="overlay-btn" @click=${this._handlePreview} aria-label="Preview">
|
|
8801
8801
|
<ap-icon name="preview" .size=${16}></ap-icon>
|
|
@@ -8814,21 +8814,21 @@ let Ye = class extends C {
|
|
|
8814
8814
|
</svg>
|
|
8815
8815
|
</div>
|
|
8816
8816
|
</div>
|
|
8817
|
-
` :
|
|
8817
|
+
` : f}
|
|
8818
8818
|
</div>
|
|
8819
8819
|
<div class="info">
|
|
8820
8820
|
<div class="name" title=${t.name}>${t.name}</div>
|
|
8821
|
-
<div class="meta">${(
|
|
8822
|
-
var
|
|
8823
|
-
const
|
|
8824
|
-
return
|
|
8825
|
-
})()} · ${Fs(((
|
|
8821
|
+
<div class="meta">${($ = t.extension) == null ? void 0 : $.toUpperCase()}${(() => {
|
|
8822
|
+
var C, A, O, M;
|
|
8823
|
+
const k = ((C = t.info) == null ? void 0 : C.img_w) || ((A = t.info) == null ? void 0 : A.video_w), w = ((O = t.info) == null ? void 0 : O.img_h) || ((M = t.info) == null ? void 0 : M.video_h), P = ki(k, w);
|
|
8824
|
+
return P ? ` · ${P}` : "";
|
|
8825
|
+
})()} · ${Fs(((x = t.size) == null ? void 0 : x.bytes) || 0)}</div>
|
|
8826
8826
|
</div>
|
|
8827
8827
|
</div>
|
|
8828
8828
|
`;
|
|
8829
8829
|
}
|
|
8830
8830
|
};
|
|
8831
|
-
Ye.styles =
|
|
8831
|
+
Ye.styles = F`
|
|
8832
8832
|
:host {
|
|
8833
8833
|
display: block;
|
|
8834
8834
|
animation: ap-card-in 300ms ease-out both;
|
|
@@ -9009,26 +9009,26 @@ Ye.styles = S`
|
|
|
9009
9009
|
}
|
|
9010
9010
|
`;
|
|
9011
9011
|
Mt([
|
|
9012
|
-
|
|
9012
|
+
d({ type: Object })
|
|
9013
9013
|
], Ye.prototype, "asset", 2);
|
|
9014
9014
|
Mt([
|
|
9015
|
-
|
|
9015
|
+
d({ type: Number })
|
|
9016
9016
|
], Ye.prototype, "index", 2);
|
|
9017
9017
|
Mt([
|
|
9018
|
-
|
|
9018
|
+
d({ type: Boolean, reflect: !0 })
|
|
9019
9019
|
], Ye.prototype, "selected", 2);
|
|
9020
9020
|
Mt([
|
|
9021
|
-
|
|
9021
|
+
d({ type: Boolean })
|
|
9022
9022
|
], Ye.prototype, "multiSelect", 2);
|
|
9023
9023
|
Ye = Mt([
|
|
9024
|
-
|
|
9024
|
+
T("ap-asset-card")
|
|
9025
9025
|
], Ye);
|
|
9026
9026
|
var sr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, mt = (t, e, s, i) => {
|
|
9027
9027
|
for (var a = i > 1 ? void 0 : i ? ir(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
9028
9028
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
9029
9029
|
return i && a && sr(e, s, a), a;
|
|
9030
9030
|
};
|
|
9031
|
-
let Re = class extends
|
|
9031
|
+
let Re = class extends E {
|
|
9032
9032
|
constructor() {
|
|
9033
9033
|
super(...arguments), this.index = 0, this.selected = !1, this.multiSelect = !0, this.compactLevel = 0;
|
|
9034
9034
|
}
|
|
@@ -9064,13 +9064,13 @@ let Re = class extends C {
|
|
|
9064
9064
|
}));
|
|
9065
9065
|
}
|
|
9066
9066
|
render() {
|
|
9067
|
-
var
|
|
9067
|
+
var h, u, g, p, v, b;
|
|
9068
9068
|
const t = this.asset;
|
|
9069
9069
|
if (!t) return n``;
|
|
9070
|
-
const s = lt(t.type) === "video", i = ((
|
|
9071
|
-
let
|
|
9072
|
-
s ?
|
|
9073
|
-
const
|
|
9070
|
+
const s = lt(t.type) === "video", i = ((h = t.extension) == null ? void 0 : h.toLowerCase()) === "pdf", a = !!((u = t.info) != null && u.thumbnail || (g = t.info) != null && g.image_thumbnail || (p = t.info) != null && p.preview), o = ri(t.extension || "") || a;
|
|
9071
|
+
let r = "";
|
|
9072
|
+
s ? r = li(t) : i ? r = xs(t) : o && (r = Bt(t));
|
|
9073
|
+
const l = Tt(t.extension || ""), c = ys(t.extension || "");
|
|
9074
9074
|
return n`
|
|
9075
9075
|
<div class="row" style="grid-template-columns: ${this._getGridColumns()}" @click=${this._handleSelect}>
|
|
9076
9076
|
${this.multiSelect ? n`
|
|
@@ -9081,31 +9081,31 @@ let Re = class extends C {
|
|
|
9081
9081
|
</svg>
|
|
9082
9082
|
</div>
|
|
9083
9083
|
</div>
|
|
9084
|
-
` :
|
|
9085
|
-
<div class="thumb ${
|
|
9086
|
-
${
|
|
9087
|
-
src=${
|
|
9084
|
+
` : f}
|
|
9085
|
+
<div class="thumb ${c && r ? "chess" : ""}">
|
|
9086
|
+
${r ? n`<img
|
|
9087
|
+
src=${r}
|
|
9088
9088
|
alt=${t.name}
|
|
9089
|
-
class="${
|
|
9089
|
+
class="${c ? "transparent-asset" : ""}"
|
|
9090
9090
|
loading="lazy"
|
|
9091
|
-
@error=${(
|
|
9092
|
-
const
|
|
9093
|
-
|
|
9091
|
+
@error=${($) => {
|
|
9092
|
+
const x = $.target, k = ct();
|
|
9093
|
+
x.src !== l && x.src !== k ? (x.src = l, x.classList.add("icon-fallback")) : x.src !== k && (x.src = k);
|
|
9094
9094
|
}}
|
|
9095
9095
|
/>` : n`<img
|
|
9096
|
-
src=${
|
|
9096
|
+
src=${l}
|
|
9097
9097
|
alt=${t.name}
|
|
9098
9098
|
class="icon-fallback"
|
|
9099
|
-
@error=${(
|
|
9100
|
-
const
|
|
9101
|
-
|
|
9099
|
+
@error=${($) => {
|
|
9100
|
+
const x = $.target, k = ct();
|
|
9101
|
+
x.src !== k && (x.src = k);
|
|
9102
9102
|
}}
|
|
9103
9103
|
/>`}
|
|
9104
9104
|
</div>
|
|
9105
9105
|
<div class="name" title=${t.name}>${t.name}</div>
|
|
9106
|
-
<div class="type">${(
|
|
9107
|
-
${this.compactLevel < 2 ? n`<div class="desc">${Fs(((
|
|
9108
|
-
${this.compactLevel < 1 ? n`<div class="date">${Vt(t.created_at || "")}</div>` :
|
|
9106
|
+
<div class="type">${(v = t.extension) == null ? void 0 : v.toUpperCase()}</div>
|
|
9107
|
+
${this.compactLevel < 2 ? n`<div class="desc">${Fs(((b = t.size) == null ? void 0 : b.bytes) || 0)}</div>` : f}
|
|
9108
|
+
${this.compactLevel < 1 ? n`<div class="date">${Vt(t.created_at || "")}</div>` : f}
|
|
9109
9109
|
<div class="actions">
|
|
9110
9110
|
<button class="icon-btn select-btn" @click=${this._handleQuickSelect} aria-label="Select" title="Select">
|
|
9111
9111
|
<ap-icon name="select" .size=${16}></ap-icon>
|
|
@@ -9118,7 +9118,7 @@ let Re = class extends C {
|
|
|
9118
9118
|
`;
|
|
9119
9119
|
}
|
|
9120
9120
|
};
|
|
9121
|
-
Re.styles =
|
|
9121
|
+
Re.styles = F`
|
|
9122
9122
|
:host {
|
|
9123
9123
|
display: block;
|
|
9124
9124
|
}
|
|
@@ -9250,29 +9250,29 @@ Re.styles = S`
|
|
|
9250
9250
|
}
|
|
9251
9251
|
`;
|
|
9252
9252
|
mt([
|
|
9253
|
-
|
|
9253
|
+
d({ type: Object })
|
|
9254
9254
|
], Re.prototype, "asset", 2);
|
|
9255
9255
|
mt([
|
|
9256
|
-
|
|
9256
|
+
d({ type: Number })
|
|
9257
9257
|
], Re.prototype, "index", 2);
|
|
9258
9258
|
mt([
|
|
9259
|
-
|
|
9259
|
+
d({ type: Boolean, reflect: !0 })
|
|
9260
9260
|
], Re.prototype, "selected", 2);
|
|
9261
9261
|
mt([
|
|
9262
|
-
|
|
9262
|
+
d({ type: Boolean })
|
|
9263
9263
|
], Re.prototype, "multiSelect", 2);
|
|
9264
9264
|
mt([
|
|
9265
|
-
|
|
9265
|
+
d({ type: Number })
|
|
9266
9266
|
], Re.prototype, "compactLevel", 2);
|
|
9267
9267
|
Re = mt([
|
|
9268
|
-
|
|
9268
|
+
T("ap-asset-row")
|
|
9269
9269
|
], Re);
|
|
9270
9270
|
var ar = Object.defineProperty, or = Object.getOwnPropertyDescriptor, tt = (t, e, s, i) => {
|
|
9271
9271
|
for (var a = i > 1 ? void 0 : i ? or(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
9272
9272
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
9273
9273
|
return i && a && ar(e, s, a), a;
|
|
9274
9274
|
};
|
|
9275
|
-
let Ae = class extends
|
|
9275
|
+
let Ae = class extends E {
|
|
9276
9276
|
constructor() {
|
|
9277
9277
|
super(...arguments), this.previews = [], this.selected = !1, this.selectable = !1, this.multiSelect = !0, this.index = 0;
|
|
9278
9278
|
}
|
|
@@ -9331,7 +9331,7 @@ let Ae = class extends C {
|
|
|
9331
9331
|
<div class="preview-left">${this._renderPreviewImg(t[0])}</div>
|
|
9332
9332
|
<div class="preview-right">
|
|
9333
9333
|
<div class="preview-right-item">${this._renderPreviewImg(t[1])}</div>
|
|
9334
|
-
${t[2] ? n`<div class="preview-right-item">${this._renderPreviewImg(t[2])}</div>` :
|
|
9334
|
+
${t[2] ? n`<div class="preview-right-item">${this._renderPreviewImg(t[2])}</div>` : f}
|
|
9335
9335
|
</div>
|
|
9336
9336
|
</div>
|
|
9337
9337
|
`;
|
|
@@ -9356,7 +9356,7 @@ let Ae = class extends C {
|
|
|
9356
9356
|
</svg>
|
|
9357
9357
|
</div>
|
|
9358
9358
|
</div>
|
|
9359
|
-
` :
|
|
9359
|
+
` : f}
|
|
9360
9360
|
<div class="card-content">
|
|
9361
9361
|
<div class="preview-container">
|
|
9362
9362
|
<div class="preview-overlay"></div>
|
|
@@ -9366,7 +9366,7 @@ let Ae = class extends C {
|
|
|
9366
9366
|
<div class="name" title=${t.name}>${t.name}</div>
|
|
9367
9367
|
<div class="counts">
|
|
9368
9368
|
<span>${e} asset${e !== 1 ? "s" : ""}</span>
|
|
9369
|
-
${i > 0 ? n`<span>${i} sub-asset${i !== 1 ? "s" : ""}</span>` :
|
|
9369
|
+
${i > 0 ? n`<span>${i} sub-asset${i !== 1 ? "s" : ""}</span>` : f}
|
|
9370
9370
|
</div>
|
|
9371
9371
|
</div>
|
|
9372
9372
|
</div>
|
|
@@ -9374,7 +9374,7 @@ let Ae = class extends C {
|
|
|
9374
9374
|
`;
|
|
9375
9375
|
}
|
|
9376
9376
|
};
|
|
9377
|
-
Ae.styles = [ee,
|
|
9377
|
+
Ae.styles = [ee, F`
|
|
9378
9378
|
:host {
|
|
9379
9379
|
display: block;
|
|
9380
9380
|
}
|
|
@@ -9554,32 +9554,32 @@ Ae.styles = [ee, S`
|
|
|
9554
9554
|
}
|
|
9555
9555
|
`];
|
|
9556
9556
|
tt([
|
|
9557
|
-
|
|
9557
|
+
d({ type: Object })
|
|
9558
9558
|
], Ae.prototype, "folder", 2);
|
|
9559
9559
|
tt([
|
|
9560
|
-
|
|
9560
|
+
d({ type: Array })
|
|
9561
9561
|
], Ae.prototype, "previews", 2);
|
|
9562
9562
|
tt([
|
|
9563
|
-
|
|
9563
|
+
d({ type: Boolean, reflect: !0 })
|
|
9564
9564
|
], Ae.prototype, "selected", 2);
|
|
9565
9565
|
tt([
|
|
9566
|
-
|
|
9566
|
+
d({ type: Boolean })
|
|
9567
9567
|
], Ae.prototype, "selectable", 2);
|
|
9568
9568
|
tt([
|
|
9569
|
-
|
|
9569
|
+
d({ type: Boolean })
|
|
9570
9570
|
], Ae.prototype, "multiSelect", 2);
|
|
9571
9571
|
tt([
|
|
9572
|
-
|
|
9572
|
+
d({ type: Number })
|
|
9573
9573
|
], Ae.prototype, "index", 2);
|
|
9574
9574
|
Ae = tt([
|
|
9575
|
-
|
|
9575
|
+
T("ap-folder-card")
|
|
9576
9576
|
], Ae);
|
|
9577
9577
|
var rr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, je = (t, e, s, i) => {
|
|
9578
9578
|
for (var a = i > 1 ? void 0 : i ? nr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
9579
9579
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
9580
9580
|
return i && a && rr(e, s, a), a;
|
|
9581
9581
|
};
|
|
9582
|
-
let xe = class extends
|
|
9582
|
+
let xe = class extends E {
|
|
9583
9583
|
constructor() {
|
|
9584
9584
|
super(...arguments), this.previews = [], this.selected = !1, this.selectable = !1, this.multiSelect = !0, this.index = 0, this.compactLevel = 0;
|
|
9585
9585
|
}
|
|
@@ -9652,18 +9652,18 @@ let xe = class extends C {
|
|
|
9652
9652
|
<path d="M20 6 9 17l-5-5"></path>
|
|
9653
9653
|
</svg>
|
|
9654
9654
|
</div>
|
|
9655
|
-
</div>` : n`<div></div>` :
|
|
9655
|
+
</div>` : n`<div></div>` : f}
|
|
9656
9656
|
<div class="thumb">${this._renderThumb()}</div>
|
|
9657
9657
|
<div class="name">${t.name}</div>
|
|
9658
9658
|
<div class="meta">Folder</div>
|
|
9659
|
-
${this.compactLevel < 2 ? n`<div class="meta">${((e = t.count) == null ? void 0 : e.files_recursive) ?? ((s = t.count) == null ? void 0 : s.files_direct) ?? 0} items</div>` :
|
|
9660
|
-
${this.compactLevel < 1 ? n`<div class="meta">${Vt(t.modified_at || t.updated_at || "")}</div>` :
|
|
9659
|
+
${this.compactLevel < 2 ? n`<div class="meta">${((e = t.count) == null ? void 0 : e.files_recursive) ?? ((s = t.count) == null ? void 0 : s.files_direct) ?? 0} items</div>` : f}
|
|
9660
|
+
${this.compactLevel < 1 ? n`<div class="meta">${Vt(t.modified_at || t.updated_at || "")}</div>` : f}
|
|
9661
9661
|
<div></div>
|
|
9662
9662
|
</div>
|
|
9663
9663
|
` : n``;
|
|
9664
9664
|
}
|
|
9665
9665
|
};
|
|
9666
|
-
xe.styles =
|
|
9666
|
+
xe.styles = F`
|
|
9667
9667
|
:host {
|
|
9668
9668
|
display: block;
|
|
9669
9669
|
}
|
|
@@ -9784,35 +9784,35 @@ xe.styles = S`
|
|
|
9784
9784
|
}
|
|
9785
9785
|
`;
|
|
9786
9786
|
je([
|
|
9787
|
-
|
|
9787
|
+
d({ type: Object })
|
|
9788
9788
|
], xe.prototype, "folder", 2);
|
|
9789
9789
|
je([
|
|
9790
|
-
|
|
9790
|
+
d({ type: Array })
|
|
9791
9791
|
], xe.prototype, "previews", 2);
|
|
9792
9792
|
je([
|
|
9793
|
-
|
|
9793
|
+
d({ type: Boolean, reflect: !0 })
|
|
9794
9794
|
], xe.prototype, "selected", 2);
|
|
9795
9795
|
je([
|
|
9796
|
-
|
|
9796
|
+
d({ type: Boolean })
|
|
9797
9797
|
], xe.prototype, "selectable", 2);
|
|
9798
9798
|
je([
|
|
9799
|
-
|
|
9799
|
+
d({ type: Boolean })
|
|
9800
9800
|
], xe.prototype, "multiSelect", 2);
|
|
9801
9801
|
je([
|
|
9802
|
-
|
|
9802
|
+
d({ type: Number })
|
|
9803
9803
|
], xe.prototype, "index", 2);
|
|
9804
9804
|
je([
|
|
9805
|
-
|
|
9805
|
+
d({ type: Number })
|
|
9806
9806
|
], xe.prototype, "compactLevel", 2);
|
|
9807
9807
|
xe = je([
|
|
9808
|
-
|
|
9808
|
+
T("ap-folder-row")
|
|
9809
9809
|
], xe);
|
|
9810
9810
|
var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, As = (t, e, s, i) => {
|
|
9811
9811
|
for (var a = i > 1 ? void 0 : i ? cr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
9812
9812
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
9813
9813
|
return i && a && lr(e, s, a), a;
|
|
9814
9814
|
};
|
|
9815
|
-
let wt = class extends
|
|
9815
|
+
let wt = class extends E {
|
|
9816
9816
|
constructor() {
|
|
9817
9817
|
super(...arguments), this.index = 0;
|
|
9818
9818
|
}
|
|
@@ -9840,7 +9840,7 @@ let wt = class extends C {
|
|
|
9840
9840
|
`;
|
|
9841
9841
|
}
|
|
9842
9842
|
};
|
|
9843
|
-
wt.styles = [ee,
|
|
9843
|
+
wt.styles = [ee, F`
|
|
9844
9844
|
:host {
|
|
9845
9845
|
display: block;
|
|
9846
9846
|
}
|
|
@@ -9889,20 +9889,20 @@ wt.styles = [ee, S`
|
|
|
9889
9889
|
}
|
|
9890
9890
|
`];
|
|
9891
9891
|
As([
|
|
9892
|
-
|
|
9892
|
+
d({ type: Object })
|
|
9893
9893
|
], wt.prototype, "label", 2);
|
|
9894
9894
|
As([
|
|
9895
|
-
|
|
9895
|
+
d({ type: Number })
|
|
9896
9896
|
], wt.prototype, "index", 2);
|
|
9897
9897
|
wt = As([
|
|
9898
|
-
|
|
9898
|
+
T("ap-label-card")
|
|
9899
9899
|
], wt);
|
|
9900
9900
|
var dr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, Es = (t, e, s, i) => {
|
|
9901
9901
|
for (var a = i > 1 ? void 0 : i ? pr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
9902
9902
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
9903
9903
|
return i && a && dr(e, s, a), a;
|
|
9904
9904
|
};
|
|
9905
|
-
let $t = class extends
|
|
9905
|
+
let $t = class extends E {
|
|
9906
9906
|
constructor() {
|
|
9907
9907
|
super(...arguments), this.index = 0;
|
|
9908
9908
|
}
|
|
@@ -9928,7 +9928,7 @@ let $t = class extends C {
|
|
|
9928
9928
|
`;
|
|
9929
9929
|
}
|
|
9930
9930
|
};
|
|
9931
|
-
$t.styles =
|
|
9931
|
+
$t.styles = F`
|
|
9932
9932
|
:host {
|
|
9933
9933
|
display: block;
|
|
9934
9934
|
}
|
|
@@ -9970,20 +9970,20 @@ $t.styles = S`
|
|
|
9970
9970
|
}
|
|
9971
9971
|
`;
|
|
9972
9972
|
Es([
|
|
9973
|
-
|
|
9973
|
+
d({ type: Object })
|
|
9974
9974
|
], $t.prototype, "label", 2);
|
|
9975
9975
|
Es([
|
|
9976
|
-
|
|
9976
|
+
d({ type: Number })
|
|
9977
9977
|
], $t.prototype, "index", 2);
|
|
9978
9978
|
$t = Es([
|
|
9979
|
-
|
|
9979
|
+
T("ap-label-row")
|
|
9980
9980
|
], $t);
|
|
9981
9981
|
var hr = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, Ts = (t, e, s, i) => {
|
|
9982
9982
|
for (var a = i > 1 ? void 0 : i ? ur(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
9983
9983
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
9984
9984
|
return i && a && hr(e, s, a), a;
|
|
9985
9985
|
};
|
|
9986
|
-
let kt = class extends
|
|
9986
|
+
let kt = class extends E {
|
|
9987
9987
|
constructor() {
|
|
9988
9988
|
super(...arguments), this.index = 0;
|
|
9989
9989
|
}
|
|
@@ -10017,7 +10017,7 @@ let kt = class extends C {
|
|
|
10017
10017
|
` : n``;
|
|
10018
10018
|
}
|
|
10019
10019
|
};
|
|
10020
|
-
kt.styles = [ee,
|
|
10020
|
+
kt.styles = [ee, F`
|
|
10021
10021
|
@keyframes ap-card-in {
|
|
10022
10022
|
from { opacity: 0; transform: translateY(8px); }
|
|
10023
10023
|
to { opacity: 1; transform: translateY(0); }
|
|
@@ -10081,20 +10081,20 @@ kt.styles = [ee, S`
|
|
|
10081
10081
|
}
|
|
10082
10082
|
`];
|
|
10083
10083
|
Ts([
|
|
10084
|
-
|
|
10084
|
+
d({ type: Object })
|
|
10085
10085
|
], kt.prototype, "collection", 2);
|
|
10086
10086
|
Ts([
|
|
10087
|
-
|
|
10087
|
+
d({ type: Number })
|
|
10088
10088
|
], kt.prototype, "index", 2);
|
|
10089
10089
|
kt = Ts([
|
|
10090
|
-
|
|
10090
|
+
T("ap-collection-card")
|
|
10091
10091
|
], kt);
|
|
10092
10092
|
var fr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, Ls = (t, e, s, i) => {
|
|
10093
10093
|
for (var a = i > 1 ? void 0 : i ? gr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
10094
10094
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
10095
10095
|
return i && a && fr(e, s, a), a;
|
|
10096
10096
|
};
|
|
10097
|
-
let St = class extends
|
|
10097
|
+
let St = class extends E {
|
|
10098
10098
|
constructor() {
|
|
10099
10099
|
super(...arguments), this.index = 0;
|
|
10100
10100
|
}
|
|
@@ -10129,7 +10129,7 @@ let St = class extends C {
|
|
|
10129
10129
|
` : n``;
|
|
10130
10130
|
}
|
|
10131
10131
|
};
|
|
10132
|
-
St.styles =
|
|
10132
|
+
St.styles = F`
|
|
10133
10133
|
:host {
|
|
10134
10134
|
display: block;
|
|
10135
10135
|
}
|
|
@@ -10186,20 +10186,20 @@ St.styles = S`
|
|
|
10186
10186
|
}
|
|
10187
10187
|
`;
|
|
10188
10188
|
Ls([
|
|
10189
|
-
|
|
10189
|
+
d({ type: Object })
|
|
10190
10190
|
], St.prototype, "collection", 2);
|
|
10191
10191
|
Ls([
|
|
10192
|
-
|
|
10192
|
+
d({ type: Number })
|
|
10193
10193
|
], St.prototype, "index", 2);
|
|
10194
10194
|
St = Ls([
|
|
10195
|
-
|
|
10195
|
+
T("ap-collection-row")
|
|
10196
10196
|
], St);
|
|
10197
10197
|
var vr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, Os = (t, e, s, i) => {
|
|
10198
10198
|
for (var a = i > 1 ? void 0 : i ? mr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
10199
10199
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
10200
10200
|
return i && a && vr(e, s, a), a;
|
|
10201
10201
|
};
|
|
10202
|
-
let Ct = class extends
|
|
10202
|
+
let Ct = class extends E {
|
|
10203
10203
|
constructor() {
|
|
10204
10204
|
super(...arguments), this.index = 0;
|
|
10205
10205
|
}
|
|
@@ -10233,7 +10233,7 @@ let Ct = class extends C {
|
|
|
10233
10233
|
` : n``;
|
|
10234
10234
|
}
|
|
10235
10235
|
};
|
|
10236
|
-
Ct.styles = [ee,
|
|
10236
|
+
Ct.styles = [ee, F`
|
|
10237
10237
|
@keyframes ap-card-in {
|
|
10238
10238
|
from { opacity: 0; transform: translateY(8px); }
|
|
10239
10239
|
to { opacity: 1; transform: translateY(0); }
|
|
@@ -10293,20 +10293,20 @@ Ct.styles = [ee, S`
|
|
|
10293
10293
|
}
|
|
10294
10294
|
`];
|
|
10295
10295
|
Os([
|
|
10296
|
-
|
|
10296
|
+
d({ type: Object })
|
|
10297
10297
|
], Ct.prototype, "folder", 2);
|
|
10298
10298
|
Os([
|
|
10299
|
-
|
|
10299
|
+
d({ type: Number })
|
|
10300
10300
|
], Ct.prototype, "index", 2);
|
|
10301
10301
|
Ct = Os([
|
|
10302
|
-
|
|
10302
|
+
T("ap-collection-folder-card")
|
|
10303
10303
|
], Ct);
|
|
10304
10304
|
var br = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, Ms = (t, e, s, i) => {
|
|
10305
10305
|
for (var a = i > 1 ? void 0 : i ? _r(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
10306
10306
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
10307
10307
|
return i && a && br(e, s, a), a;
|
|
10308
10308
|
};
|
|
10309
|
-
let Ft = class extends
|
|
10309
|
+
let Ft = class extends E {
|
|
10310
10310
|
constructor() {
|
|
10311
10311
|
super(...arguments), this.index = 0;
|
|
10312
10312
|
}
|
|
@@ -10332,7 +10332,7 @@ let Ft = class extends C {
|
|
|
10332
10332
|
` : n``;
|
|
10333
10333
|
}
|
|
10334
10334
|
};
|
|
10335
|
-
Ft.styles =
|
|
10335
|
+
Ft.styles = F`
|
|
10336
10336
|
:host {
|
|
10337
10337
|
display: block;
|
|
10338
10338
|
}
|
|
@@ -10379,20 +10379,20 @@ Ft.styles = S`
|
|
|
10379
10379
|
}
|
|
10380
10380
|
`;
|
|
10381
10381
|
Ms([
|
|
10382
|
-
|
|
10382
|
+
d({ type: Object })
|
|
10383
10383
|
], Ft.prototype, "folder", 2);
|
|
10384
10384
|
Ms([
|
|
10385
|
-
|
|
10385
|
+
d({ type: Number })
|
|
10386
10386
|
], Ft.prototype, "index", 2);
|
|
10387
10387
|
Ft = Ms([
|
|
10388
|
-
|
|
10388
|
+
T("ap-collection-folder-row")
|
|
10389
10389
|
], Ft);
|
|
10390
10390
|
var yr = Object.defineProperty, xr = Object.getOwnPropertyDescriptor, It = (t, e, s, i) => {
|
|
10391
10391
|
for (var a = i > 1 ? void 0 : i ? xr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
10392
10392
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
10393
10393
|
return i && a && yr(e, s, a), a;
|
|
10394
10394
|
};
|
|
10395
|
-
let We = class extends
|
|
10395
|
+
let We = class extends E {
|
|
10396
10396
|
constructor() {
|
|
10397
10397
|
super(...arguments), this.variant = "grid", this.gridSize = "normal", this.multiSelect = !0, this.folderCount = 0;
|
|
10398
10398
|
}
|
|
@@ -10453,7 +10453,7 @@ let We = class extends C {
|
|
|
10453
10453
|
`;
|
|
10454
10454
|
}
|
|
10455
10455
|
};
|
|
10456
|
-
We.styles =
|
|
10456
|
+
We.styles = F`
|
|
10457
10457
|
:host {
|
|
10458
10458
|
display: block;
|
|
10459
10459
|
padding: 0 20px 16px;
|
|
@@ -10580,26 +10580,26 @@ We.styles = S`
|
|
|
10580
10580
|
}
|
|
10581
10581
|
`;
|
|
10582
10582
|
It([
|
|
10583
|
-
|
|
10583
|
+
d({ reflect: !0 })
|
|
10584
10584
|
], We.prototype, "variant", 2);
|
|
10585
10585
|
It([
|
|
10586
|
-
|
|
10586
|
+
d({ type: String })
|
|
10587
10587
|
], We.prototype, "gridSize", 2);
|
|
10588
10588
|
It([
|
|
10589
|
-
|
|
10589
|
+
d({ type: Boolean })
|
|
10590
10590
|
], We.prototype, "multiSelect", 2);
|
|
10591
10591
|
It([
|
|
10592
|
-
|
|
10592
|
+
d({ type: Number })
|
|
10593
10593
|
], We.prototype, "folderCount", 2);
|
|
10594
10594
|
We = It([
|
|
10595
|
-
|
|
10595
|
+
T("ap-skeleton")
|
|
10596
10596
|
], We);
|
|
10597
10597
|
var wr = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, G = (t, e, s, i) => {
|
|
10598
10598
|
for (var a = i > 1 ? void 0 : i ? $r(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
10599
10599
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
10600
10600
|
return i && a && wr(e, s, a), a;
|
|
10601
10601
|
};
|
|
10602
|
-
let B = class extends
|
|
10602
|
+
let B = class extends E {
|
|
10603
10603
|
constructor() {
|
|
10604
10604
|
super(...arguments), this.asset = null, this.assets = [], this.selectedIds = [], this.containerToken = "", this.showMetadata = !0, this.metadataFields = [], this.labels = [], this.regionalFilters = {}, this.multiSelect = !0, this._isFullscreen = !1, this._fsImageLoaded = !1, this._previewLoading = !1, this._openSections = /* @__PURE__ */ new Set(["file-info", "metadata"]), this._hls = null;
|
|
10605
10605
|
}
|
|
@@ -10763,14 +10763,14 @@ let B = class extends C {
|
|
|
10763
10763
|
}
|
|
10764
10764
|
_applyTagFilter(t) {
|
|
10765
10765
|
this.dispatchEvent(new CustomEvent("filter-update", {
|
|
10766
|
-
detail: { key: y.TAGS, values: [t], operator:
|
|
10766
|
+
detail: { key: y.TAGS, values: [t], operator: L.IS },
|
|
10767
10767
|
bubbles: !0,
|
|
10768
10768
|
composed: !0
|
|
10769
10769
|
}));
|
|
10770
10770
|
}
|
|
10771
10771
|
_applyLabelFilter(t) {
|
|
10772
10772
|
this.dispatchEvent(new CustomEvent("filter-update", {
|
|
10773
|
-
detail: { key: y.LABELS, values: [t], operator:
|
|
10773
|
+
detail: { key: y.LABELS, values: [t], operator: L.IS },
|
|
10774
10774
|
bubbles: !0,
|
|
10775
10775
|
composed: !0
|
|
10776
10776
|
}));
|
|
@@ -10781,7 +10781,7 @@ let B = class extends C {
|
|
|
10781
10781
|
}
|
|
10782
10782
|
_renderFileInfoSection(t) {
|
|
10783
10783
|
const e = this._getFileInfoRows(t);
|
|
10784
|
-
if (e.length === 0) return
|
|
10784
|
+
if (e.length === 0) return f;
|
|
10785
10785
|
const s = this._openSections.has("file-info");
|
|
10786
10786
|
return n`
|
|
10787
10787
|
<div class="accordion">
|
|
@@ -10809,7 +10809,7 @@ let B = class extends C {
|
|
|
10809
10809
|
`;
|
|
10810
10810
|
}
|
|
10811
10811
|
_renderAccordion(t, e, s) {
|
|
10812
|
-
if (s.length === 0) return
|
|
10812
|
+
if (s.length === 0) return f;
|
|
10813
10813
|
const i = this._openSections.has(t);
|
|
10814
10814
|
return n`
|
|
10815
10815
|
<div class="accordion">
|
|
@@ -10890,11 +10890,11 @@ let B = class extends C {
|
|
|
10890
10890
|
if (this.metadataFields.length > 0) {
|
|
10891
10891
|
const h = t;
|
|
10892
10892
|
for (const u of this.metadataFields) {
|
|
10893
|
-
const g = h[u.key] ?? ((r = (o = t.info) == null ? void 0 : o.metadata) == null ? void 0 : r[u.key]) ?? ((l = t.meta) == null ? void 0 : l[u.key]),
|
|
10894
|
-
if (!
|
|
10893
|
+
const g = h[u.key] ?? ((r = (o = t.info) == null ? void 0 : o.metadata) == null ? void 0 : r[u.key]) ?? ((l = t.meta) == null ? void 0 : l[u.key]), p = this._resolveFieldValue(g, u);
|
|
10894
|
+
if (!p) continue;
|
|
10895
10895
|
i.add(u.key), u.slug && i.add(u.slug);
|
|
10896
|
-
const
|
|
10897
|
-
e.push({ label: u.label, value:
|
|
10896
|
+
const v = p.length > 50;
|
|
10897
|
+
e.push({ label: u.label, value: p, wrap: v });
|
|
10898
10898
|
}
|
|
10899
10899
|
}
|
|
10900
10900
|
if (t.meta)
|
|
@@ -10902,17 +10902,17 @@ let B = class extends C {
|
|
|
10902
10902
|
if (i.has(h) || u == null || u === "") continue;
|
|
10903
10903
|
const g = s.get(h);
|
|
10904
10904
|
if (g) {
|
|
10905
|
-
const
|
|
10906
|
-
if (!
|
|
10905
|
+
const p = this._resolveFieldValue(u, g);
|
|
10906
|
+
if (!p) continue;
|
|
10907
10907
|
i.add(h);
|
|
10908
|
-
const
|
|
10909
|
-
e.push({ label: g.label, value:
|
|
10908
|
+
const v = p.length > 50;
|
|
10909
|
+
e.push({ label: g.label, value: p, wrap: v });
|
|
10910
10910
|
} else {
|
|
10911
|
-
const
|
|
10912
|
-
if (!
|
|
10911
|
+
const p = typeof u == "object" ? JSON.stringify(u) : String(u);
|
|
10912
|
+
if (!p || p === "{}" || p === "[]") continue;
|
|
10913
10913
|
i.add(h);
|
|
10914
|
-
const
|
|
10915
|
-
e.push({ label:
|
|
10914
|
+
const v = h.charAt(0).toUpperCase() + h.slice(1).replace(/_/g, " "), b = p.length > 50;
|
|
10915
|
+
e.push({ label: v, value: p, wrap: b });
|
|
10916
10916
|
}
|
|
10917
10917
|
}
|
|
10918
10918
|
const a = (c = t.info) == null ? void 0 : c.metadata;
|
|
@@ -10921,17 +10921,17 @@ let B = class extends C {
|
|
|
10921
10921
|
if (i.has(h) || u == null || u === "") continue;
|
|
10922
10922
|
const g = s.get(h);
|
|
10923
10923
|
if (g) {
|
|
10924
|
-
const
|
|
10925
|
-
if (!
|
|
10924
|
+
const p = this._resolveFieldValue(u, g);
|
|
10925
|
+
if (!p) continue;
|
|
10926
10926
|
i.add(h);
|
|
10927
|
-
const
|
|
10928
|
-
e.push({ label: g.label, value:
|
|
10927
|
+
const v = p.length > 50;
|
|
10928
|
+
e.push({ label: g.label, value: p, wrap: v });
|
|
10929
10929
|
} else {
|
|
10930
|
-
const
|
|
10931
|
-
if (!
|
|
10930
|
+
const p = typeof u == "object" ? JSON.stringify(u) : String(u);
|
|
10931
|
+
if (!p || p === "{}" || p === "[]") continue;
|
|
10932
10932
|
i.add(h);
|
|
10933
|
-
const
|
|
10934
|
-
e.push({ label:
|
|
10933
|
+
const v = h.charAt(0).toUpperCase() + h.slice(1).replace(/_/g, " "), b = p.length > 50;
|
|
10934
|
+
e.push({ label: v, value: p, wrap: b });
|
|
10935
10935
|
}
|
|
10936
10936
|
}
|
|
10937
10937
|
return e;
|
|
@@ -10941,7 +10941,7 @@ let B = class extends C {
|
|
|
10941
10941
|
}
|
|
10942
10942
|
_renderLabelsRow(t) {
|
|
10943
10943
|
const e = this._getAssetLabels(t);
|
|
10944
|
-
return e.length === 0 ?
|
|
10944
|
+
return e.length === 0 ? f : n`
|
|
10945
10945
|
<div class="meta-row" style="flex-direction:column;gap:6px">
|
|
10946
10946
|
<span class="meta-label">Labels</span>
|
|
10947
10947
|
<div class="tags-list">
|
|
@@ -10959,7 +10959,7 @@ let B = class extends C {
|
|
|
10959
10959
|
}
|
|
10960
10960
|
_renderTagsRow(t) {
|
|
10961
10961
|
const e = this._getTagEntries(t.tags);
|
|
10962
|
-
return e.length === 0 ?
|
|
10962
|
+
return e.length === 0 ? f : n`
|
|
10963
10963
|
<div class="meta-row">
|
|
10964
10964
|
<span class="meta-label">Tags</span>
|
|
10965
10965
|
<div class="tags-list">
|
|
@@ -10971,10 +10971,10 @@ let B = class extends C {
|
|
|
10971
10971
|
`;
|
|
10972
10972
|
}
|
|
10973
10973
|
render() {
|
|
10974
|
-
var
|
|
10974
|
+
var C, A, O, M, ye, le, R, se;
|
|
10975
10975
|
const t = this.asset;
|
|
10976
|
-
if (!t) return
|
|
10977
|
-
const e = lt(t.type), s = e === "image", i = e === "video", a = e === "audio", o = ((
|
|
10976
|
+
if (!t) return f;
|
|
10977
|
+
const e = lt(t.type), s = e === "image", i = e === "video", a = e === "audio", o = ((C = t.extension) == null ? void 0 : C.toLowerCase()) === "pdf", r = Tt(t.extension || ""), l = ys(t.extension || ""), c = ((A = t.extension) == null ? void 0 : A.toLowerCase()) === "svg", h = Bt(t), u = s ? c ? ((O = t.url) == null ? void 0 : O.cdn) || "" : h || Ge(((M = t.url) == null ? void 0 : M.cdn) || "", this.containerToken) : "", g = s ? this._getFullscreenImageUrl(t) : "", p = s && !c ? this._getBlurDimensions(t) : null, v = i && ((ye = t.url) == null ? void 0 : ye.cdn) || "", b = i && (((le = t.info) == null ? void 0 : le.video_thumbnail) || ((R = t.info) == null ? void 0 : R.preview)) || "", $ = o && !s ? xs(t) : "", x = this._getCurrentIndex(), k = x > 0 && this._findNavTarget(x, -1) >= 0, w = x >= 0 && this._findNavTarget(x, 1) >= 0, P = this.assets.length > 1;
|
|
10978
10978
|
return n`
|
|
10979
10979
|
<div class="panel">
|
|
10980
10980
|
<div class="panel-header">
|
|
@@ -10994,20 +10994,20 @@ let B = class extends C {
|
|
|
10994
10994
|
</div>
|
|
10995
10995
|
|
|
10996
10996
|
<div class="preview-area ${s && l ? "chess" : ""}">
|
|
10997
|
-
${
|
|
10998
|
-
<button class="nav-btn prev" @click=${this._prev} ?disabled=${!
|
|
10997
|
+
${P ? n`
|
|
10998
|
+
<button class="nav-btn prev" @click=${this._prev} ?disabled=${!k} aria-label="Previous">
|
|
10999
10999
|
<ap-icon name="chevron-left" .size=${16}></ap-icon>
|
|
11000
11000
|
</button>
|
|
11001
|
-
<button class="nav-btn next" @click=${this._next} ?disabled=${
|
|
11001
|
+
<button class="nav-btn next" @click=${this._next} ?disabled=${!w} aria-label="Next">
|
|
11002
11002
|
<ap-icon name="chevron-right" .size=${16}></ap-icon>
|
|
11003
11003
|
</button>
|
|
11004
|
-
` :
|
|
11004
|
+
` : f}
|
|
11005
11005
|
${this._isFullscreen ? n`
|
|
11006
11006
|
<button class="fs-close-btn" @click=${this._exitFullscreen} aria-label="Exit fullscreen">
|
|
11007
11007
|
<ap-icon name="close" .size=${16}></ap-icon>
|
|
11008
11008
|
</button>
|
|
11009
|
-
` :
|
|
11010
|
-
${this._previewLoading ? n`<div class="preview-loading"><div class="spinner"></div></div>` :
|
|
11009
|
+
` : f}
|
|
11010
|
+
${this._previewLoading ? n`<div class="preview-loading"><div class="spinner"></div></div>` : f}
|
|
11011
11011
|
${s ? n`
|
|
11012
11012
|
<img
|
|
11013
11013
|
src=${u}
|
|
@@ -11021,12 +11021,12 @@ let B = class extends C {
|
|
|
11021
11021
|
}}
|
|
11022
11022
|
/>
|
|
11023
11023
|
<div class="fs-wrapper">
|
|
11024
|
-
${c ?
|
|
11024
|
+
${c ? f : n`
|
|
11025
11025
|
<img
|
|
11026
11026
|
class="fs-blur ${this._fsImageLoaded ? "hidden" : ""}"
|
|
11027
11027
|
src=${u}
|
|
11028
11028
|
alt=""
|
|
11029
|
-
style="width:${
|
|
11029
|
+
style="width:${p.width};height:${p.height}"
|
|
11030
11030
|
/>
|
|
11031
11031
|
`}
|
|
11032
11032
|
<img
|
|
@@ -11037,36 +11037,36 @@ let B = class extends C {
|
|
|
11037
11037
|
@load=${this._onFsImageLoad}
|
|
11038
11038
|
/>
|
|
11039
11039
|
</div>
|
|
11040
|
-
` :
|
|
11041
|
-
${i ? n`<video src=${
|
|
11040
|
+
` : f}
|
|
11041
|
+
${i ? n`<video src=${v} poster=${b || f} controls controlsList="nofullscreen" @loadeddata=${() => {
|
|
11042
11042
|
this._previewLoading = !1;
|
|
11043
11043
|
}} @error=${() => {
|
|
11044
11044
|
this._previewLoading = !1;
|
|
11045
|
-
}}></video>` :
|
|
11046
|
-
${a ? n`<audio src=${((se = t.url) == null ? void 0 : se.cdn) || ""} controls></audio>` :
|
|
11045
|
+
}}></video>` : f}
|
|
11046
|
+
${a ? n`<audio src=${((se = t.url) == null ? void 0 : se.cdn) || ""} controls></audio>` : f}
|
|
11047
11047
|
${o && !s ? n`
|
|
11048
11048
|
<img
|
|
11049
|
-
src=${
|
|
11049
|
+
src=${$ || r}
|
|
11050
11050
|
alt=${t.name}
|
|
11051
|
-
class=${
|
|
11051
|
+
class=${$ ? "" : "icon-fallback"}
|
|
11052
11052
|
@error=${(ie) => {
|
|
11053
11053
|
const U = ie.target;
|
|
11054
11054
|
U.src !== r && (U.src = r, U.classList.add("icon-fallback"));
|
|
11055
11055
|
}}
|
|
11056
11056
|
/>
|
|
11057
|
-
` :
|
|
11058
|
-
${!s && !i && !a && !o ? n`<img src=${r} alt=${t.name} class="icon-fallback" />` :
|
|
11057
|
+
` : f}
|
|
11058
|
+
${!s && !i && !a && !o ? n`<img src=${r} alt=${t.name} class="icon-fallback" />` : f}
|
|
11059
11059
|
</div>
|
|
11060
11060
|
|
|
11061
11061
|
${this._renderFileInfoSection(t)}
|
|
11062
11062
|
${this.showMetadata ? n`
|
|
11063
11063
|
${this._renderAccordion("metadata", "Metadata", this._getAllMetadataRows(t))}
|
|
11064
|
-
` :
|
|
11064
|
+
` : f}
|
|
11065
11065
|
</div>
|
|
11066
11066
|
`;
|
|
11067
11067
|
}
|
|
11068
11068
|
};
|
|
11069
|
-
B.styles =
|
|
11069
|
+
B.styles = F`
|
|
11070
11070
|
:host {
|
|
11071
11071
|
display: block;
|
|
11072
11072
|
}
|
|
@@ -11379,31 +11379,31 @@ B.styles = S`
|
|
|
11379
11379
|
}
|
|
11380
11380
|
`;
|
|
11381
11381
|
G([
|
|
11382
|
-
|
|
11382
|
+
d({ type: Object })
|
|
11383
11383
|
], B.prototype, "asset", 2);
|
|
11384
11384
|
G([
|
|
11385
|
-
|
|
11385
|
+
d({ type: Array })
|
|
11386
11386
|
], B.prototype, "assets", 2);
|
|
11387
11387
|
G([
|
|
11388
|
-
|
|
11388
|
+
d({ type: Array })
|
|
11389
11389
|
], B.prototype, "selectedIds", 2);
|
|
11390
11390
|
G([
|
|
11391
|
-
|
|
11391
|
+
d()
|
|
11392
11392
|
], B.prototype, "containerToken", 2);
|
|
11393
11393
|
G([
|
|
11394
|
-
|
|
11394
|
+
d({ type: Boolean })
|
|
11395
11395
|
], B.prototype, "showMetadata", 2);
|
|
11396
11396
|
G([
|
|
11397
|
-
|
|
11397
|
+
d({ type: Array })
|
|
11398
11398
|
], B.prototype, "metadataFields", 2);
|
|
11399
11399
|
G([
|
|
11400
|
-
|
|
11400
|
+
d({ type: Array })
|
|
11401
11401
|
], B.prototype, "labels", 2);
|
|
11402
11402
|
G([
|
|
11403
|
-
|
|
11403
|
+
d({ type: Object })
|
|
11404
11404
|
], B.prototype, "regionalFilters", 2);
|
|
11405
11405
|
G([
|
|
11406
|
-
|
|
11406
|
+
d({ type: Boolean })
|
|
11407
11407
|
], B.prototype, "multiSelect", 2);
|
|
11408
11408
|
G([
|
|
11409
11409
|
Ze(".preview-area")
|
|
@@ -11424,7 +11424,7 @@ G([
|
|
|
11424
11424
|
_()
|
|
11425
11425
|
], B.prototype, "_openSections", 2);
|
|
11426
11426
|
B = G([
|
|
11427
|
-
|
|
11427
|
+
T("ap-preview-panel")
|
|
11428
11428
|
], B);
|
|
11429
11429
|
var kr = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, Is = (t, e, s, i) => {
|
|
11430
11430
|
for (var a = i > 1 ? void 0 : i ? Sr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -11782,13 +11782,13 @@ const Cr = {
|
|
|
11782
11782
|
{ tag: "path", attrs: { d: "M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" } }
|
|
11783
11783
|
]
|
|
11784
11784
|
};
|
|
11785
|
-
let At = class extends
|
|
11785
|
+
let At = class extends E {
|
|
11786
11786
|
constructor() {
|
|
11787
11787
|
super(...arguments), this.name = "", this.size = 20;
|
|
11788
11788
|
}
|
|
11789
11789
|
render() {
|
|
11790
11790
|
const t = Cr[this.name];
|
|
11791
|
-
if (!t) return
|
|
11791
|
+
if (!t) return f;
|
|
11792
11792
|
const e = typeof t == "string" ? Ie`<path d=${t}></path>` : t.map((s) => {
|
|
11793
11793
|
const { tag: i, attrs: a } = s;
|
|
11794
11794
|
return i === "circle" ? Ie`<circle cx=${a.cx} cy=${a.cy} r=${a.r} fill=${a.fill ?? "none"}></circle>` : i === "rect" ? Ie`<rect width=${a.width} height=${a.height} x=${a.x} y=${a.y} rx=${a.rx ?? "0"} ry=${a.ry ?? "0"}></rect>` : Ie`<path d=${a.d}></path>`;
|
|
@@ -11809,7 +11809,7 @@ let At = class extends C {
|
|
|
11809
11809
|
}
|
|
11810
11810
|
};
|
|
11811
11811
|
At.styles = [
|
|
11812
|
-
|
|
11812
|
+
F`
|
|
11813
11813
|
:host {
|
|
11814
11814
|
display: inline-flex;
|
|
11815
11815
|
align-items: center;
|
|
@@ -11822,20 +11822,20 @@ At.styles = [
|
|
|
11822
11822
|
`
|
|
11823
11823
|
];
|
|
11824
11824
|
Is([
|
|
11825
|
-
|
|
11825
|
+
d()
|
|
11826
11826
|
], At.prototype, "name", 2);
|
|
11827
11827
|
Is([
|
|
11828
|
-
|
|
11828
|
+
d({ type: Number })
|
|
11829
11829
|
], At.prototype, "size", 2);
|
|
11830
11830
|
At = Is([
|
|
11831
|
-
|
|
11831
|
+
T("ap-icon")
|
|
11832
11832
|
], At);
|
|
11833
11833
|
var Fr = Object.defineProperty, Ar = Object.getOwnPropertyDescriptor, Le = (t, e, s, i) => {
|
|
11834
11834
|
for (var a = i > 1 ? void 0 : i ? Ar(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
11835
11835
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
11836
11836
|
return i && a && Fr(e, s, a), a;
|
|
11837
11837
|
};
|
|
11838
|
-
let be = class extends
|
|
11838
|
+
let be = class extends E {
|
|
11839
11839
|
constructor() {
|
|
11840
11840
|
super(...arguments), this.selectedAssets = [], this.selectedFolders = [], this.totalCount = 0, this.totalFolderCount = 0, this.isSelectingAll = !1, this.multiSelect = !0, this.showTransform = !1;
|
|
11841
11841
|
}
|
|
@@ -11887,7 +11887,7 @@ let be = class extends C {
|
|
|
11887
11887
|
}));
|
|
11888
11888
|
}
|
|
11889
11889
|
render() {
|
|
11890
|
-
return this._totalSelected === 0 ?
|
|
11890
|
+
return this._totalSelected === 0 ? f : n`
|
|
11891
11891
|
<div class="bar">
|
|
11892
11892
|
<span class="count">${this._formatCount()}</span>
|
|
11893
11893
|
${this.multiSelect ? n`
|
|
@@ -11897,20 +11897,20 @@ let be = class extends C {
|
|
|
11897
11897
|
class="bar-btn"
|
|
11898
11898
|
?disabled=${this.isSelectingAll}
|
|
11899
11899
|
@click=${this._selectAll}
|
|
11900
|
-
><ap-icon name="check-check" .size=${14}></ap-icon>${this.isSelectingAll ? "Selecting..." : this.maxSelections && this.maxSelections < this._scopeTotal ? `First ${this.maxSelections}` : this._selectScope === "assets" ? "Select all assets" : this._selectScope === "folders" ? "Select all folders" : "Select all"}</button>` :
|
|
11900
|
+
><ap-icon name="check-check" .size=${14}></ap-icon>${this.isSelectingAll ? "Selecting..." : this.maxSelections && this.maxSelections < this._scopeTotal ? `First ${this.maxSelections}` : this._selectScope === "assets" ? "Select all assets" : this._selectScope === "folders" ? "Select all folders" : "Select all"}</button>` : f}
|
|
11901
11901
|
<button class="bar-btn" @click=${this._clear}><ap-icon name="close" .size=${14}></ap-icon>Deselect all</button>
|
|
11902
|
-
${this.maxSelections && this._totalSelected >= this.maxSelections ? n`<span class="limit-notice">Max ${this.maxSelections} allowed</span>` :
|
|
11903
|
-
` :
|
|
11902
|
+
${this.maxSelections && this._totalSelected >= this.maxSelections ? n`<span class="limit-notice">Max ${this.maxSelections} allowed</span>` : f}
|
|
11903
|
+
` : f}
|
|
11904
11904
|
<div class="spacer"></div>
|
|
11905
11905
|
${this.showTransform ? n`
|
|
11906
11906
|
<button class="btn-confirm btn-transform" @click=${this._transform}>Transform</button>
|
|
11907
|
-
` :
|
|
11907
|
+
` : f}
|
|
11908
11908
|
<button class="btn-confirm" @click=${this._confirm}>Confirm</button>
|
|
11909
11909
|
</div>
|
|
11910
11910
|
`;
|
|
11911
11911
|
}
|
|
11912
11912
|
};
|
|
11913
|
-
be.styles =
|
|
11913
|
+
be.styles = F`
|
|
11914
11914
|
:host {
|
|
11915
11915
|
display: block;
|
|
11916
11916
|
padding: 0 8px 8px;
|
|
@@ -12003,43 +12003,43 @@ be.styles = S`
|
|
|
12003
12003
|
}
|
|
12004
12004
|
`;
|
|
12005
12005
|
Le([
|
|
12006
|
-
|
|
12006
|
+
d({ type: Array })
|
|
12007
12007
|
], be.prototype, "selectedAssets", 2);
|
|
12008
12008
|
Le([
|
|
12009
|
-
|
|
12009
|
+
d({ type: Array })
|
|
12010
12010
|
], be.prototype, "selectedFolders", 2);
|
|
12011
12011
|
Le([
|
|
12012
|
-
|
|
12012
|
+
d({ type: Number })
|
|
12013
12013
|
], be.prototype, "totalCount", 2);
|
|
12014
12014
|
Le([
|
|
12015
|
-
|
|
12015
|
+
d({ type: Number })
|
|
12016
12016
|
], be.prototype, "totalFolderCount", 2);
|
|
12017
12017
|
Le([
|
|
12018
|
-
|
|
12018
|
+
d({ type: Boolean })
|
|
12019
12019
|
], be.prototype, "isSelectingAll", 2);
|
|
12020
12020
|
Le([
|
|
12021
|
-
|
|
12021
|
+
d({ type: Boolean })
|
|
12022
12022
|
], be.prototype, "multiSelect", 2);
|
|
12023
12023
|
Le([
|
|
12024
|
-
|
|
12024
|
+
d({ type: Number })
|
|
12025
12025
|
], be.prototype, "maxSelections", 2);
|
|
12026
12026
|
Le([
|
|
12027
|
-
|
|
12027
|
+
d({ type: Boolean })
|
|
12028
12028
|
], be.prototype, "showTransform", 2);
|
|
12029
12029
|
be = Le([
|
|
12030
|
-
|
|
12030
|
+
T("ap-selection-bar")
|
|
12031
12031
|
], be);
|
|
12032
12032
|
var Er = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, Ps = (t, e, s, i) => {
|
|
12033
12033
|
for (var a = i > 1 ? void 0 : i ? Tr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
12034
12034
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
12035
12035
|
return i && a && Er(e, s, a), a;
|
|
12036
12036
|
};
|
|
12037
|
-
let Et = class extends
|
|
12037
|
+
let Et = class extends E {
|
|
12038
12038
|
constructor() {
|
|
12039
12039
|
super(...arguments), this.active = !1, this.rect = { x: 0, y: 0, width: 0, height: 0 };
|
|
12040
12040
|
}
|
|
12041
12041
|
render() {
|
|
12042
|
-
return !this.active || this.rect.width < 5 || this.rect.height < 5 ?
|
|
12042
|
+
return !this.active || this.rect.width < 5 || this.rect.height < 5 ? f : n`
|
|
12043
12043
|
<div
|
|
12044
12044
|
class="marquee"
|
|
12045
12045
|
style="left:${this.rect.x}px;top:${this.rect.y}px;width:${this.rect.width}px;height:${this.rect.height}px"
|
|
@@ -12047,7 +12047,7 @@ let Et = class extends C {
|
|
|
12047
12047
|
`;
|
|
12048
12048
|
}
|
|
12049
12049
|
};
|
|
12050
|
-
Et.styles =
|
|
12050
|
+
Et.styles = F`
|
|
12051
12051
|
:host {
|
|
12052
12052
|
display: block;
|
|
12053
12053
|
position: absolute;
|
|
@@ -12066,20 +12066,20 @@ Et.styles = S`
|
|
|
12066
12066
|
}
|
|
12067
12067
|
`;
|
|
12068
12068
|
Ps([
|
|
12069
|
-
|
|
12069
|
+
d({ type: Boolean })
|
|
12070
12070
|
], Et.prototype, "active", 2);
|
|
12071
12071
|
Ps([
|
|
12072
|
-
|
|
12072
|
+
d({ type: Object })
|
|
12073
12073
|
], Et.prototype, "rect", 2);
|
|
12074
12074
|
Et = Ps([
|
|
12075
|
-
|
|
12075
|
+
T("ap-marquee-overlay")
|
|
12076
12076
|
], Et);
|
|
12077
12077
|
var Lr = Object.defineProperty, Or = Object.getOwnPropertyDescriptor, st = (t, e, s, i) => {
|
|
12078
12078
|
for (var a = i > 1 ? void 0 : i ? Or(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
12079
12079
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
12080
12080
|
return i && a && Lr(e, s, a), a;
|
|
12081
12081
|
};
|
|
12082
|
-
let Ee = class extends
|
|
12082
|
+
let Ee = class extends E {
|
|
12083
12083
|
constructor() {
|
|
12084
12084
|
super(...arguments), this.value = "", this.options = [], this.disabled = !1, this.clearable = !1, this.direction = "vertical", this._onKeydown = (t) => {
|
|
12085
12085
|
const e = this.options.filter(
|
|
@@ -12123,11 +12123,11 @@ let Ee = class extends C {
|
|
|
12123
12123
|
class="option"
|
|
12124
12124
|
role="radio"
|
|
12125
12125
|
aria-checked=${t.value === this.value}
|
|
12126
|
-
aria-disabled=${this.disabled || t.disabled ? "true" :
|
|
12126
|
+
aria-disabled=${this.disabled || t.disabled ? "true" : f}
|
|
12127
12127
|
@click=${() => this._select(t)}
|
|
12128
12128
|
>
|
|
12129
12129
|
<div class="radio"><div class="dot"></div></div>
|
|
12130
|
-
${t.icon ? n`<ap-icon name=${t.icon} .size=${16}></ap-icon>` :
|
|
12130
|
+
${t.icon ? n`<ap-icon name=${t.icon} .size=${16}></ap-icon>` : f}
|
|
12131
12131
|
<span class="label">${t.label}</span>
|
|
12132
12132
|
</div>
|
|
12133
12133
|
`
|
|
@@ -12146,7 +12146,7 @@ let Ee = class extends C {
|
|
|
12146
12146
|
};
|
|
12147
12147
|
Ee.styles = [
|
|
12148
12148
|
ee,
|
|
12149
|
-
|
|
12149
|
+
F`
|
|
12150
12150
|
:host {
|
|
12151
12151
|
display: flex;
|
|
12152
12152
|
flex-direction: column;
|
|
@@ -12210,32 +12210,32 @@ Ee.styles = [
|
|
|
12210
12210
|
`
|
|
12211
12211
|
];
|
|
12212
12212
|
st([
|
|
12213
|
-
|
|
12213
|
+
d()
|
|
12214
12214
|
], Ee.prototype, "value", 2);
|
|
12215
12215
|
st([
|
|
12216
|
-
|
|
12216
|
+
d({ type: Array })
|
|
12217
12217
|
], Ee.prototype, "options", 2);
|
|
12218
12218
|
st([
|
|
12219
|
-
|
|
12219
|
+
d({ type: Boolean })
|
|
12220
12220
|
], Ee.prototype, "disabled", 2);
|
|
12221
12221
|
st([
|
|
12222
|
-
|
|
12222
|
+
d({ type: Boolean })
|
|
12223
12223
|
], Ee.prototype, "clearable", 2);
|
|
12224
12224
|
st([
|
|
12225
|
-
|
|
12225
|
+
d({ reflect: !0 })
|
|
12226
12226
|
], Ee.prototype, "direction", 2);
|
|
12227
12227
|
st([
|
|
12228
|
-
|
|
12228
|
+
d({ reflect: !0 })
|
|
12229
12229
|
], Ee.prototype, "columns", 2);
|
|
12230
12230
|
Ee = st([
|
|
12231
|
-
|
|
12231
|
+
T("ap-radio-group")
|
|
12232
12232
|
], Ee);
|
|
12233
12233
|
var Mr = Object.defineProperty, Ir = Object.getOwnPropertyDescriptor, Si = (t, e, s, i) => {
|
|
12234
12234
|
for (var a = i > 1 ? void 0 : i ? Ir(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
12235
12235
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
12236
12236
|
return i && a && Mr(e, s, a), a;
|
|
12237
12237
|
};
|
|
12238
|
-
let Ht = class extends
|
|
12238
|
+
let Ht = class extends E {
|
|
12239
12239
|
constructor() {
|
|
12240
12240
|
super(...arguments), this.size = 24;
|
|
12241
12241
|
}
|
|
@@ -12244,7 +12244,7 @@ let Ht = class extends C {
|
|
|
12244
12244
|
}
|
|
12245
12245
|
};
|
|
12246
12246
|
Ht.styles = [
|
|
12247
|
-
|
|
12247
|
+
F`
|
|
12248
12248
|
:host {
|
|
12249
12249
|
display: inline-flex;
|
|
12250
12250
|
}
|
|
@@ -12260,17 +12260,17 @@ Ht.styles = [
|
|
|
12260
12260
|
`
|
|
12261
12261
|
];
|
|
12262
12262
|
Si([
|
|
12263
|
-
|
|
12263
|
+
d({ type: Number })
|
|
12264
12264
|
], Ht.prototype, "size", 2);
|
|
12265
12265
|
Ht = Si([
|
|
12266
|
-
|
|
12266
|
+
T("ap-spinner")
|
|
12267
12267
|
], Ht);
|
|
12268
12268
|
var Pr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, es = (t, e, s, i) => {
|
|
12269
12269
|
for (var a = i > 1 ? void 0 : i ? Dr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
12270
12270
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
12271
12271
|
return i && a && Pr(e, s, a), a;
|
|
12272
12272
|
};
|
|
12273
|
-
let ht = class extends
|
|
12273
|
+
let ht = class extends E {
|
|
12274
12274
|
constructor() {
|
|
12275
12275
|
super(...arguments), this.folders = [], this.loading = !1, this._mode = "recursive";
|
|
12276
12276
|
}
|
|
@@ -12322,7 +12322,7 @@ let ht = class extends C {
|
|
|
12322
12322
|
`;
|
|
12323
12323
|
}
|
|
12324
12324
|
};
|
|
12325
|
-
ht.styles = [ee,
|
|
12325
|
+
ht.styles = [ee, F`
|
|
12326
12326
|
:host {
|
|
12327
12327
|
display: block;
|
|
12328
12328
|
}
|
|
@@ -12397,23 +12397,23 @@ ht.styles = [ee, S`
|
|
|
12397
12397
|
}
|
|
12398
12398
|
`];
|
|
12399
12399
|
es([
|
|
12400
|
-
|
|
12400
|
+
d({ type: Array })
|
|
12401
12401
|
], ht.prototype, "folders", 2);
|
|
12402
12402
|
es([
|
|
12403
|
-
|
|
12403
|
+
d({ type: Boolean })
|
|
12404
12404
|
], ht.prototype, "loading", 2);
|
|
12405
12405
|
es([
|
|
12406
12406
|
_()
|
|
12407
12407
|
], ht.prototype, "_mode", 2);
|
|
12408
12408
|
ht = es([
|
|
12409
|
-
|
|
12409
|
+
T("ap-folder-resolve-dialog")
|
|
12410
12410
|
], ht);
|
|
12411
12411
|
var zr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, Y = (t, e, s, i) => {
|
|
12412
12412
|
for (var a = i > 1 ? void 0 : i ? Rr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
12413
12413
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
12414
12414
|
return i && a && zr(e, s, a), a;
|
|
12415
12415
|
};
|
|
12416
|
-
let q = class extends
|
|
12416
|
+
let q = class extends E {
|
|
12417
12417
|
constructor() {
|
|
12418
12418
|
super(...arguments), this.value = "", this.label = "", this.variant = "default", this.clearable = !1, this.options = [], this._open = !1, this._focusedIndex = -1, this._menuPosition = "below", this._menuAlign = "align-left", this._menuTop = 0, this._menuBottom = 0, this._menuLeft = 0, this._menuRight = 0, this._menuWidth = 0, this._handleOutsideClick = (t) => {
|
|
12419
12419
|
t.composedPath().includes(this) || (this._open = !1, document.removeEventListener("click", this._handleOutsideClick));
|
|
@@ -12434,8 +12434,8 @@ let q = class extends C {
|
|
|
12434
12434
|
@click=${this._toggle}
|
|
12435
12435
|
@keydown=${this._handleTriggerKeydown}
|
|
12436
12436
|
>
|
|
12437
|
-
${t != null && t.icon ? n`<ap-icon name=${t.icon} .size=${16}></ap-icon>` :
|
|
12438
|
-
${this.label ? n`<span class="label">${this.label}${t ? ": " : ""}</span>` :
|
|
12437
|
+
${t != null && t.icon ? n`<ap-icon name=${t.icon} .size=${16}></ap-icon>` : f}
|
|
12438
|
+
${this.label ? n`<span class="label">${this.label}${t ? ": " : ""}</span>` : f}${t ? t.label : ""}
|
|
12439
12439
|
${this.clearable && t ? n`<span class="clear-trigger" @click=${this._clear}><ap-icon name="close" .size=${12}></ap-icon></span>` : n`<ap-icon name="chevron-down" .size=${14}></ap-icon>`}
|
|
12440
12440
|
</button>
|
|
12441
12441
|
${this._open ? n`
|
|
@@ -12462,15 +12462,15 @@ let q = class extends C {
|
|
|
12462
12462
|
}}
|
|
12463
12463
|
>
|
|
12464
12464
|
<span class="option-label">
|
|
12465
|
-
${s.icon ? n`<ap-icon name=${s.icon} .size=${16}></ap-icon>` :
|
|
12465
|
+
${s.icon ? n`<ap-icon name=${s.icon} .size=${16}></ap-icon>` : f}
|
|
12466
12466
|
${s.label}
|
|
12467
12467
|
</span>
|
|
12468
|
-
${s.value === this.value ? n`<ap-icon name="check" .size=${14}></ap-icon>` :
|
|
12468
|
+
${s.value === this.value ? n`<ap-icon name="check" .size=${14}></ap-icon>` : f}
|
|
12469
12469
|
</button>
|
|
12470
12470
|
`
|
|
12471
12471
|
)}
|
|
12472
12472
|
</div>
|
|
12473
|
-
` :
|
|
12473
|
+
` : f}
|
|
12474
12474
|
`;
|
|
12475
12475
|
}
|
|
12476
12476
|
_toggle() {
|
|
@@ -12531,7 +12531,7 @@ let q = class extends C {
|
|
|
12531
12531
|
};
|
|
12532
12532
|
q.styles = [
|
|
12533
12533
|
ee,
|
|
12534
|
-
|
|
12534
|
+
F`
|
|
12535
12535
|
:host {
|
|
12536
12536
|
position: relative;
|
|
12537
12537
|
display: inline-block;
|
|
@@ -12643,19 +12643,19 @@ q.styles = [
|
|
|
12643
12643
|
`
|
|
12644
12644
|
];
|
|
12645
12645
|
Y([
|
|
12646
|
-
|
|
12646
|
+
d()
|
|
12647
12647
|
], q.prototype, "value", 2);
|
|
12648
12648
|
Y([
|
|
12649
|
-
|
|
12649
|
+
d()
|
|
12650
12650
|
], q.prototype, "label", 2);
|
|
12651
12651
|
Y([
|
|
12652
|
-
|
|
12652
|
+
d({ reflect: !0 })
|
|
12653
12653
|
], q.prototype, "variant", 2);
|
|
12654
12654
|
Y([
|
|
12655
|
-
|
|
12655
|
+
d({ type: Boolean })
|
|
12656
12656
|
], q.prototype, "clearable", 2);
|
|
12657
12657
|
Y([
|
|
12658
|
-
|
|
12658
|
+
d({ type: Array })
|
|
12659
12659
|
], q.prototype, "options", 2);
|
|
12660
12660
|
Y([
|
|
12661
12661
|
_()
|
|
@@ -12685,7 +12685,7 @@ Y([
|
|
|
12685
12685
|
_()
|
|
12686
12686
|
], q.prototype, "_menuWidth", 2);
|
|
12687
12687
|
q = Y([
|
|
12688
|
-
|
|
12688
|
+
T("ap-dropdown")
|
|
12689
12689
|
], q);
|
|
12690
12690
|
var jr = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, Oe = (t, e, s, i) => {
|
|
12691
12691
|
for (var a = i > 1 ? void 0 : i ? Nr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
@@ -12697,7 +12697,7 @@ function Br(t) {
|
|
|
12697
12697
|
const e = (t ?? "").toLowerCase();
|
|
12698
12698
|
return Ur.includes(e) ? e : "jpeg";
|
|
12699
12699
|
}
|
|
12700
|
-
let _e = class extends
|
|
12700
|
+
let _e = class extends E {
|
|
12701
12701
|
constructor() {
|
|
12702
12702
|
super(...arguments), this.assets = [], this.isMultiSelect = !1, this._format = "jpeg", this._quality = "excellent", this._lockAspect = !0, this._activePreset = "original", this._defaultFormat = "jpeg";
|
|
12703
12703
|
}
|
|
@@ -12798,7 +12798,7 @@ let _e = class extends C {
|
|
|
12798
12798
|
></ap-radio-group>
|
|
12799
12799
|
</div>
|
|
12800
12800
|
|
|
12801
|
-
${t ?
|
|
12801
|
+
${t ? f : n`
|
|
12802
12802
|
<div class="section">
|
|
12803
12803
|
<span class="section-label">Quality</span>
|
|
12804
12804
|
<ap-dropdown
|
|
@@ -12879,7 +12879,7 @@ let _e = class extends C {
|
|
|
12879
12879
|
`;
|
|
12880
12880
|
}
|
|
12881
12881
|
};
|
|
12882
|
-
_e.styles = [ee,
|
|
12882
|
+
_e.styles = [ee, F`
|
|
12883
12883
|
:host {
|
|
12884
12884
|
display: block;
|
|
12885
12885
|
}
|
|
@@ -13085,10 +13085,10 @@ _e.styles = [ee, S`
|
|
|
13085
13085
|
}
|
|
13086
13086
|
`];
|
|
13087
13087
|
Oe([
|
|
13088
|
-
|
|
13088
|
+
d({ type: Array })
|
|
13089
13089
|
], _e.prototype, "assets", 2);
|
|
13090
13090
|
Oe([
|
|
13091
|
-
|
|
13091
|
+
d({ type: Boolean })
|
|
13092
13092
|
], _e.prototype, "isMultiSelect", 2);
|
|
13093
13093
|
Oe([
|
|
13094
13094
|
_()
|
|
@@ -13109,14 +13109,14 @@ Oe([
|
|
|
13109
13109
|
_()
|
|
13110
13110
|
], _e.prototype, "_activePreset", 2);
|
|
13111
13111
|
_e = Oe([
|
|
13112
|
-
|
|
13112
|
+
T("ap-transformation-dialog")
|
|
13113
13113
|
], _e);
|
|
13114
13114
|
var qr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, ts = (t, e, s, i) => {
|
|
13115
13115
|
for (var a = i > 1 ? void 0 : i ? Vr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
13116
13116
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
13117
13117
|
return i && a && qr(e, s, a), a;
|
|
13118
13118
|
};
|
|
13119
|
-
let ut = class extends
|
|
13119
|
+
let ut = class extends E {
|
|
13120
13120
|
constructor() {
|
|
13121
13121
|
super(...arguments), this.checked = !1, this.indeterminate = !1, this.disabled = !1, this._hasLabel = !1, this._handleHostClick = () => {
|
|
13122
13122
|
this.dispatchEvent(new CustomEvent("ap-toggle", {
|
|
@@ -13151,7 +13151,7 @@ let ut = class extends C {
|
|
|
13151
13151
|
}
|
|
13152
13152
|
};
|
|
13153
13153
|
ut.styles = [
|
|
13154
|
-
|
|
13154
|
+
F`
|
|
13155
13155
|
:host {
|
|
13156
13156
|
display: inline-flex;
|
|
13157
13157
|
align-items: center;
|
|
@@ -13213,23 +13213,23 @@ ut.styles = [
|
|
|
13213
13213
|
`
|
|
13214
13214
|
];
|
|
13215
13215
|
ts([
|
|
13216
|
-
|
|
13216
|
+
d({ type: Boolean, reflect: !0 })
|
|
13217
13217
|
], ut.prototype, "checked", 2);
|
|
13218
13218
|
ts([
|
|
13219
|
-
|
|
13219
|
+
d({ type: Boolean, reflect: !0 })
|
|
13220
13220
|
], ut.prototype, "indeterminate", 2);
|
|
13221
13221
|
ts([
|
|
13222
|
-
|
|
13222
|
+
d({ type: Boolean, reflect: !0 })
|
|
13223
13223
|
], ut.prototype, "disabled", 2);
|
|
13224
13224
|
ut = ts([
|
|
13225
|
-
|
|
13225
|
+
T("ap-checkbox")
|
|
13226
13226
|
], ut);
|
|
13227
13227
|
var Hr = Object.defineProperty, Gr = Object.getOwnPropertyDescriptor, Ci = (t, e, s, i) => {
|
|
13228
13228
|
for (var a = i > 1 ? void 0 : i ? Gr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
13229
13229
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
13230
13230
|
return i && a && Hr(e, s, a), a;
|
|
13231
13231
|
};
|
|
13232
|
-
let Gt = class extends
|
|
13232
|
+
let Gt = class extends E {
|
|
13233
13233
|
constructor() {
|
|
13234
13234
|
super(...arguments), this.open = !1, this._handleOutsideClick = (t) => {
|
|
13235
13235
|
this.open && !t.composedPath().includes(this) && (this.open = !1);
|
|
@@ -13251,7 +13251,7 @@ let Gt = class extends C {
|
|
|
13251
13251
|
}
|
|
13252
13252
|
};
|
|
13253
13253
|
Gt.styles = [
|
|
13254
|
-
|
|
13254
|
+
F`
|
|
13255
13255
|
:host {
|
|
13256
13256
|
position: relative;
|
|
13257
13257
|
display: inline-block;
|
|
@@ -13278,14 +13278,14 @@ Ci([
|
|
|
13278
13278
|
_()
|
|
13279
13279
|
], Gt.prototype, "open", 2);
|
|
13280
13280
|
Gt = Ci([
|
|
13281
|
-
|
|
13281
|
+
T("ap-popover")
|
|
13282
13282
|
], Gt);
|
|
13283
13283
|
var Kr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, Fi = (t, e, s, i) => {
|
|
13284
13284
|
for (var a = i > 1 ? void 0 : i ? Qr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
13285
13285
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
13286
13286
|
return i && a && Kr(e, s, a), a;
|
|
13287
13287
|
};
|
|
13288
|
-
let Kt = class extends
|
|
13288
|
+
let Kt = class extends E {
|
|
13289
13289
|
constructor() {
|
|
13290
13290
|
super(...arguments), this.variant = "default";
|
|
13291
13291
|
}
|
|
@@ -13294,7 +13294,7 @@ let Kt = class extends C {
|
|
|
13294
13294
|
}
|
|
13295
13295
|
};
|
|
13296
13296
|
Kt.styles = [
|
|
13297
|
-
|
|
13297
|
+
F`
|
|
13298
13298
|
:host {
|
|
13299
13299
|
display: inline-flex;
|
|
13300
13300
|
}
|
|
@@ -13316,17 +13316,17 @@ Kt.styles = [
|
|
|
13316
13316
|
`
|
|
13317
13317
|
];
|
|
13318
13318
|
Fi([
|
|
13319
|
-
|
|
13319
|
+
d({ reflect: !0 })
|
|
13320
13320
|
], Kt.prototype, "variant", 2);
|
|
13321
13321
|
Kt = Fi([
|
|
13322
|
-
|
|
13322
|
+
T("ap-badge")
|
|
13323
13323
|
], Kt);
|
|
13324
13324
|
var Yr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, Ai = (t, e, s, i) => {
|
|
13325
13325
|
for (var a = i > 1 ? void 0 : i ? Wr(e, s) : e, o = t.length - 1, r; o >= 0; o--)
|
|
13326
13326
|
(r = t[o]) && (a = (i ? r(e, s, a) : r(a)) || a);
|
|
13327
13327
|
return i && a && Yr(e, s, a), a;
|
|
13328
13328
|
};
|
|
13329
|
-
let Qt = class extends
|
|
13329
|
+
let Qt = class extends E {
|
|
13330
13330
|
constructor() {
|
|
13331
13331
|
super(...arguments), this.text = "";
|
|
13332
13332
|
}
|
|
@@ -13338,7 +13338,7 @@ let Qt = class extends C {
|
|
|
13338
13338
|
}
|
|
13339
13339
|
};
|
|
13340
13340
|
Qt.styles = [
|
|
13341
|
-
|
|
13341
|
+
F`
|
|
13342
13342
|
:host {
|
|
13343
13343
|
position: relative;
|
|
13344
13344
|
display: inline-flex;
|
|
@@ -13364,17 +13364,17 @@ Qt.styles = [
|
|
|
13364
13364
|
`
|
|
13365
13365
|
];
|
|
13366
13366
|
Ai([
|
|
13367
|
-
|
|
13367
|
+
d()
|
|
13368
13368
|
], Qt.prototype, "text", 2);
|
|
13369
13369
|
Qt = Ai([
|
|
13370
|
-
|
|
13370
|
+
T("ap-tooltip")
|
|
13371
13371
|
], Qt);
|
|
13372
13372
|
var Xr = Object.defineProperty, Pt = (t, e, s, i) => {
|
|
13373
13373
|
for (var a = void 0, o = t.length - 1, r; o >= 0; o--)
|
|
13374
13374
|
(r = t[o]) && (a = r(e, s, a) || a);
|
|
13375
13375
|
return a && Xr(e, s, a), a;
|
|
13376
13376
|
};
|
|
13377
|
-
const Ds = class Ds extends
|
|
13377
|
+
const Ds = class Ds extends E {
|
|
13378
13378
|
constructor() {
|
|
13379
13379
|
super(), this._initFailed = !1, this._loadId = 0, this._loadMoreId = 0, this._selectAllId = 0, this._loadDataTimer = null, this._pendingFilter = null, this._pendingMetadataField = null, this._normalizedForcedFilters = {}, this._uploaderEl = null, this._uploaderImportPromise = null, this._dragCounter = 0, this._isDragOver = !1, this._isUploaderOpen = !1, this._folderResolveOpen = !1, this._transformOpen = !1, this._transformAssets = [], this._transformFolders = [], this._transformAfterResolve = !1, this._onDragEnter = (e) => {
|
|
13380
13380
|
var s;
|
|
@@ -13428,8 +13428,8 @@ const Ds = class Ds extends C {
|
|
|
13428
13428
|
}), this.apiClient = new Di(e.auth, e.apiBase);
|
|
13429
13429
|
try {
|
|
13430
13430
|
if (e.auth.mode === "securityTemplate") {
|
|
13431
|
-
const
|
|
13432
|
-
this.apiClient.setSassKey(
|
|
13431
|
+
const $ = await Vi(this.apiClient);
|
|
13432
|
+
this.apiClient.setSassKey($), this.store.setState({ sassKey: $ });
|
|
13433
13433
|
}
|
|
13434
13434
|
const [o, r, l, c, h] = await Promise.allSettled([
|
|
13435
13435
|
_a(this.apiClient),
|
|
@@ -13439,19 +13439,19 @@ const Ds = class Ds extends C {
|
|
|
13439
13439
|
Ui(this.apiClient)
|
|
13440
13440
|
]), u = {};
|
|
13441
13441
|
if (o.status === "fulfilled") {
|
|
13442
|
-
const { fields:
|
|
13443
|
-
u.metadataFields =
|
|
13442
|
+
const { fields: $, regionalVariantGroups: x, regionalFilters: k, brandColor: w } = o.value;
|
|
13443
|
+
u.metadataFields = $, u.regionalVariantGroups = x, u.regionalFilters = k, w && (u.brandColor = w);
|
|
13444
13444
|
}
|
|
13445
13445
|
r.status === "fulfilled" && (u.labels = r.value.labels || []), l.status === "fulfilled" && (u.tags = l.value), h.status === "fulfilled" && (u.collections = h.value.collections || []), c.status === "fulfilled" && (u.fileTypes = c.value);
|
|
13446
|
-
const { pinnedFilters: g, pinnedMetadata:
|
|
13446
|
+
const { pinnedFilters: g, pinnedMetadata: p } = za(e.auth.projectToken ?? null), v = this.store.getState().filters;
|
|
13447
13447
|
u.filters = {
|
|
13448
|
-
...
|
|
13448
|
+
...v,
|
|
13449
13449
|
pinned: g,
|
|
13450
13450
|
visible: [...g],
|
|
13451
13451
|
metadata: {
|
|
13452
|
-
...
|
|
13453
|
-
pinned:
|
|
13454
|
-
visible: [...
|
|
13452
|
+
...v.metadata,
|
|
13453
|
+
pinned: p,
|
|
13454
|
+
visible: [...p]
|
|
13455
13455
|
}
|
|
13456
13456
|
}, this.store.setState(u);
|
|
13457
13457
|
const b = e.brandColor || u.brandColor || this.store.getState().brandColor;
|
|
@@ -13553,16 +13553,16 @@ const Ds = class Ds extends C {
|
|
|
13553
13553
|
return !!((i = (s = e.dataTransfer) == null ? void 0 : s.types) != null && i.includes("Files"));
|
|
13554
13554
|
}
|
|
13555
13555
|
async open() {
|
|
13556
|
-
var h, u, g,
|
|
13556
|
+
var h, u, g, p, v, b, $;
|
|
13557
13557
|
const e = this.store.getState(), s = new Set(Object.keys(this._normalizedForcedFilters)), i = {}, a = bs((h = this.config) == null ? void 0 : h.defaultFilters);
|
|
13558
|
-
for (const [
|
|
13559
|
-
s.has(
|
|
13560
|
-
const o = Object.keys(i), r = ((u = this.config) == null ? void 0 : u.tabs) ?? ["assets", "folders"], l = (g = this.config) != null && g.rememberLastTab ? Ha(this.config.auth.projectToken) : null, c = (l && r.includes(l) ? l : null) ?? ((
|
|
13558
|
+
for (const [x, k] of Object.entries(a))
|
|
13559
|
+
s.has(x) || (i[x] = k);
|
|
13560
|
+
const o = Object.keys(i), r = ((u = this.config) == null ? void 0 : u.tabs) ?? ["assets", "folders"], l = (g = this.config) != null && g.rememberLastTab ? Ha(this.config.auth.projectToken) : null, c = (l && r.includes(l) ? l : null) ?? ((p = this.config) != null && p.defaultTab && r.includes(this.config.defaultTab) ? this.config.defaultTab : null) ?? r[0] ?? "assets";
|
|
13561
13561
|
this.store.setState({
|
|
13562
13562
|
isOpen: !0,
|
|
13563
13563
|
activeTab: c,
|
|
13564
13564
|
searchQuery: "",
|
|
13565
|
-
isAISearchActive: !!((
|
|
13565
|
+
isAISearchActive: !!((v = this.config) != null && v.enableAISearch && ((b = this.config) != null && b.defaultAISearch)),
|
|
13566
13566
|
filters: {
|
|
13567
13567
|
metadata: {
|
|
13568
13568
|
pinned: e.filters.metadata.pinned,
|
|
@@ -13585,7 +13585,7 @@ const Ds = class Ds extends C {
|
|
|
13585
13585
|
isLoadingCollectionFolders: !1,
|
|
13586
13586
|
breadcrumb: this._buildBreadcrumbFromPath(
|
|
13587
13587
|
this._resolveInitialFolderPath(c),
|
|
13588
|
-
((
|
|
13588
|
+
(($ = this.config) == null ? void 0 : $.rootFolderPath) || "/"
|
|
13589
13589
|
),
|
|
13590
13590
|
selectedAssets: /* @__PURE__ */ new Map(),
|
|
13591
13591
|
selectedFolders: /* @__PURE__ */ new Map(),
|
|
@@ -13609,7 +13609,7 @@ const Ds = class Ds extends C {
|
|
|
13609
13609
|
(e = this.renderRoot.querySelector(".main-content")) == null || e.scrollTo({ top: 0 });
|
|
13610
13610
|
}
|
|
13611
13611
|
async _loadData() {
|
|
13612
|
-
var i, a, o, r, l, c, h, u, g,
|
|
13612
|
+
var i, a, o, r, l, c, h, u, g, p, v, b, $, x, k, w, P, C, A, O, M, ye, le, R, se, ie, U, Ne, zs, Rs, js, Ns, Us, Bs, qs, Vs, Hs, Gs, Ks;
|
|
13613
13613
|
if (!this.apiClient) return;
|
|
13614
13614
|
const e = ++this._loadId, s = this.store.getState();
|
|
13615
13615
|
this._scrollToTop(), this.store.setState({ isLoading: !0 });
|
|
@@ -13642,7 +13642,7 @@ const Ds = class Ds extends C {
|
|
|
13642
13642
|
}
|
|
13643
13643
|
}).catch(() => null), [K, ae] = await Promise.all([de, W]);
|
|
13644
13644
|
if (e !== this._loadId) return;
|
|
13645
|
-
const oe = ((o = K.files) == null ? void 0 : o.length) ?? 0, V = oe >= s.limit, re = ((r = ae == null ? void 0 : ae.stats) == null ? void 0 : r.approx_files_count) ?? ((l = ae == null ? void 0 : ae.info) == null ? void 0 : l.total_files_count) ?? ((c = K.info) == null ? void 0 : c.total_files_count) ?? ((u = (h = K.base) == null ? void 0 : h.count) == null ? void 0 : u.files_recursive) ?? ((
|
|
13645
|
+
const oe = ((o = K.files) == null ? void 0 : o.length) ?? 0, V = oe >= s.limit, re = ((r = ae == null ? void 0 : ae.stats) == null ? void 0 : r.approx_files_count) ?? ((l = ae == null ? void 0 : ae.info) == null ? void 0 : l.total_files_count) ?? ((c = K.info) == null ? void 0 : c.total_files_count) ?? ((u = (h = K.base) == null ? void 0 : h.count) == null ? void 0 : u.files_recursive) ?? ((p = (g = K.base) == null ? void 0 : g.count) == null ? void 0 : p.files_direct) ?? oe;
|
|
13646
13646
|
this.store.setState({
|
|
13647
13647
|
assets: K.files || [],
|
|
13648
13648
|
folders: [],
|
|
@@ -13673,7 +13673,7 @@ const Ds = class Ds extends C {
|
|
|
13673
13673
|
...s.isAISearchActive && s.searchQuery && {
|
|
13674
13674
|
with_ai: !0,
|
|
13675
13675
|
ai_query: s.searchQuery,
|
|
13676
|
-
ai_lang: ((
|
|
13676
|
+
ai_lang: ((v = s.config) == null ? void 0 : v.locale) ?? "en"
|
|
13677
13677
|
}
|
|
13678
13678
|
}),
|
|
13679
13679
|
Dt(this.apiClient, {
|
|
@@ -13697,7 +13697,7 @@ const Ds = class Ds extends C {
|
|
|
13697
13697
|
} catch {
|
|
13698
13698
|
}
|
|
13699
13699
|
if (e !== this._loadId) return;
|
|
13700
|
-
const oe = ((
|
|
13700
|
+
const oe = (($ = de.files) == null ? void 0 : $.length) ?? 0, V = oe >= s.limit, re = ((x = W == null ? void 0 : W.stats) == null ? void 0 : x.approx_files_count) ?? ((k = W == null ? void 0 : W.info) == null ? void 0 : k.total_files_count) ?? ((w = de.info) == null ? void 0 : w.total_files_count) ?? ((C = (P = de.base) == null ? void 0 : P.count) == null ? void 0 : C.files_direct) ?? oe;
|
|
13701
13701
|
this.store.setState({
|
|
13702
13702
|
assets: de.files || [],
|
|
13703
13703
|
folders: K,
|
|
@@ -13738,7 +13738,7 @@ const Ds = class Ds extends C {
|
|
|
13738
13738
|
...W && {
|
|
13739
13739
|
with_ai: !0,
|
|
13740
13740
|
ai_query: s.searchQuery,
|
|
13741
|
-
ai_lang: ((
|
|
13741
|
+
ai_lang: ((A = s.config) == null ? void 0 : A.locale) ?? "en"
|
|
13742
13742
|
}
|
|
13743
13743
|
}), ae = Dt(this.apiClient, {
|
|
13744
13744
|
folder: "/",
|
|
@@ -13748,11 +13748,11 @@ const Ds = class Ds extends C {
|
|
|
13748
13748
|
...W && {
|
|
13749
13749
|
with_ai: !0,
|
|
13750
13750
|
ai_query: s.searchQuery,
|
|
13751
|
-
ai_lang: ((
|
|
13751
|
+
ai_lang: ((O = s.config) == null ? void 0 : O.locale) ?? "en"
|
|
13752
13752
|
}
|
|
13753
13753
|
}).catch(() => null), [oe, V] = await Promise.all([K, ae]);
|
|
13754
13754
|
if (e !== this._loadId) return;
|
|
13755
|
-
const re = ((
|
|
13755
|
+
const re = ((M = oe.files) == null ? void 0 : M.length) ?? 0, at = re >= s.limit, ss = ((ye = V == null ? void 0 : V.stats) == null ? void 0 : ye.approx_files_count) ?? ((le = V == null ? void 0 : V.info) == null ? void 0 : le.total_files_count) ?? ((R = oe.info) == null ? void 0 : R.total_files_count) ?? ((ie = (se = oe.base) == null ? void 0 : se.count) == null ? void 0 : ie.files_recursive) ?? ((Ne = (U = oe.base) == null ? void 0 : U.count) == null ? void 0 : Ne.files_direct) ?? re;
|
|
13756
13756
|
this.store.setState({
|
|
13757
13757
|
assets: oe.files || [],
|
|
13758
13758
|
folders: [],
|
|
@@ -13846,12 +13846,12 @@ const Ds = class Ds extends C {
|
|
|
13846
13846
|
const r = this._buildSearchNotation();
|
|
13847
13847
|
let l = r || void 0, c = e.currentFolderPath || "/", h = e.activeTab === "folders" ? 0 : 1;
|
|
13848
13848
|
if (e.activeTab === "labels" && e.activeLabelUuid) {
|
|
13849
|
-
const
|
|
13850
|
-
|
|
13849
|
+
const k = e.labels.find((w) => w.uuid === e.activeLabelUuid);
|
|
13850
|
+
k && (l = `labels:${k.sid.replace("#", "")}${r ? " " + r : ""}`), c = "/", h = 1;
|
|
13851
13851
|
}
|
|
13852
13852
|
let u, g;
|
|
13853
13853
|
e.activeTab === "collections" && e.activeCollectionFolder && (u = e.activeCollectionUuid || void 0, g = e.activeCollectionFolder.filters || void 0, c = "", h = 1);
|
|
13854
|
-
const
|
|
13854
|
+
const p = await Ue(this.apiClient, {
|
|
13855
13855
|
...c ? { folder: c } : {},
|
|
13856
13856
|
offset: i,
|
|
13857
13857
|
limit: e.limit,
|
|
@@ -13869,11 +13869,11 @@ const Ds = class Ds extends C {
|
|
|
13869
13869
|
}
|
|
13870
13870
|
});
|
|
13871
13871
|
if (s !== this._loadMoreId) return;
|
|
13872
|
-
const
|
|
13872
|
+
const v = this.store.getState().assets, b = p.files || [], $ = b.length >= e.limit, x = [...v, ...b];
|
|
13873
13873
|
this.store.setState({
|
|
13874
|
-
assets:
|
|
13874
|
+
assets: x,
|
|
13875
13875
|
offset: i,
|
|
13876
|
-
hasMore:
|
|
13876
|
+
hasMore: $,
|
|
13877
13877
|
isLoading: !1
|
|
13878
13878
|
});
|
|
13879
13879
|
} catch {
|
|
@@ -14046,7 +14046,7 @@ const Ds = class Ds extends C {
|
|
|
14046
14046
|
}
|
|
14047
14047
|
const h = this._findCollectionFolder(i.activeCollectionFolders, s);
|
|
14048
14048
|
if (h) {
|
|
14049
|
-
const u = i.breadcrumb.findIndex((
|
|
14049
|
+
const u = i.breadcrumb.findIndex((p) => p.uuid === s), g = i.breadcrumb.slice(0, u + 1);
|
|
14050
14050
|
this.store.setState({
|
|
14051
14051
|
activeCollectionFolder: h,
|
|
14052
14052
|
breadcrumb: g,
|
|
@@ -14196,18 +14196,18 @@ const Ds = class Ds extends C {
|
|
|
14196
14196
|
try {
|
|
14197
14197
|
const r = await Promise.all(
|
|
14198
14198
|
i.map(
|
|
14199
|
-
(
|
|
14200
|
-
folder:
|
|
14199
|
+
(p) => Ue(this.apiClient, {
|
|
14200
|
+
folder: p.path,
|
|
14201
14201
|
recursive: s === "recursive" ? 1 : 0,
|
|
14202
14202
|
limit: 1e4
|
|
14203
14203
|
})
|
|
14204
14204
|
)
|
|
14205
14205
|
), l = [];
|
|
14206
|
-
for (const
|
|
14207
|
-
l.push(...
|
|
14208
|
-
const c = [...a], h = new Set(c.map((
|
|
14209
|
-
for (const
|
|
14210
|
-
h.has(
|
|
14206
|
+
for (const p of r)
|
|
14207
|
+
l.push(...p.files);
|
|
14208
|
+
const c = [...a], h = new Set(c.map((p) => p.uuid));
|
|
14209
|
+
for (const p of l)
|
|
14210
|
+
h.has(p.uuid) || (c.push(p), h.add(p.uuid));
|
|
14211
14211
|
const u = (o = this.config) == null ? void 0 : o.maxSelections, g = u ? c.slice(0, u) : c;
|
|
14212
14212
|
if (this._folderResolveOpen = !1, this.store.setState({ isResolvingFolders: !1 }), this._transformAfterResolve) {
|
|
14213
14213
|
this._transformAfterResolve = !1, this._transformAssets = g, this._transformFolders = [], this._transformOpen = !0;
|
|
@@ -14227,12 +14227,12 @@ const Ds = class Ds extends C {
|
|
|
14227
14227
|
}
|
|
14228
14228
|
_handleTransformConfirm(e) {
|
|
14229
14229
|
const s = e.detail.params, i = e.detail.isAspectLocked ?? !0, a = this._transformAssets, o = this._transformFolders, r = a.length > 1, l = di(s, { isMultiSelect: r, isAspectLocked: i }), c = a.map((h) => {
|
|
14230
|
-
var
|
|
14230
|
+
var v, b;
|
|
14231
14231
|
if (!rt(h)) return h;
|
|
14232
|
-
const u = (
|
|
14232
|
+
const u = (v = h.url) == null ? void 0 : v.cdn, g = (b = h.url) == null ? void 0 : b.permalink, p = {
|
|
14233
14233
|
cdn: u ? Pe(u, l) : ""
|
|
14234
14234
|
};
|
|
14235
|
-
return g && (
|
|
14235
|
+
return g && (p.permalink_cdn = Pe(g, l)), { ...h, transformation: { params: s, url: p } };
|
|
14236
14236
|
});
|
|
14237
14237
|
this._transformOpen = !1, this._transformAssets = [], this._transformFolders = [], this._emitSelect(c, o.length ? o : void 0);
|
|
14238
14238
|
}
|
|
@@ -14260,36 +14260,36 @@ const Ds = class Ds extends C {
|
|
|
14260
14260
|
this.store.setState({ isSelectingAll: !0 });
|
|
14261
14261
|
try {
|
|
14262
14262
|
const g = this._buildSearchNotation();
|
|
14263
|
-
let
|
|
14264
|
-
const
|
|
14265
|
-
let
|
|
14263
|
+
let p = s.currentFolderPath || "/";
|
|
14264
|
+
const v = s.limit, b = s.assets, $ = s.totalCount;
|
|
14265
|
+
let x = s.activeTab === "folders" ? 0 : 1, k = g || void 0;
|
|
14266
14266
|
if (s.activeTab === "labels" && s.activeLabelUuid) {
|
|
14267
|
-
const
|
|
14268
|
-
|
|
14269
|
-
}
|
|
14270
|
-
let
|
|
14271
|
-
s.activeTab === "collections" && s.activeCollectionFolder && (
|
|
14272
|
-
const
|
|
14273
|
-
for (let
|
|
14274
|
-
|
|
14275
|
-
const
|
|
14276
|
-
for (let
|
|
14267
|
+
const R = s.labels.find((se) => se.uuid === s.activeLabelUuid);
|
|
14268
|
+
R && (k = `labels:${R.sid.replace("#", "")}${g ? " " + g : ""}`), p = "/", x = 1;
|
|
14269
|
+
}
|
|
14270
|
+
let w, P;
|
|
14271
|
+
s.activeTab === "collections" && s.activeCollectionFolder && (w = s.activeCollectionUuid || void 0, P = s.activeCollectionFolder.filters || void 0, p = "", x = 1);
|
|
14272
|
+
const C = [];
|
|
14273
|
+
for (let R = b.length; R < $; R += v)
|
|
14274
|
+
C.push(R);
|
|
14275
|
+
const A = 4, O = [];
|
|
14276
|
+
for (let R = 0; R < C.length; R += A) {
|
|
14277
14277
|
if (l !== this._selectAllId) return;
|
|
14278
|
-
const se =
|
|
14278
|
+
const se = C.slice(R, R + A), ie = await Promise.all(
|
|
14279
14279
|
se.map(
|
|
14280
14280
|
(U) => {
|
|
14281
14281
|
var Ne;
|
|
14282
14282
|
return Ue(this.apiClient, {
|
|
14283
|
-
...
|
|
14283
|
+
...p ? { folder: p } : {},
|
|
14284
14284
|
offset: U,
|
|
14285
|
-
limit:
|
|
14285
|
+
limit: v,
|
|
14286
14286
|
sort_by: s.sortBy,
|
|
14287
14287
|
sort_direction: s.sortDirection,
|
|
14288
14288
|
search: s.searchQuery || void 0,
|
|
14289
|
-
q:
|
|
14290
|
-
recursive:
|
|
14291
|
-
|
|
14292
|
-
...
|
|
14289
|
+
q: k,
|
|
14290
|
+
recursive: x,
|
|
14291
|
+
...w && { collection_uuid: w },
|
|
14292
|
+
...P && { f64: P },
|
|
14293
14293
|
...s.isAISearchActive && s.searchQuery && {
|
|
14294
14294
|
with_ai: !0,
|
|
14295
14295
|
ai_query: s.searchQuery,
|
|
@@ -14301,13 +14301,13 @@ const Ds = class Ds extends C {
|
|
|
14301
14301
|
);
|
|
14302
14302
|
if (l !== this._selectAllId) return;
|
|
14303
14303
|
for (const U of ie)
|
|
14304
|
-
U.files &&
|
|
14304
|
+
U.files && O.push(...U.files);
|
|
14305
14305
|
}
|
|
14306
14306
|
if (l !== this._selectAllId) return;
|
|
14307
|
-
const
|
|
14307
|
+
const M = new Set(b.map((R) => R.uuid)), ye = O.filter((R) => M.has(R.uuid) ? !1 : (M.add(R.uuid), !0)), le = [...b, ...ye];
|
|
14308
14308
|
this.store.setState({
|
|
14309
14309
|
assets: le,
|
|
14310
|
-
offset: Math.max(0, le.length -
|
|
14310
|
+
offset: Math.max(0, le.length - v),
|
|
14311
14311
|
hasMore: !1,
|
|
14312
14312
|
isSelectingAll: !1
|
|
14313
14313
|
}), o && this.selectionCtrl.selectAllFolders(s.folders), this.selectionCtrl.selectAll(le);
|
|
@@ -14393,21 +14393,21 @@ const Ds = class Ds extends C {
|
|
|
14393
14393
|
s && (s.activeFilter = e.detail.key, s.activeMetadataField = e.detail.metadataFieldKey || null), !e.detail.key && !e.detail.metadataFieldKey && (this._pendingFilter || this._pendingMetadataField) && (this._pendingFilter = null, this._pendingMetadataField = null, s && (s.pendingFilter = null, s.pendingMetadataField = null));
|
|
14394
14394
|
}
|
|
14395
14395
|
async _handleFilterPending(e) {
|
|
14396
|
-
var
|
|
14396
|
+
var p, v, b;
|
|
14397
14397
|
const { key: s, metadataFieldKey: i } = e.detail, a = this.renderRoot.querySelector("ap-filters-bar"), o = this.renderRoot.querySelector("ap-content-toolbar");
|
|
14398
14398
|
if (!a || !o) return;
|
|
14399
14399
|
i ? (this._pendingMetadataField = i, a.pendingMetadataField = i) : s && (this._pendingFilter = s, a.pendingFilter = s), await a.updateComplete;
|
|
14400
14400
|
let r = a.renderRoot.querySelector(".chip.pending");
|
|
14401
14401
|
if (!r) {
|
|
14402
|
-
const
|
|
14403
|
-
for (const
|
|
14404
|
-
const
|
|
14405
|
-
if (i &&
|
|
14406
|
-
r =
|
|
14402
|
+
const $ = a.renderRoot.querySelectorAll(".chip.pinned-empty"), x = i ? (p = a._getMetadataLabel) == null ? void 0 : p.call(a, i) : void 0;
|
|
14403
|
+
for (const k of $) {
|
|
14404
|
+
const w = (b = (v = k.querySelector(".chip-label")) == null ? void 0 : v.textContent) == null ? void 0 : b.trim();
|
|
14405
|
+
if (i && w === x) {
|
|
14406
|
+
r = k;
|
|
14407
14407
|
break;
|
|
14408
14408
|
}
|
|
14409
|
-
if (s &&
|
|
14410
|
-
r =
|
|
14409
|
+
if (s && w === (nt[s] || s)) {
|
|
14410
|
+
r = k;
|
|
14411
14411
|
break;
|
|
14412
14412
|
}
|
|
14413
14413
|
}
|
|
@@ -14519,17 +14519,17 @@ const Ds = class Ds extends C {
|
|
|
14519
14519
|
return wa(s, e.filters.metadata.applied).join(" ");
|
|
14520
14520
|
}
|
|
14521
14521
|
render() {
|
|
14522
|
-
var
|
|
14523
|
-
const e = this.storeCtrl.state, s = Array.from(e.selectedAssets.keys()), i = Array.from(e.selectedFolders.keys()), a = this.selectionCtrl.getSelectedAssets(), o = this.selectionCtrl.getSelectedFolders(), r = ((
|
|
14522
|
+
var p, v, b, $, x, k, w, P, C, A, O, M, ye, le, R, se, ie, U;
|
|
14523
|
+
const e = this.storeCtrl.state, s = Array.from(e.selectedAssets.keys()), i = Array.from(e.selectedFolders.keys()), a = this.selectionCtrl.getSelectedAssets(), o = this.selectionCtrl.getSelectedFolders(), r = ((p = this.config) == null ? void 0 : p.folderSelection) !== !1, l = n`
|
|
14524
14524
|
<ap-header
|
|
14525
14525
|
.activeTab=${e.activeTab}
|
|
14526
|
-
.tabs=${((
|
|
14526
|
+
.tabs=${((v = this.config) == null ? void 0 : v.tabs) ?? ["assets", "folders"]}
|
|
14527
14527
|
.isInsideLabel=${e.activeTab === "labels" && !!e.activeLabelUuid}
|
|
14528
14528
|
.isInsideCollection=${e.activeTab === "collections" && !!e.activeCollectionUuid}
|
|
14529
14529
|
.isInsideCollectionLeaf=${e.activeTab === "collections" && !!e.activeCollectionFolder && !((b = e.activeCollectionFolder.children) != null && b.length)}
|
|
14530
14530
|
.viewMode=${e.viewMode}
|
|
14531
14531
|
.searchQuery=${e.searchQuery}
|
|
14532
|
-
.enableAISearch=${!!((
|
|
14532
|
+
.enableAISearch=${!!(($ = this.config) != null && $.enableAISearch)}
|
|
14533
14533
|
.isAISearchActive=${e.isAISearchActive}
|
|
14534
14534
|
.regionalGroups=${e.regionalVariantGroups}
|
|
14535
14535
|
.regionalFilters=${e.regionalFilters}
|
|
@@ -14541,7 +14541,7 @@ const Ds = class Ds extends C {
|
|
|
14541
14541
|
@regional-change=${this._handleRegionalChange}
|
|
14542
14542
|
@ap-close=${() => this._handleCancel("close-button")}
|
|
14543
14543
|
></ap-header>
|
|
14544
|
-
`, c = !!((
|
|
14544
|
+
`, c = !!((x = this.config) != null && x.uploader), h = n`
|
|
14545
14545
|
<div class="content-area"
|
|
14546
14546
|
@dragenter=${this._onDragEnter}
|
|
14547
14547
|
@dragover=${this._onDragOver}
|
|
@@ -14555,16 +14555,16 @@ const Ds = class Ds extends C {
|
|
|
14555
14555
|
Drop files to upload
|
|
14556
14556
|
</div>
|
|
14557
14557
|
</div>
|
|
14558
|
-
` :
|
|
14558
|
+
` : f}
|
|
14559
14559
|
<div class="main-content">
|
|
14560
|
-
<div class="toolbar-filters-wrapper${(
|
|
14560
|
+
<div class="toolbar-filters-wrapper${(k = this.config) != null && k.stickyFilters ? " sticky" : ""}">
|
|
14561
14561
|
<ap-content-toolbar
|
|
14562
14562
|
.isLoading=${e.isLoading}
|
|
14563
14563
|
.totalCount=${e.totalCount}
|
|
14564
14564
|
.totalFolderCount=${e.totalFolderCount}
|
|
14565
14565
|
.showUpload=${c}
|
|
14566
|
-
.showFilters=${!(e.activeTab === "labels" && !e.activeLabelUuid) && !(e.activeTab === "collections" && !(e.activeCollectionFolder && !((
|
|
14567
|
-
.countLabel=${e.activeTab === "labels" && !e.activeLabelUuid ? `${e.labels.length} label${e.labels.length !== 1 ? "s" : ""}` : e.activeTab === "collections" && !e.activeCollectionUuid ? `${e.collections.length} collection${e.collections.length !== 1 ? "s" : ""}` : e.activeTab === "collections" && e.activeCollectionUuid && !(e.activeCollectionFolder && !((
|
|
14566
|
+
.showFilters=${!(e.activeTab === "labels" && !e.activeLabelUuid) && !(e.activeTab === "collections" && !(e.activeCollectionFolder && !((w = e.activeCollectionFolder.children) != null && w.length)))}
|
|
14567
|
+
.countLabel=${e.activeTab === "labels" && !e.activeLabelUuid ? `${e.labels.length} label${e.labels.length !== 1 ? "s" : ""}` : e.activeTab === "collections" && !e.activeCollectionUuid ? `${e.collections.length} collection${e.collections.length !== 1 ? "s" : ""}` : e.activeTab === "collections" && e.activeCollectionUuid && !(e.activeCollectionFolder && !((P = e.activeCollectionFolder.children) != null && P.length)) ? `${this._getVisibleCollectionFolders().length} folder${this._getVisibleCollectionFolders().length !== 1 ? "s" : ""}` : ""}
|
|
14568
14568
|
.sortBy=${e.sortBy}
|
|
14569
14569
|
.sortDirection=${e.sortDirection}
|
|
14570
14570
|
.sortOptions=${this._getSortOptions()}
|
|
@@ -14588,7 +14588,7 @@ const Ds = class Ds extends C {
|
|
|
14588
14588
|
@upload-click=${this._handleUploadClick}
|
|
14589
14589
|
></ap-content-toolbar>
|
|
14590
14590
|
|
|
14591
|
-
${e.activeTab === "labels" && !e.activeLabelUuid || e.activeTab === "collections" && !(e.activeCollectionFolder && !((
|
|
14591
|
+
${e.activeTab === "labels" && !e.activeLabelUuid || e.activeTab === "collections" && !(e.activeCollectionFolder && !((C = e.activeCollectionFolder.children) != null && C.length)) ? f : n`
|
|
14592
14592
|
<ap-filters-bar
|
|
14593
14593
|
.appliedFilters=${e.filters.applied}
|
|
14594
14594
|
.appliedMetadata=${e.filters.metadata.applied}
|
|
@@ -14597,7 +14597,7 @@ const Ds = class Ds extends C {
|
|
|
14597
14597
|
.labels=${e.labels}
|
|
14598
14598
|
.pinnedFilters=${e.filters.pinned}
|
|
14599
14599
|
.pinnedMetadataFields=${e.filters.metadata.pinned}
|
|
14600
|
-
.forcedFilters=${((
|
|
14600
|
+
.forcedFilters=${((A = this.config) == null ? void 0 : A.forcedFilters) ?? {}}
|
|
14601
14601
|
@filter-remove=${this._handleFilterRemove}
|
|
14602
14602
|
@filter-deactivate=${this._handleFilterDeactivate}
|
|
14603
14603
|
@filter-open=${this._handleFilterOpen}
|
|
@@ -14614,10 +14614,10 @@ const Ds = class Ds extends C {
|
|
|
14614
14614
|
.items=${e.breadcrumb}
|
|
14615
14615
|
.rootLabel=${e.activeTab === "labels" ? "Labels" : e.activeTab === "collections" ? "Collections" : "Root"}
|
|
14616
14616
|
@breadcrumb-navigate=${this._handleBreadcrumbNavigate}
|
|
14617
|
-
></ap-breadcrumb>` :
|
|
14617
|
+
></ap-breadcrumb>` : f}
|
|
14618
14618
|
</div>
|
|
14619
14619
|
|
|
14620
|
-
${e.isLoading && e.assets.length === 0 && e.folders.length === 0 && !(e.activeTab === "labels" && !e.activeLabelUuid) && !(e.activeTab === "collections" && !(e.activeCollectionFolder && !((
|
|
14620
|
+
${e.isLoading && e.assets.length === 0 && e.folders.length === 0 && !(e.activeTab === "labels" && !e.activeLabelUuid) && !(e.activeTab === "collections" && !(e.activeCollectionFolder && !((O = e.activeCollectionFolder.children) != null && O.length))) ? n`<ap-skeleton .variant=${e.viewMode} .gridSize=${((M = this.config) == null ? void 0 : M.gridSize) ?? "normal"} .multiSelect=${((ye = this.config) == null ? void 0 : ye.multiSelect) !== !1} .folderCount=${2}></ap-skeleton>` : this._renderContent(e, s, i, r)}
|
|
14621
14621
|
|
|
14622
14622
|
<ap-marquee-overlay .active=${this.marqueeCtrl.isActive} .rect=${this.marqueeCtrl.rect}></ap-marquee-overlay>
|
|
14623
14623
|
${this._folderResolveOpen ? n`
|
|
@@ -14627,7 +14627,7 @@ const Ds = class Ds extends C {
|
|
|
14627
14627
|
@folder-resolve-confirm=${this._handleFolderResolveConfirm}
|
|
14628
14628
|
@folder-resolve-cancel=${this._handleFolderResolveCancel}
|
|
14629
14629
|
></ap-folder-resolve-dialog>
|
|
14630
|
-
` :
|
|
14630
|
+
` : f}
|
|
14631
14631
|
${this._transformOpen ? n`
|
|
14632
14632
|
<ap-transformation-dialog
|
|
14633
14633
|
.assets=${this._transformAssets}
|
|
@@ -14636,7 +14636,7 @@ const Ds = class Ds extends C {
|
|
|
14636
14636
|
@transform-skip=${this._handleTransformSkip}
|
|
14637
14637
|
@transform-cancel=${this._handleTransformCancel}
|
|
14638
14638
|
></ap-transformation-dialog>
|
|
14639
|
-
` :
|
|
14639
|
+
` : f}
|
|
14640
14640
|
</div>
|
|
14641
14641
|
|
|
14642
14642
|
${e.isPreviewOpen && e.previewAsset ? n`<ap-preview-panel
|
|
@@ -14648,13 +14648,13 @@ const Ds = class Ds extends C {
|
|
|
14648
14648
|
.metadataFields=${e.metadataFields}
|
|
14649
14649
|
.labels=${e.labels}
|
|
14650
14650
|
.regionalFilters=${e.regionalFilters}
|
|
14651
|
-
.multiSelect=${((
|
|
14651
|
+
.multiSelect=${((R = this.config) == null ? void 0 : R.multiSelect) ?? !0}
|
|
14652
14652
|
@preview-close=${this._handlePreviewClose}
|
|
14653
14653
|
@preview-navigate=${this._handlePreviewNavigate}
|
|
14654
14654
|
@asset-select=${this._handleAssetSelect}
|
|
14655
14655
|
@asset-quick-select=${this._handleQuickSelect}
|
|
14656
14656
|
@filter-update=${this._handleFilterUpdate}
|
|
14657
|
-
></ap-preview-panel>` :
|
|
14657
|
+
></ap-preview-panel>` : f}
|
|
14658
14658
|
</div>
|
|
14659
14659
|
`, u = n`
|
|
14660
14660
|
<ap-selection-bar
|
|
@@ -14676,7 +14676,7 @@ const Ds = class Ds extends C {
|
|
|
14676
14676
|
<div class="uploader-overlay">
|
|
14677
14677
|
<div class="uploader-body">${this._uploaderEl}</div>
|
|
14678
14678
|
</div>
|
|
14679
|
-
` :
|
|
14679
|
+
` : f;
|
|
14680
14680
|
return this._isInline ? e.isOpen ? n`
|
|
14681
14681
|
<div class="ap-inline">
|
|
14682
14682
|
${this._isUploaderOpen ? g : n`
|
|
@@ -14685,7 +14685,7 @@ const Ds = class Ds extends C {
|
|
|
14685
14685
|
<div class="inline-footer">${u}</div>
|
|
14686
14686
|
`}
|
|
14687
14687
|
</div>
|
|
14688
|
-
` :
|
|
14688
|
+
` : f : n`
|
|
14689
14689
|
<ap-modal
|
|
14690
14690
|
?open=${e.isOpen}
|
|
14691
14691
|
@ap-cancel=${(Ne) => this._handleCancel(Ne.detail.reason)}
|
|
@@ -14699,7 +14699,7 @@ const Ds = class Ds extends C {
|
|
|
14699
14699
|
`;
|
|
14700
14700
|
}
|
|
14701
14701
|
_renderContent(e, s, i = [], a = !1) {
|
|
14702
|
-
var o, r, l, c, h, u, g,
|
|
14702
|
+
var o, r, l, c, h, u, g, p, v, b, $, x, k;
|
|
14703
14703
|
if (e.activeTab === "assets")
|
|
14704
14704
|
return !e.isLoading && e.assets.length === 0 ? n`
|
|
14705
14705
|
<div class="empty-state">
|
|
@@ -14792,13 +14792,13 @@ const Ds = class Ds extends C {
|
|
|
14792
14792
|
`;
|
|
14793
14793
|
if (e.activeTab === "labels") {
|
|
14794
14794
|
if (!e.activeLabelUuid) {
|
|
14795
|
-
let
|
|
14795
|
+
let w = e.labels;
|
|
14796
14796
|
if (e.searchQuery) {
|
|
14797
|
-
const
|
|
14798
|
-
|
|
14797
|
+
const C = e.searchQuery.toLowerCase();
|
|
14798
|
+
w = e.labels.filter((A) => A.name.toLowerCase().includes(C));
|
|
14799
14799
|
}
|
|
14800
|
-
const
|
|
14801
|
-
return
|
|
14800
|
+
const P = e.sortDirection === "asc" ? 1 : -1;
|
|
14801
|
+
return w = [...w].sort((C, A) => P * C.name.localeCompare(A.name)), w.length === 0 ? n`
|
|
14802
14802
|
<div class="empty-state">
|
|
14803
14803
|
<ap-icon name="tag" .size=${48}></ap-icon>
|
|
14804
14804
|
<div class="empty-title">${e.searchQuery ? "No labels match your search" : "No labels found"}</div>
|
|
@@ -14806,14 +14806,14 @@ const Ds = class Ds extends C {
|
|
|
14806
14806
|
</div>
|
|
14807
14807
|
` : e.viewMode === "grid" ? n`
|
|
14808
14808
|
<div class="labels-grid">
|
|
14809
|
-
${
|
|
14810
|
-
<ap-label-card .label=${
|
|
14809
|
+
${w.map((C, A) => n`
|
|
14810
|
+
<ap-label-card .label=${C} .index=${A} @label-open=${this._handleLabelOpen}></ap-label-card>
|
|
14811
14811
|
`)}
|
|
14812
14812
|
</div>
|
|
14813
14813
|
` : n`
|
|
14814
14814
|
<div class="labels-list">
|
|
14815
|
-
${
|
|
14816
|
-
<ap-label-row .label=${
|
|
14815
|
+
${w.map((C, A) => n`
|
|
14816
|
+
<ap-label-row .label=${C} .index=${A} @label-open=${this._handleLabelOpen}></ap-label-row>
|
|
14817
14817
|
`)}
|
|
14818
14818
|
</div>
|
|
14819
14819
|
`;
|
|
@@ -14833,7 +14833,7 @@ const Ds = class Ds extends C {
|
|
|
14833
14833
|
.isLoading=${e.isLoading}
|
|
14834
14834
|
.multiSelect=${((g = this.config) == null ? void 0 : g.multiSelect) ?? !0}
|
|
14835
14835
|
.folderSelectable=${!1}
|
|
14836
|
-
.gridSize=${((
|
|
14836
|
+
.gridSize=${((p = this.config) == null ? void 0 : p.gridSize) ?? "normal"}
|
|
14837
14837
|
@asset-select=${this._handleAssetSelect}
|
|
14838
14838
|
@asset-preview=${this._handleAssetPreview}
|
|
14839
14839
|
@asset-quick-select=${this._handleQuickSelect}
|
|
@@ -14846,7 +14846,7 @@ const Ds = class Ds extends C {
|
|
|
14846
14846
|
.selectedIds=${s}
|
|
14847
14847
|
.selectedFolderIds=${i}
|
|
14848
14848
|
.isLoading=${e.isLoading}
|
|
14849
|
-
.multiSelect=${((
|
|
14849
|
+
.multiSelect=${((v = this.config) == null ? void 0 : v.multiSelect) ?? !0}
|
|
14850
14850
|
.folderSelectable=${!1}
|
|
14851
14851
|
.totalCount=${e.totalCount}
|
|
14852
14852
|
.isSelectingAll=${e.isSelectingAll}
|
|
@@ -14861,13 +14861,13 @@ const Ds = class Ds extends C {
|
|
|
14861
14861
|
}
|
|
14862
14862
|
if (e.activeTab === "collections") {
|
|
14863
14863
|
if (!e.activeCollectionUuid) {
|
|
14864
|
-
let
|
|
14864
|
+
let C = e.collections;
|
|
14865
14865
|
if (e.searchQuery) {
|
|
14866
|
-
const
|
|
14867
|
-
|
|
14866
|
+
const O = e.searchQuery.toLowerCase();
|
|
14867
|
+
C = e.collections.filter((M) => M.title.toLowerCase().includes(O));
|
|
14868
14868
|
}
|
|
14869
|
-
const
|
|
14870
|
-
return e.sortBy === "created_at" ?
|
|
14869
|
+
const A = e.sortDirection === "asc" ? 1 : -1;
|
|
14870
|
+
return e.sortBy === "created_at" ? C = [...C].sort((O, M) => A * (new Date(O.created_at).getTime() - new Date(M.created_at).getTime())) : e.sortBy === "updated_at" ? C = [...C].sort((O, M) => A * (new Date(O.updated_at).getTime() - new Date(M.updated_at).getTime())) : C = [...C].sort((O, M) => A * O.title.localeCompare(M.title)), C.length === 0 ? n`
|
|
14871
14871
|
<div class="empty-state">
|
|
14872
14872
|
<ap-icon name="layout-grid" .size=${48}></ap-icon>
|
|
14873
14873
|
<div class="empty-title">${e.searchQuery ? "No collections match your search" : "No collections found"}</div>
|
|
@@ -14875,29 +14875,29 @@ const Ds = class Ds extends C {
|
|
|
14875
14875
|
</div>
|
|
14876
14876
|
` : e.viewMode === "grid" ? n`
|
|
14877
14877
|
<div class="collections-grid">
|
|
14878
|
-
${
|
|
14879
|
-
<ap-collection-card .collection=${
|
|
14878
|
+
${C.map((O, M) => n`
|
|
14879
|
+
<ap-collection-card .collection=${O} .index=${M} @collection-open=${this._handleCollectionOpen}></ap-collection-card>
|
|
14880
14880
|
`)}
|
|
14881
14881
|
</div>
|
|
14882
14882
|
` : n`
|
|
14883
14883
|
<div class="collections-list">
|
|
14884
|
-
${
|
|
14885
|
-
<ap-collection-row .collection=${
|
|
14884
|
+
${C.map((O, M) => n`
|
|
14885
|
+
<ap-collection-row .collection=${O} .index=${M} @collection-open=${this._handleCollectionOpen}></ap-collection-row>
|
|
14886
14886
|
`)}
|
|
14887
14887
|
</div>
|
|
14888
14888
|
`;
|
|
14889
14889
|
}
|
|
14890
14890
|
if (e.isLoadingCollectionFolders)
|
|
14891
14891
|
return n`<div class="loading-center"><ap-spinner></ap-spinner></div>`;
|
|
14892
|
-
const
|
|
14892
|
+
const w = this._getVisibleCollectionFolders();
|
|
14893
14893
|
if (!e.activeCollectionFolder || (((b = e.activeCollectionFolder.children) == null ? void 0 : b.length) ?? 0) > 0) {
|
|
14894
|
-
let
|
|
14894
|
+
let C = w;
|
|
14895
14895
|
if (e.searchQuery) {
|
|
14896
|
-
const
|
|
14897
|
-
|
|
14896
|
+
const O = e.searchQuery.toLowerCase();
|
|
14897
|
+
C = w.filter((M) => M.name.toLowerCase().includes(O));
|
|
14898
14898
|
}
|
|
14899
|
-
const
|
|
14900
|
-
return
|
|
14899
|
+
const A = e.sortDirection === "asc" ? 1 : -1;
|
|
14900
|
+
return C = [...C].sort((O, M) => A * O.name.localeCompare(M.name)), C.length === 0 ? n`
|
|
14901
14901
|
<div class="empty-state">
|
|
14902
14902
|
<ap-icon name="folder" .size=${48}></ap-icon>
|
|
14903
14903
|
<div class="empty-title">${e.searchQuery ? "No folders match your search" : "No folders in this collection"}</div>
|
|
@@ -14905,14 +14905,14 @@ const Ds = class Ds extends C {
|
|
|
14905
14905
|
</div>
|
|
14906
14906
|
` : e.viewMode === "grid" ? n`
|
|
14907
14907
|
<div class="collection-folders-grid">
|
|
14908
|
-
${
|
|
14909
|
-
<ap-collection-folder-card .folder=${
|
|
14908
|
+
${C.map((O, M) => n`
|
|
14909
|
+
<ap-collection-folder-card .folder=${O} .index=${M} @collection-folder-open=${this._handleCollectionFolderOpen}></ap-collection-folder-card>
|
|
14910
14910
|
`)}
|
|
14911
14911
|
</div>
|
|
14912
14912
|
` : n`
|
|
14913
14913
|
<div class="collection-folders-list">
|
|
14914
|
-
${
|
|
14915
|
-
<ap-collection-folder-row .folder=${
|
|
14914
|
+
${C.map((O, M) => n`
|
|
14915
|
+
<ap-collection-folder-row .folder=${O} .index=${M} @collection-folder-open=${this._handleCollectionFolderOpen}></ap-collection-folder-row>
|
|
14916
14916
|
`)}
|
|
14917
14917
|
</div>
|
|
14918
14918
|
`;
|
|
@@ -14930,9 +14930,9 @@ const Ds = class Ds extends C {
|
|
|
14930
14930
|
.selectedIds=${s}
|
|
14931
14931
|
.selectedFolderIds=${i}
|
|
14932
14932
|
.isLoading=${e.isLoading}
|
|
14933
|
-
.multiSelect=${((
|
|
14933
|
+
.multiSelect=${(($ = this.config) == null ? void 0 : $.multiSelect) ?? !0}
|
|
14934
14934
|
.folderSelectable=${!1}
|
|
14935
|
-
.gridSize=${((
|
|
14935
|
+
.gridSize=${((x = this.config) == null ? void 0 : x.gridSize) ?? "normal"}
|
|
14936
14936
|
@asset-select=${this._handleAssetSelect}
|
|
14937
14937
|
@asset-preview=${this._handleAssetPreview}
|
|
14938
14938
|
@asset-quick-select=${this._handleQuickSelect}
|
|
@@ -14945,7 +14945,7 @@ const Ds = class Ds extends C {
|
|
|
14945
14945
|
.selectedIds=${s}
|
|
14946
14946
|
.selectedFolderIds=${i}
|
|
14947
14947
|
.isLoading=${e.isLoading}
|
|
14948
|
-
.multiSelect=${((
|
|
14948
|
+
.multiSelect=${((k = this.config) == null ? void 0 : k.multiSelect) ?? !0}
|
|
14949
14949
|
.folderSelectable=${!1}
|
|
14950
14950
|
.totalCount=${e.totalCount}
|
|
14951
14951
|
.isSelectingAll=${e.isSelectingAll}
|
|
@@ -14958,11 +14958,11 @@ const Ds = class Ds extends C {
|
|
|
14958
14958
|
<div id="sentinel"></div>
|
|
14959
14959
|
`;
|
|
14960
14960
|
}
|
|
14961
|
-
return
|
|
14961
|
+
return f;
|
|
14962
14962
|
}
|
|
14963
14963
|
};
|
|
14964
14964
|
Ds.styles = [
|
|
14965
|
-
|
|
14965
|
+
F`
|
|
14966
14966
|
:host {
|
|
14967
14967
|
display: contents;
|
|
14968
14968
|
font-family: var(--ap-font-family, system-ui, -apple-system, sans-serif);
|
|
@@ -15152,7 +15152,7 @@ Pt([
|
|
|
15152
15152
|
_()
|
|
15153
15153
|
], Xe.prototype, "_transformOpen");
|
|
15154
15154
|
Pt([
|
|
15155
|
-
|
|
15155
|
+
d({ type: Object })
|
|
15156
15156
|
], Xe.prototype, "config");
|
|
15157
15157
|
export {
|
|
15158
15158
|
Xe as A,
|