@mozaic-ds/angular 2.0.48 → 2.0.50
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.
|
@@ -5973,17 +5973,28 @@ function formatField(field) {
|
|
|
5973
5973
|
/**
|
|
5974
5974
|
* Render a structured ref as A1 notation using the column order from the
|
|
5975
5975
|
* current grid context. Returns `#REF!` when the field is not visible.
|
|
5976
|
+
* Same-row refs render as `[field]` surface shorthand.
|
|
5976
5977
|
*/
|
|
5977
5978
|
function cellRefToA1(ref, fieldOrder) {
|
|
5978
5979
|
const idx = fieldOrder.indexOf(ref.field);
|
|
5979
5980
|
if (idx < 0)
|
|
5980
5981
|
return '#REF!';
|
|
5982
|
+
if (ref.sameRow)
|
|
5983
|
+
return `[${ref.field}]`;
|
|
5981
5984
|
const col = columnIndexToLetters(idx);
|
|
5982
5985
|
return `${ref.absField ? '$' : ''}${col}${ref.absRow ? '$' : ''}${ref.row}`;
|
|
5983
5986
|
}
|
|
5984
|
-
/**
|
|
5987
|
+
/**
|
|
5988
|
+
* Render a structured ref as the long-form storage string. Same-row refs
|
|
5989
|
+
* omit the ROW argument entirely (`REF(COLUMN("field"))`), which is the
|
|
5990
|
+
* signal consumed by the parser and the ref-mapper to resolve against the
|
|
5991
|
+
* host cell's row at evaluation time.
|
|
5992
|
+
*/
|
|
5985
5993
|
function cellRefToLongForm(ref) {
|
|
5986
|
-
|
|
5994
|
+
const field = ref.field.replace(/"/g, '""');
|
|
5995
|
+
if (ref.sameRow)
|
|
5996
|
+
return `REF(COLUMN("${field}"))`;
|
|
5997
|
+
return `REF(COLUMN("${field}"),ROW(${ref.row}))`;
|
|
5987
5998
|
}
|
|
5988
5999
|
|
|
5989
6000
|
/**
|
|
@@ -7732,6 +7743,9 @@ const DEFAULT_FORMULA_FUNCTIONS = Object.freeze({
|
|
|
7732
7743
|
* REF(COLUMN("price"),ROW(8),"$C") — absolute col, relative row ($A1)
|
|
7733
7744
|
* REF(COLUMN("price"),ROW(8),"$R") — relative col, absolute row (A$1)
|
|
7734
7745
|
* REF(COLUMN("price"),ROW(8),"$CR") — absolute both ($A$1)
|
|
7746
|
+
* REF(COLUMN("price")) — same-row ref ([price] surface), no
|
|
7747
|
+
* ROW arg. Row resolves to the host
|
|
7748
|
+
* cell's row at evaluation time.
|
|
7735
7749
|
*
|
|
7736
7750
|
* Ranges use the same shape for each endpoint, joined with `:`.
|
|
7737
7751
|
*
|
|
@@ -8040,8 +8054,10 @@ class RecursiveDescent {
|
|
|
8040
8054
|
return { kind: 'call', name: upper, args };
|
|
8041
8055
|
}
|
|
8042
8056
|
/**
|
|
8043
|
-
* Parse `REF(COLUMN("field"),ROW(N) [,"$C"|"$R"|"$CR"])` starting from
|
|
8044
|
-
* just after the `REF` ident. Returns the `StructuredRef`.
|
|
8057
|
+
* Parse `REF(COLUMN("field")[,ROW(N) [,"$C"|"$R"|"$CR"]])` starting from
|
|
8058
|
+
* just after the `REF` ident. Returns the `StructuredRef`. A missing
|
|
8059
|
+
* `ROW(...)` arg marks the ref as same-row (resolves against the host
|
|
8060
|
+
* cell's row at evaluation time).
|
|
8045
8061
|
*/
|
|
8046
8062
|
parseRefPrimitive(position) {
|
|
8047
8063
|
this.expect('lparen');
|
|
@@ -8052,6 +8068,18 @@ class RecursiveDescent {
|
|
|
8052
8068
|
this.expect('lparen');
|
|
8053
8069
|
const fieldTok = this.expect('string');
|
|
8054
8070
|
this.expect('rparen');
|
|
8071
|
+
// Same-row form: `REF(COLUMN("field"))` — no ROW arg.
|
|
8072
|
+
if (this.peek().type === 'rparen') {
|
|
8073
|
+
this.cursor++;
|
|
8074
|
+
void position;
|
|
8075
|
+
return {
|
|
8076
|
+
field: fieldTok.value,
|
|
8077
|
+
row: 0,
|
|
8078
|
+
absField: false,
|
|
8079
|
+
absRow: false,
|
|
8080
|
+
sameRow: true,
|
|
8081
|
+
};
|
|
8082
|
+
}
|
|
8055
8083
|
this.expect('comma');
|
|
8056
8084
|
const rowIdent = this.expect('ident');
|
|
8057
8085
|
if (rowIdent.value.toUpperCase() !== 'ROW') {
|
|
@@ -8125,6 +8153,11 @@ class RecursiveDescent {
|
|
|
8125
8153
|
function structuredRefToAddress(ref, ctx) {
|
|
8126
8154
|
if (!ctx.fields.includes(ref.field))
|
|
8127
8155
|
return undefined;
|
|
8156
|
+
if (ref.sameRow) {
|
|
8157
|
+
if (ctx.currentRowId === undefined)
|
|
8158
|
+
return undefined;
|
|
8159
|
+
return { rowId: ctx.currentRowId, field: ref.field };
|
|
8160
|
+
}
|
|
8128
8161
|
const rowId = ctx.rowIds[ref.row - 1];
|
|
8129
8162
|
if (rowId === undefined)
|
|
8130
8163
|
return undefined;
|
|
@@ -8136,10 +8169,28 @@ function structuredRefToAddress(ref, ctx) {
|
|
|
8136
8169
|
* propagate `#REF!` per cell rather than blanket-failing the whole range.
|
|
8137
8170
|
*/
|
|
8138
8171
|
function rangeToAddresses(start, end, ctx) {
|
|
8139
|
-
const rowLo = Math.min(start.row, end.row);
|
|
8140
|
-
const rowHi = Math.max(start.row, end.row);
|
|
8141
8172
|
const startIdx = ctx.fields.indexOf(start.field);
|
|
8142
8173
|
const endIdx = ctx.fields.indexOf(end.field);
|
|
8174
|
+
// Same-row range `[a]:[c]` — one row (host), columns from a to c. Mixed
|
|
8175
|
+
// same-row + explicit-row is nonsensical (the "a" endpoint has no row
|
|
8176
|
+
// and "c" has a specific one) so we fail the whole range.
|
|
8177
|
+
if (start.sameRow && end.sameRow) {
|
|
8178
|
+
const rowId = ctx.currentRowId;
|
|
8179
|
+
if (startIdx < 0 || endIdx < 0 || rowId === undefined)
|
|
8180
|
+
return [undefined];
|
|
8181
|
+
const colLo = Math.min(startIdx, endIdx);
|
|
8182
|
+
const colHi = Math.max(startIdx, endIdx);
|
|
8183
|
+
const out = [];
|
|
8184
|
+
for (let c = colLo; c <= colHi; c++) {
|
|
8185
|
+
const field = ctx.fields[c];
|
|
8186
|
+
out.push(field ? { rowId, field } : undefined);
|
|
8187
|
+
}
|
|
8188
|
+
return out;
|
|
8189
|
+
}
|
|
8190
|
+
if (start.sameRow !== end.sameRow)
|
|
8191
|
+
return [undefined];
|
|
8192
|
+
const rowLo = Math.min(start.row, end.row);
|
|
8193
|
+
const rowHi = Math.max(start.row, end.row);
|
|
8143
8194
|
if (startIdx < 0 || endIdx < 0) {
|
|
8144
8195
|
const cells = rowHi - rowLo + 1;
|
|
8145
8196
|
return Array.from({ length: cells }, () => undefined);
|
|
@@ -8208,16 +8259,47 @@ function addressToA1(addr, ctx) {
|
|
|
8208
8259
|
* (`foo1` is not a ref).
|
|
8209
8260
|
*/
|
|
8210
8261
|
const A1_REF_RE = /(\$?)([A-Z]+)(\$?)(\d+)/g;
|
|
8262
|
+
/**
|
|
8263
|
+
* Matches the `[field]` same-row surface shorthand. Field names may contain
|
|
8264
|
+
* any chars except `]`; callers that need `]` in a field must fall back to
|
|
8265
|
+
* the full `REF(COLUMN("…"))` form.
|
|
8266
|
+
*/
|
|
8267
|
+
const SAME_ROW_SURFACE_RE = /\[([^\]]+)\]/g;
|
|
8211
8268
|
/**
|
|
8212
8269
|
* Convert an A1-form source string to REF long-form storage. Refs that
|
|
8213
8270
|
* point to unknown columns are replaced with a literal `#REF!` to match
|
|
8214
8271
|
* Excel's convention for broken refs.
|
|
8215
8272
|
*
|
|
8216
|
-
*
|
|
8273
|
+
* When `ctx.currentRowId` is known, relative refs pointing at the current
|
|
8274
|
+
* row (`=B5` on row 5, neither `$` lock set) collapse to same-row storage
|
|
8275
|
+
* (`REF(COLUMN("field"))` with no ROW arg). This preserves the "one
|
|
8276
|
+
* formula covers every row" property across an edit → commit round-trip
|
|
8277
|
+
* when the user only views / tweaks the formula without changing rows.
|
|
8278
|
+
*
|
|
8279
|
+
* a1ToLongForm('=A1+B2', ctx) // no currentRowId
|
|
8217
8280
|
* → '=REF(COLUMN("price"),ROW(1))+REF(COLUMN("qty"),ROW(2))'
|
|
8281
|
+
* a1ToLongForm('=A1*B1', { ...ctx, currentRowId: 'r_1' })
|
|
8282
|
+
* → '=REF(COLUMN("price"))*REF(COLUMN("qty"))' // collapsed to same-row
|
|
8283
|
+
* a1ToLongForm('=[price]*[qty]', ctx)
|
|
8284
|
+
* → '=REF(COLUMN("price"))*REF(COLUMN("qty"))'
|
|
8218
8285
|
*/
|
|
8219
8286
|
function a1ToLongForm(source, ctx) {
|
|
8220
|
-
|
|
8287
|
+
// Index of the host row in the display order. Used below to detect refs
|
|
8288
|
+
// that point at the current row and can therefore collapse to same-row
|
|
8289
|
+
// storage. `-1` when unknown or unresolved — the collapse is skipped in
|
|
8290
|
+
// that case and refs remain explicit-row.
|
|
8291
|
+
const currentRowIndex = ctx.currentRowId !== undefined ? ctx.rowIds.indexOf(ctx.currentRowId) : -1;
|
|
8292
|
+
// Pass 1: `[field]` → `REF(COLUMN("field"))`. Runs first so the A1 scan in
|
|
8293
|
+
// pass 2 never sees letters+digits *inside* a user-authored `[A1]`.
|
|
8294
|
+
const afterSameRow = replaceOutsideStrings(source, (body) => body.replace(SAME_ROW_SURFACE_RE, (_match, rawField) => {
|
|
8295
|
+
if (!ctx.fields.includes(rawField))
|
|
8296
|
+
return '#REF!';
|
|
8297
|
+
return `REF(COLUMN("${rawField.replace(/"/g, '""')}"))`;
|
|
8298
|
+
}));
|
|
8299
|
+
// Pass 2: A1 refs. A separate `replaceOutsideStrings` run so the freshly
|
|
8300
|
+
// introduced `"…"` quoting from pass 1 is honoured — otherwise the `A1`
|
|
8301
|
+
// in `REF(COLUMN("A1"))` would be rewritten a second time.
|
|
8302
|
+
return replaceOutsideStrings(afterSameRow, (body) => body.replace(A1_REF_RE, (match, absCol, letters, absRow, digits, offset, full) => {
|
|
8221
8303
|
if (isIdentLikeContext(full, offset, match.length))
|
|
8222
8304
|
return match;
|
|
8223
8305
|
// `ATAN2(…)` — letters+digits followed by `(` is a function call.
|
|
@@ -8228,11 +8310,28 @@ function a1ToLongForm(source, ctx) {
|
|
|
8228
8310
|
const row = Number(digits);
|
|
8229
8311
|
if (!field || !Number.isFinite(row) || row < 1)
|
|
8230
8312
|
return '#REF!';
|
|
8313
|
+
const isAbsField = absCol === '$';
|
|
8314
|
+
const isAbsRow = absRow === '$';
|
|
8315
|
+
// Collapse to same-row storage when: we know the host row, the ref
|
|
8316
|
+
// targets exactly that row, and neither axis is locked. Locked refs
|
|
8317
|
+
// (`$…`) convey "always this row / column" and must stay explicit.
|
|
8318
|
+
if (currentRowIndex >= 0 &&
|
|
8319
|
+
row === currentRowIndex + 1 &&
|
|
8320
|
+
!isAbsRow &&
|
|
8321
|
+
!isAbsField) {
|
|
8322
|
+
return formatRefLongFormWithLocks({
|
|
8323
|
+
field,
|
|
8324
|
+
row: 0,
|
|
8325
|
+
absField: false,
|
|
8326
|
+
absRow: false,
|
|
8327
|
+
sameRow: true,
|
|
8328
|
+
});
|
|
8329
|
+
}
|
|
8231
8330
|
const ref = {
|
|
8232
8331
|
field,
|
|
8233
8332
|
row,
|
|
8234
|
-
absField:
|
|
8235
|
-
absRow:
|
|
8333
|
+
absField: isAbsField,
|
|
8334
|
+
absRow: isAbsRow,
|
|
8236
8335
|
};
|
|
8237
8336
|
return formatRefLongFormWithLocks(ref);
|
|
8238
8337
|
}));
|
|
@@ -8241,11 +8340,37 @@ function a1ToLongForm(source, ctx) {
|
|
|
8241
8340
|
* Convert REF long-form storage to A1 surface for display. Tolerant —
|
|
8242
8341
|
* unknown fields and out-of-range rows become `#REF!` in the output.
|
|
8243
8342
|
*
|
|
8343
|
+
* Same-row storage (`REF(COLUMN("field"))`, no ROW) renders as a concrete
|
|
8344
|
+
* A1 ref tied to the **host row** when `ctx.currentRowId` is provided —
|
|
8345
|
+
* this matches spreadsheet intuition (a cell on row 5 shows `=C5*D5`, a
|
|
8346
|
+
* cell on row 6 shows `=C6*D6`). Without a host row (tests, offline tools),
|
|
8347
|
+
* it falls back to the `[field]` bracket shorthand that round-trips losslessly.
|
|
8348
|
+
*
|
|
8244
8349
|
* longFormToA1('=REF(COLUMN("price"),ROW(1))+1', ctx)
|
|
8245
8350
|
* → '=A1+1'
|
|
8351
|
+
* longFormToA1('=REF(COLUMN("price"))*REF(COLUMN("qty"))', ctxRow1)
|
|
8352
|
+
* → '=A1*B1' // with currentRowId → row 1
|
|
8353
|
+
* longFormToA1('=REF(COLUMN("price"))*REF(COLUMN("qty"))', ctx)
|
|
8354
|
+
* → '=[price]*[qty]' // no currentRowId → fallback
|
|
8246
8355
|
*/
|
|
8247
8356
|
function longFormToA1(source, ctx) {
|
|
8248
8357
|
let out = source;
|
|
8358
|
+
// Resolve the host row once — undefined when the caller didn't provide
|
|
8359
|
+
// one or the id is not in the current window. When undefined, same-row
|
|
8360
|
+
// refs render in bracket form so they still round-trip through a1ToLongForm.
|
|
8361
|
+
const hostRow = ctx.currentRowId !== undefined ? ctx.rowIds.indexOf(ctx.currentRowId) + 1 : 0;
|
|
8362
|
+
// Same-row form first: `REF(COLUMN("field"))` → `B5` (host row) or `[field]`
|
|
8363
|
+
// (no host row). Must run before the row-form regex because they share the
|
|
8364
|
+
// `REF(COLUMN("…")` prefix; the row-form regex does not match the no-ROW
|
|
8365
|
+
// shape, so order is about clarity rather than correctness.
|
|
8366
|
+
const SAME_ROW_RE = /REF\(COLUMN\("((?:[^"]|"")*)"\)\)/g;
|
|
8367
|
+
out = out.replace(SAME_ROW_RE, (_match, rawField) => {
|
|
8368
|
+
const field = rawField.replace(/""/g, '"');
|
|
8369
|
+
if (hostRow >= 1) {
|
|
8370
|
+
return cellRefToA1({ field, row: hostRow, absField: false, absRow: false }, ctx.fields);
|
|
8371
|
+
}
|
|
8372
|
+
return cellRefToA1({ field, row: 0, absField: false, absRow: false, sameRow: true }, ctx.fields);
|
|
8373
|
+
});
|
|
8249
8374
|
// Naive scan: find every `REF(COLUMN("…"),ROW(N)[,"…"])` call.
|
|
8250
8375
|
// The ref grammar is simple enough that a regex is sufficient here.
|
|
8251
8376
|
const RE = /REF\(COLUMN\("((?:[^"]|"")*)"\),ROW\((\d+)\)(?:,"(\$C|\$R|\$CR)")?\)/g;
|
|
@@ -8264,6 +8389,10 @@ function longFormToA1(source, ctx) {
|
|
|
8264
8389
|
*/
|
|
8265
8390
|
function formatRefLongFormWithLocks(ref) {
|
|
8266
8391
|
const base = cellRefToLongForm(ref);
|
|
8392
|
+
// Same-row refs use the `REF(COLUMN("…"))` shape — no ROW to lock. Locks
|
|
8393
|
+
// aren't meaningful there, so we leave the base string untouched.
|
|
8394
|
+
if (ref.sameRow)
|
|
8395
|
+
return base;
|
|
8267
8396
|
if (!ref.absField && !ref.absRow)
|
|
8268
8397
|
return base;
|
|
8269
8398
|
const lock = ref.absField && ref.absRow ? '$CR' : ref.absField ? '$C' : '$R';
|
|
@@ -10874,9 +11003,18 @@ class FormulaRefHighlightService {
|
|
|
10874
11003
|
palette = new FormulaRefPalette();
|
|
10875
11004
|
highlightsSignal = signal([], ...(ngDevMode ? [{ debugName: "highlightsSignal" }] : /* istanbul ignore next */ []));
|
|
10876
11005
|
isActiveSignal = signal(false, ...(ngDevMode ? [{ debugName: "isActiveSignal" }] : /* istanbul ignore next */ []));
|
|
11006
|
+
isPickModeSignal = signal(false, ...(ngDevMode ? [{ debugName: "isPickModeSignal" }] : /* istanbul ignore next */ []));
|
|
10877
11007
|
isPickDraggingSignal = signal(false, ...(ngDevMode ? [{ debugName: "isPickDraggingSignal" }] : /* istanbul ignore next */ []));
|
|
10878
11008
|
highlights = this.highlightsSignal.asReadonly();
|
|
11009
|
+
/** `true` while any formula editor is active — used by cells/headers to
|
|
11010
|
+
* render ref-color borders and column-letter badges. Orthogonal to
|
|
11011
|
+
* pick mode: a text-only editor (e.g. the formula bar) still marks itself
|
|
11012
|
+
* active so highlights appear, but never flips pick mode on. */
|
|
10879
11013
|
isActive = this.isActiveSignal.asReadonly();
|
|
11014
|
+
/** `true` when cell clicks should be intercepted to insert refs into the
|
|
11015
|
+
* active editor. The formula bar deliberately disables this to keep its
|
|
11016
|
+
* input purely text-driven. */
|
|
11017
|
+
isPickMode = this.isPickModeSignal.asReadonly();
|
|
10880
11018
|
/** `true` between `pickRangeStart` and `pickRangeCommit` — used by cells
|
|
10881
11019
|
* to know that a mouseenter should extend the range being built. */
|
|
10882
11020
|
isPickDragging = this.isPickDraggingSignal.asReadonly();
|
|
@@ -10893,17 +11031,26 @@ class FormulaRefHighlightService {
|
|
|
10893
11031
|
pickHandler = null;
|
|
10894
11032
|
/**
|
|
10895
11033
|
* Called by the editor on mount. Registers the handler used by cells
|
|
10896
|
-
* to dispatch pick events.
|
|
10897
|
-
*
|
|
11034
|
+
* to dispatch pick events.
|
|
11035
|
+
*
|
|
11036
|
+
* `isActive` flips on unconditionally so cells paint ref-color borders
|
|
11037
|
+
* and headers show column-letter badges — the *visual* feedback is
|
|
11038
|
+
* useful in both inline and formula-bar editors.
|
|
11039
|
+
*
|
|
11040
|
+
* `pickMode` (default `true`) controls whether cell clicks are
|
|
11041
|
+
* intercepted to insert refs. The formula bar passes `false` so typing
|
|
11042
|
+
* stays keyboard-only and normal cell selection keeps working.
|
|
10898
11043
|
*/
|
|
10899
|
-
activate(handler) {
|
|
11044
|
+
activate(handler, options) {
|
|
10900
11045
|
this.pickHandler = handler;
|
|
10901
11046
|
this.isActiveSignal.set(true);
|
|
11047
|
+
this.isPickModeSignal.set(options?.pickMode ?? true);
|
|
10902
11048
|
}
|
|
10903
11049
|
/** Called on editor teardown. Resets state + palette. */
|
|
10904
11050
|
deactivate() {
|
|
10905
11051
|
this.pickHandler = null;
|
|
10906
11052
|
this.isActiveSignal.set(false);
|
|
11053
|
+
this.isPickModeSignal.set(false);
|
|
10907
11054
|
this.isPickDraggingSignal.set(false);
|
|
10908
11055
|
this.highlightsSignal.set([]);
|
|
10909
11056
|
this.palette.clear();
|
|
@@ -12089,6 +12236,30 @@ function tokenizeFormulaEditor(source, options = {}) {
|
|
|
12089
12236
|
out.push({ kind: 'string', text: source.slice(start, i), start, end: i });
|
|
12090
12237
|
continue;
|
|
12091
12238
|
}
|
|
12239
|
+
// Same-row ref surface: `[field]`. Emitted as a ref token so the
|
|
12240
|
+
// coloured overlay picks it up and the click-to-pick machinery can
|
|
12241
|
+
// replace it in place. An unclosed `[…` is still emitted (field is the
|
|
12242
|
+
// tail) so highlights update live while the user types.
|
|
12243
|
+
if (ch === '[') {
|
|
12244
|
+
const start = i;
|
|
12245
|
+
i++;
|
|
12246
|
+
while (i < len && source[i] !== ']')
|
|
12247
|
+
i++;
|
|
12248
|
+
const hasClose = i < len;
|
|
12249
|
+
if (hasClose)
|
|
12250
|
+
i++;
|
|
12251
|
+
const text = source.slice(start, i);
|
|
12252
|
+
const inner = hasClose ? text.slice(1, -1) : text.slice(1);
|
|
12253
|
+
const field = fieldOrder.includes(inner) ? inner : '';
|
|
12254
|
+
out.push({
|
|
12255
|
+
kind: 'ref',
|
|
12256
|
+
text,
|
|
12257
|
+
start,
|
|
12258
|
+
end: i,
|
|
12259
|
+
ref: { field, row: 0, absField: false, absRow: false, sameRow: true },
|
|
12260
|
+
});
|
|
12261
|
+
continue;
|
|
12262
|
+
}
|
|
12092
12263
|
// A1 cell ref: `$?LETTERS$?DIGITS`. Detected before identifier scan so
|
|
12093
12264
|
// `A1` is a ref, not an ident `A` + number `1`.
|
|
12094
12265
|
const refMatch = tryScanA1(source, i, fieldOrder);
|
|
@@ -12348,6 +12519,13 @@ class MozGridFormulaEditorComponent {
|
|
|
12348
12519
|
* back to `cellEditState` to derive it from the inline edit coord.
|
|
12349
12520
|
*/
|
|
12350
12521
|
editingAddr = input(null, ...(ngDevMode ? [{ debugName: "editingAddr" }] : /* istanbul ignore next */ []));
|
|
12522
|
+
/**
|
|
12523
|
+
* When `true`, the editor behaves as a plain text field: no click-to-pick
|
|
12524
|
+
* from grid cells, and no ref-color painting of referenced cells. Used by
|
|
12525
|
+
* the formula bar, where picking-by-click competes with normal cell
|
|
12526
|
+
* selection and confuses users.
|
|
12527
|
+
*/
|
|
12528
|
+
disableCellPick = input(false, ...(ngDevMode ? [{ debugName: "disableCellPick" }] : /* istanbul ignore next */ []));
|
|
12351
12529
|
valueChange = output();
|
|
12352
12530
|
commit = output();
|
|
12353
12531
|
cancel = output();
|
|
@@ -12454,12 +12632,16 @@ class MozGridFormulaEditorComponent {
|
|
|
12454
12632
|
this.highlight.setHighlights(highlights);
|
|
12455
12633
|
});
|
|
12456
12634
|
afterNextRender(() => {
|
|
12635
|
+
// Activate unconditionally so referenced cells paint their ref-color
|
|
12636
|
+
// borders and headers show column-letter badges. `pickMode` gates the
|
|
12637
|
+
// click-to-pick behaviour alone — the formula bar opts out because
|
|
12638
|
+
// cell clicks there compete with normal cell selection.
|
|
12457
12639
|
this.highlight.activate({
|
|
12458
12640
|
pickCell: (addr, opts) => this.handlePickCell(addr, opts),
|
|
12459
12641
|
pickRangeStart: (addr, opts) => this.handlePickRangeStart(addr, opts),
|
|
12460
12642
|
pickRangeExtend: (end) => this.handlePickRangeExtend(end),
|
|
12461
12643
|
pickRangeCommit: () => this.handlePickRangeCommit(),
|
|
12462
|
-
});
|
|
12644
|
+
}, { pickMode: !this.disableCellPick() });
|
|
12463
12645
|
this.focus();
|
|
12464
12646
|
});
|
|
12465
12647
|
this.destroyRef.onDestroy(() => this.highlight.deactivate());
|
|
@@ -12687,12 +12869,12 @@ class MozGridFormulaEditorComponent {
|
|
|
12687
12869
|
overlay.scrollLeft = el.scrollLeft;
|
|
12688
12870
|
}
|
|
12689
12871
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MozGridFormulaEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12690
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: MozGridFormulaEditorComponent, isStandalone: true, selector: "moz-grid-formula-editor", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, editingAddr: { classPropertyName: "editingAddr", publicName: "editingAddr", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", commit: "commit", cancel: "cancel" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "origin", first: true, predicate: CdkOverlayOrigin, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"moz-grid-formula-editor\" cdkOverlayOrigin>\n <div class=\"moz-grid-formula-editor__overlay\" aria-hidden=\"true\">\n @for (seg of overlaySegments(); track $index) {\n @if (seg.color) {\n <span class=\"moz-grid-formula-editor__ref\" [style.color]=\"seg.color\">{{ seg.text }}</span>\n } @else {\n <span>{{ seg.text }}</span>\n }\n }\n </div>\n <input\n #input\n class=\"moz-grid-formula-editor__input\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? 'moz-grid-formula-editor-listbox' : null\"\n [attr.aria-activedescendant]=\"panelOpen() ? 'moz-grid-formula-editor-option-' + selectedIndex() : null\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onCaretProbe($event)\"\n (click)=\"onCaretProbe($event)\"\n (select)=\"onCaretProbe($event)\"\n (scroll)=\"onScroll($event)\"\n />\n</div>\n\n<ng-template\n [cdkConnectedOverlayOrigin]=\"origin()\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"panelPositions\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n cdkConnectedOverlay\n (overlayOutsideClick)=\"closePanel()\"\n>\n <ul\n id=\"moz-grid-formula-editor-listbox\"\n class=\"moz-grid-formula-editor__panel\"\n role=\"listbox\"\n >\n @for (s of suggestions(); track s.name; let i = $index) {\n <li\n class=\"moz-grid-formula-editor__option\"\n [class.moz-grid-formula-editor__option--selected]=\"i === selectedIndex()\"\n [id]=\"'moz-grid-formula-editor-option-' + i\"\n role=\"option\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n (mousedown)=\"onSuggestionMouseDown($event, i)\"\n (mouseenter)=\"onSuggestionMouseEnter(i)\"\n >\n <span class=\"moz-grid-formula-editor__option-name\">{{ s.name }}</span>\n @if (s.signature) {\n <span class=\"moz-grid-formula-editor__option-signature\">{{ s.signature }}</span>\n }\n @if (s.summary) {\n <span class=\"moz-grid-formula-editor__option-summary\">{{ s.summary }}</span>\n }\n </li>\n }\n </ul>\n</ng-template>\n\n<div\n class=\"moz-grid-formula-editor__a11y-live\"\n role=\"status\"\n aria-live=\"polite\"\n>\n @if (panelOpen()) {\n {{ suggestions().length }} suggestions. {{ suggestions()[selectedIndex()]?.name }} s\u00E9lectionn\u00E9.\n }\n</div>\n", styles: [".moz-grid-formula-editor{position:relative;width:100%;height:100%;display:flex;align-items:center;min-width:0}.moz-grid-formula-editor__overlay{position:absolute;inset:0;margin:0;padding:0;pointer-events:none;white-space:pre;overflow:hidden;display:flex;align-items:center;font-family:inherit;font-size:var(--font-size-s, 14px);line-height:1;color:var(--color-text-primary)}.moz-grid-formula-editor__overlay>span{white-space:pre}.moz-grid-formula-editor__ref{font-weight:600}.moz-grid-formula-editor__input{position:relative;width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:var(--font-size-s, 14px);line-height:1;padding:0;height:100%;min-width:0;box-sizing:border-box;color:transparent;-webkit-text-fill-color:transparent;caret-color:var(--color-text-primary)}.moz-grid-formula-editor__input::selection{background:#1a73e840}.moz-grid-formula-editor__panel{list-style:none;margin:0;padding:4px 0;min-width:240px;max-height:280px;overflow-y:auto;background:var(--color-background-primary, #fff);border:1px solid var(--color-border-primary, #dadce0);border-radius:6px;box-shadow:0 2px 8px #3c404326,0 4px 12px #3c40431a;font-family:inherit;font-size:var(--font-size-s, 14px);color:var(--color-text-primary)}.moz-grid-formula-editor__option{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:8px;row-gap:0;padding:6px 12px;cursor:pointer;line-height:1.35}.moz-grid-formula-editor__option:hover,.moz-grid-formula-editor__option--selected{background:var(--color-background-accent, rgba(26, 115, 232, .08))}.moz-grid-formula-editor__option-name{font-weight:600;grid-column:1;grid-row:1}.moz-grid-formula-editor__option-signature{grid-column:2;grid-row:1;color:var(--color-text-secondary, #5f6368);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:var(--font-size-xs, 12px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.moz-grid-formula-editor__option-summary{grid-column:1/span 2;grid-row:2;color:var(--color-text-secondary, #5f6368);font-size:var(--font-size-xs, 12px)}.moz-grid-formula-editor__a11y-live{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
12872
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: MozGridFormulaEditorComponent, isStandalone: true, selector: "moz-grid-formula-editor", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, editingAddr: { classPropertyName: "editingAddr", publicName: "editingAddr", isSignal: true, isRequired: false, transformFunction: null }, disableCellPick: { classPropertyName: "disableCellPick", publicName: "disableCellPick", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", commit: "commit", cancel: "cancel" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "origin", first: true, predicate: CdkOverlayOrigin, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"moz-grid-formula-editor\" cdkOverlayOrigin>\n <div class=\"moz-grid-formula-editor__overlay\" aria-hidden=\"true\">\n @for (seg of overlaySegments(); track $index) {\n @if (seg.color) {\n <span class=\"moz-grid-formula-editor__ref\" [style.color]=\"seg.color\">{{ seg.text }}</span>\n } @else {\n <span>{{ seg.text }}</span>\n }\n }\n </div>\n <input\n #input\n class=\"moz-grid-formula-editor__input\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? 'moz-grid-formula-editor-listbox' : null\"\n [attr.aria-activedescendant]=\"panelOpen() ? 'moz-grid-formula-editor-option-' + selectedIndex() : null\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onCaretProbe($event)\"\n (click)=\"onCaretProbe($event)\"\n (select)=\"onCaretProbe($event)\"\n (scroll)=\"onScroll($event)\"\n />\n</div>\n\n<ng-template\n [cdkConnectedOverlayOrigin]=\"origin()\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"panelPositions\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n cdkConnectedOverlay\n (overlayOutsideClick)=\"closePanel()\"\n>\n <ul\n id=\"moz-grid-formula-editor-listbox\"\n class=\"moz-grid-formula-editor__panel\"\n role=\"listbox\"\n >\n @for (s of suggestions(); track s.name; let i = $index) {\n <li\n class=\"moz-grid-formula-editor__option\"\n [class.moz-grid-formula-editor__option--selected]=\"i === selectedIndex()\"\n [id]=\"'moz-grid-formula-editor-option-' + i\"\n role=\"option\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n (mousedown)=\"onSuggestionMouseDown($event, i)\"\n (mouseenter)=\"onSuggestionMouseEnter(i)\"\n >\n <span class=\"moz-grid-formula-editor__option-name\">{{ s.name }}</span>\n @if (s.signature) {\n <span class=\"moz-grid-formula-editor__option-signature\">{{ s.signature }}</span>\n }\n @if (s.summary) {\n <span class=\"moz-grid-formula-editor__option-summary\">{{ s.summary }}</span>\n }\n </li>\n }\n </ul>\n</ng-template>\n\n<div\n class=\"moz-grid-formula-editor__a11y-live\"\n role=\"status\"\n aria-live=\"polite\"\n>\n @if (panelOpen()) {\n {{ suggestions().length }} suggestions. {{ suggestions()[selectedIndex()]?.name }} s\u00E9lectionn\u00E9.\n }\n</div>\n", styles: [".moz-grid-formula-editor{position:relative;width:100%;height:100%;display:flex;align-items:center;min-width:0}.moz-grid-formula-editor__overlay{position:absolute;inset:0;margin:0;padding:0;pointer-events:none;white-space:pre;overflow:hidden;display:flex;align-items:center;font-family:inherit;font-size:var(--font-size-s, 14px);line-height:1;color:var(--color-text-primary)}.moz-grid-formula-editor__overlay>span{white-space:pre}.moz-grid-formula-editor__ref{font-weight:600}.moz-grid-formula-editor__input{position:relative;width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:var(--font-size-s, 14px);line-height:1;padding:0;height:100%;min-width:0;box-sizing:border-box;color:transparent;-webkit-text-fill-color:transparent;caret-color:var(--color-text-primary)}.moz-grid-formula-editor__input::selection{background:#1a73e840}.moz-grid-formula-editor__panel{list-style:none;margin:0;padding:4px 0;min-width:240px;max-height:280px;overflow-y:auto;background:var(--color-background-primary, #fff);border:1px solid var(--color-border-primary, #dadce0);border-radius:6px;box-shadow:0 2px 8px #3c404326,0 4px 12px #3c40431a;font-family:inherit;font-size:var(--font-size-s, 14px);color:var(--color-text-primary)}.moz-grid-formula-editor__option{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:8px;row-gap:0;padding:6px 12px;cursor:pointer;line-height:1.35}.moz-grid-formula-editor__option:hover,.moz-grid-formula-editor__option--selected{background:var(--color-background-accent, rgba(26, 115, 232, .08))}.moz-grid-formula-editor__option-name{font-weight:600;grid-column:1;grid-row:1}.moz-grid-formula-editor__option-signature{grid-column:2;grid-row:1;color:var(--color-text-secondary, #5f6368);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:var(--font-size-xs, 12px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.moz-grid-formula-editor__option-summary{grid-column:1/span 2;grid-row:2;color:var(--color-text-secondary, #5f6368);font-size:var(--font-size-xs, 12px)}.moz-grid-formula-editor__a11y-live{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
12691
12873
|
}
|
|
12692
12874
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MozGridFormulaEditorComponent, decorators: [{
|
|
12693
12875
|
type: Component,
|
|
12694
12876
|
args: [{ selector: 'moz-grid-formula-editor', standalone: true, imports: [CdkConnectedOverlay, CdkOverlayOrigin], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"moz-grid-formula-editor\" cdkOverlayOrigin>\n <div class=\"moz-grid-formula-editor__overlay\" aria-hidden=\"true\">\n @for (seg of overlaySegments(); track $index) {\n @if (seg.color) {\n <span class=\"moz-grid-formula-editor__ref\" [style.color]=\"seg.color\">{{ seg.text }}</span>\n } @else {\n <span>{{ seg.text }}</span>\n }\n }\n </div>\n <input\n #input\n class=\"moz-grid-formula-editor__input\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"panelOpen()\"\n [attr.aria-controls]=\"panelOpen() ? 'moz-grid-formula-editor-listbox' : null\"\n [attr.aria-activedescendant]=\"panelOpen() ? 'moz-grid-formula-editor-option-' + selectedIndex() : null\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onCaretProbe($event)\"\n (click)=\"onCaretProbe($event)\"\n (select)=\"onCaretProbe($event)\"\n (scroll)=\"onScroll($event)\"\n />\n</div>\n\n<ng-template\n [cdkConnectedOverlayOrigin]=\"origin()\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"panelPositions\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n cdkConnectedOverlay\n (overlayOutsideClick)=\"closePanel()\"\n>\n <ul\n id=\"moz-grid-formula-editor-listbox\"\n class=\"moz-grid-formula-editor__panel\"\n role=\"listbox\"\n >\n @for (s of suggestions(); track s.name; let i = $index) {\n <li\n class=\"moz-grid-formula-editor__option\"\n [class.moz-grid-formula-editor__option--selected]=\"i === selectedIndex()\"\n [id]=\"'moz-grid-formula-editor-option-' + i\"\n role=\"option\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n (mousedown)=\"onSuggestionMouseDown($event, i)\"\n (mouseenter)=\"onSuggestionMouseEnter(i)\"\n >\n <span class=\"moz-grid-formula-editor__option-name\">{{ s.name }}</span>\n @if (s.signature) {\n <span class=\"moz-grid-formula-editor__option-signature\">{{ s.signature }}</span>\n }\n @if (s.summary) {\n <span class=\"moz-grid-formula-editor__option-summary\">{{ s.summary }}</span>\n }\n </li>\n }\n </ul>\n</ng-template>\n\n<div\n class=\"moz-grid-formula-editor__a11y-live\"\n role=\"status\"\n aria-live=\"polite\"\n>\n @if (panelOpen()) {\n {{ suggestions().length }} suggestions. {{ suggestions()[selectedIndex()]?.name }} s\u00E9lectionn\u00E9.\n }\n</div>\n", styles: [".moz-grid-formula-editor{position:relative;width:100%;height:100%;display:flex;align-items:center;min-width:0}.moz-grid-formula-editor__overlay{position:absolute;inset:0;margin:0;padding:0;pointer-events:none;white-space:pre;overflow:hidden;display:flex;align-items:center;font-family:inherit;font-size:var(--font-size-s, 14px);line-height:1;color:var(--color-text-primary)}.moz-grid-formula-editor__overlay>span{white-space:pre}.moz-grid-formula-editor__ref{font-weight:600}.moz-grid-formula-editor__input{position:relative;width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:var(--font-size-s, 14px);line-height:1;padding:0;height:100%;min-width:0;box-sizing:border-box;color:transparent;-webkit-text-fill-color:transparent;caret-color:var(--color-text-primary)}.moz-grid-formula-editor__input::selection{background:#1a73e840}.moz-grid-formula-editor__panel{list-style:none;margin:0;padding:4px 0;min-width:240px;max-height:280px;overflow-y:auto;background:var(--color-background-primary, #fff);border:1px solid var(--color-border-primary, #dadce0);border-radius:6px;box-shadow:0 2px 8px #3c404326,0 4px 12px #3c40431a;font-family:inherit;font-size:var(--font-size-s, 14px);color:var(--color-text-primary)}.moz-grid-formula-editor__option{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:8px;row-gap:0;padding:6px 12px;cursor:pointer;line-height:1.35}.moz-grid-formula-editor__option:hover,.moz-grid-formula-editor__option--selected{background:var(--color-background-accent, rgba(26, 115, 232, .08))}.moz-grid-formula-editor__option-name{font-weight:600;grid-column:1;grid-row:1}.moz-grid-formula-editor__option-signature{grid-column:2;grid-row:1;color:var(--color-text-secondary, #5f6368);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:var(--font-size-xs, 12px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.moz-grid-formula-editor__option-summary{grid-column:1/span 2;grid-row:2;color:var(--color-text-secondary, #5f6368);font-size:var(--font-size-xs, 12px)}.moz-grid-formula-editor__a11y-live{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
|
|
12695
|
-
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], editingAddr: [{ type: i0.Input, args: [{ isSignal: true, alias: "editingAddr", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], commit: [{ type: i0.Output, args: ["commit"] }], cancel: [{ type: i0.Output, args: ["cancel"] }], inputEl: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], origin: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }] }] } });
|
|
12877
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], editingAddr: [{ type: i0.Input, args: [{ isSignal: true, alias: "editingAddr", required: false }] }], disableCellPick: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableCellPick", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], commit: [{ type: i0.Output, args: ["commit"] }], cancel: [{ type: i0.Output, args: ["cancel"] }], inputEl: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], origin: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }] }] } });
|
|
12696
12878
|
|
|
12697
12879
|
class MozGridCellComponent {
|
|
12698
12880
|
state = inject(GridStateManager);
|
|
@@ -12953,7 +13135,7 @@ class MozGridCellComponent {
|
|
|
12953
13135
|
// Formula pick mode: a formula editor is active elsewhere. Clicking a
|
|
12954
13136
|
// cell inserts its reference into the editor instead of starting a
|
|
12955
13137
|
// selection. The editor keeps the focus; we must not focus the grid.
|
|
12956
|
-
if (this.refHighlight?.
|
|
13138
|
+
if (this.refHighlight?.isPickMode() && !this.isEditing()) {
|
|
12957
13139
|
// Double-click wins over pick: abandon the formula edit so the
|
|
12958
13140
|
// target cell can open its own editor on the upcoming dblclick.
|
|
12959
13141
|
if (event.detail >= 2) {
|
|
@@ -13059,15 +13241,23 @@ class MozGridCellComponent {
|
|
|
13059
13241
|
if (overlay)
|
|
13060
13242
|
return;
|
|
13061
13243
|
}
|
|
13062
|
-
//
|
|
13244
|
+
// Defer the commit so pending interactions can settle. In particular,
|
|
13245
|
+
// typing `=` in the plain text input mounts the formula editor in its
|
|
13246
|
+
// place — the old input's removal fires `focusout` with a null
|
|
13247
|
+
// `relatedTarget` (focus lands on `<body>` for a tick), but the new
|
|
13248
|
+
// formula input grabs focus in its own `afterNextRender`. Re-check
|
|
13249
|
+
// `activeElement` here so we don't commit out from under it.
|
|
13063
13250
|
setTimeout(() => {
|
|
13064
|
-
if (this.isEditing())
|
|
13065
|
-
|
|
13066
|
-
|
|
13251
|
+
if (!this.isEditing())
|
|
13252
|
+
return;
|
|
13253
|
+
const active = document.activeElement;
|
|
13254
|
+
if (active instanceof Node && editorDiv.contains(active))
|
|
13255
|
+
return;
|
|
13256
|
+
this.commitEdit.emit();
|
|
13067
13257
|
});
|
|
13068
13258
|
}
|
|
13069
13259
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MozGridCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13070
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: MozGridCellComponent, isStandalone: true, selector: "moz-grid-cell", inputs: { row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, colIndex: { classPropertyName: "colIndex", publicName: "colIndex", isSignal: true, isRequired: true, transformFunction: null }, colState: { classPropertyName: "colState", publicName: "colState", isSignal: true, isRequired: true, transformFunction: null }, def: { classPropertyName: "def", publicName: "def", isSignal: true, isRequired: true, transformFunction: null }, isLast: { classPropertyName: "isLast", publicName: "isLast", isSignal: true, isRequired: false, transformFunction: null }, pinnedEnd: { classPropertyName: "pinnedEnd", publicName: "pinnedEnd", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { commitEdit: "commitEdit", cancelEdit: "cancelEdit" }, host: { properties: { "style.flex": "isLast() ? \"1 0 auto\" : \"0 0 auto\"", "style.width.px": "isLast() ? undefined : colState().currentWidth", "style.min-width.px": "isLast() ? colState().currentWidth : resolvedMinWidth()" } }, ngImport: i0, template: "<div\n class=\"grid-cell\"\n [class.grid-cell--focused]=\"isFocused()\"\n [class.grid-cell--in-range]=\"isInRange()\"\n [class.grid-cell--in-fill-range]=\"isInFillRange()\"\n [class.grid-cell--in-fill-reject-range]=\"isInFillRejectRange()\"\n [class.grid-cell--cut]=\"cutEdges().any\"\n [class.grid-cell--last]=\"isLast()\"\n [class.grid-cell--pinned-end]=\"pinnedEnd()\"\n [class.grid-cell--readonly]=\"!def().editable\"\n [class.grid-cell--error]=\"cellError()\"\n [class.grid-cell--formula-error]=\"hasFormulaError()\"\n [class.grid-cell--ref-highlight]=\"refHighlightColor()\"\n [style.--moz-grid-ref-color]=\"refHighlightColor()\"\n [attr.aria-invalid]=\"cellError() ? 'true' : null\"\n (click)=\"onCellClick($event)\"\n (dblclick)=\"onDoubleClick()\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter()\"\n>\n @if (isEditing()) {\n <div class=\"grid-cell__editor\" (focusout)=\"onEditorBlur($event)\">\n @if (isFormulaEditing()) {\n <moz-grid-formula-editor\n [value]=\"$any(editState().draftValue)\"\n (valueChange)=\"updateDraftFn($event)\"\n (commit)=\"commitEditFn()\"\n (cancel)=\"onFormulaCancel()\"\n />\n } @else if (editTemplate()) {\n <div class=\"grid-cell__editor-custom\">\n <ng-container\n [ngTemplateOutlet]=\"editTemplate()!\"\n [ngTemplateOutletContext]=\"{\n $implicit: value(),\n row: row(),\n field: def().field,\n draft: editState().draftValue,\n updateDraft: updateDraftFn,\n commitEdit: commitEditFn\n }\"\n />\n </div>\n } @else { @switch (editorType()) { @case ('text') {\n <input\n class=\"grid-cell__input grid-cell__input--plain\"\n type=\"text\"\n [value]=\"editState().draftValue\"\n (input)=\"onEditorInput($event)\"\n />\n } @case ('number') {\n <input\n class=\"grid-cell__input grid-cell__input--plain\"\n type=\"number\"\n [value]=\"editState().draftValue\"\n (input)=\"onEditorInput($event)\"\n />\n } @case ('select') {\n <moz-select\n name=\"cell-editor\"\n [options]=\"def().cellEditorOptions ?? []\"\n [ngModel]=\"editState().draftValue\"\n (change)=\"onSelectChange($event)\"\n [size]=\"'s'\"\n />\n } @case ('checkbox') {\n <moz-checkbox\n [id]=\"'grid-cell-editor-' + rowIndex() + '-' + colIndex()\"\n [ngModel]=\"!!editState().draftValue\"\n (change)=\"onCheckboxChange($event)\"\n />\n } @case ('date') {\n <moz-datepicker\n [id]=\"'grid-cell-editor-' + rowIndex() + '-' + colIndex()\"\n size=\"s\"\n [ngModel]=\"editState().draftValue\"\n (ngModelChange)=\"onDateChange($event)\"\n />\n } @default {\n <input\n class=\"grid-cell__input grid-cell__input--plain\"\n type=\"text\"\n [value]=\"editState().draftValue\"\n (input)=\"onEditorInput($event)\"\n />\n } } }\n </div>\n } @else { @if (cellTemplate()) {\n <div class=\"grid-cell__custom\">\n <ng-container\n [ngTemplateOutlet]=\"cellTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), row: row(), field: def().field }\"\n />\n </div>\n } @else {\n <span class=\"grid-cell__value\">{{ displayValue() }}</span>\n } } @if (cutEdges(); as edges) { @if (edges.top) {\n <div class=\"grid-cell__cut-mark grid-cell__cut-mark--top\"></div>\n } @if (edges.bottom) {\n <div class=\"grid-cell__cut-mark grid-cell__cut-mark--bottom\"></div>\n } @if (edges.left) {\n <div class=\"grid-cell__cut-mark grid-cell__cut-mark--left\"></div>\n } @if (edges.right) {\n <div class=\"grid-cell__cut-mark grid-cell__cut-mark--right\"></div>\n } } @if (isFocused() && !isEditing() && def().editable) {\n <div class=\"grid-cell__fill-handle\" (mousedown)=\"onFillHandleMouseDown($event)\"></div>\n } @if (cellError(); as error) {\n <div\n class=\"grid-cell__error-icon\"\n [mozTooltip]=\"error.message\"\n tooltipPosition=\"top\"\n aria-label=\"Erreur de validation\"\n >\n <ErrorFilled24 />\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;height:100%;min-width:0}.grid-cell{display:flex;align-items:center;position:relative;padding:0 var(--spacing-s, 8px);height:100%;border-right:1px solid var(--color-border-primary);overflow:hidden;box-sizing:border-box;min-width:0;background:inherit;cursor:pointer}.grid-cell--last{border-right:none}.grid-cell--pinned-end{border-right:none;border-left:1px solid var(--color-border-primary)}:host(:first-child) .grid-cell--pinned-end{border-left:none}.grid-cell__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--font-size-s, 14px);color:var(--color-text-primary);position:relative;z-index:1}.grid-cell__editor{width:100%;min-width:0;max-width:100%;height:100%;display:flex;align-items:center;overflow:hidden;box-sizing:border-box;position:relative;z-index:1}.grid-cell__editor-custom{width:100%;min-width:0;max-width:100%;overflow:hidden;box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:4px}.grid-cell__editor input,.grid-cell__editor moz-select{width:100%;min-width:0;box-sizing:border-box}.grid-cell__input--plain{border:none;outline:none;background:transparent;font-family:inherit;font-size:var(--font-size-s, 14px);color:var(--color-text-primary);padding:0;height:100%;width:100%;min-width:0;box-sizing:border-box}.grid-cell__input--plain:focus{outline:none}.grid-cell__input--plain[type=number]::-webkit-inner-spin-button,.grid-cell__input--plain[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.grid-cell__input--plain[type=number]{-moz-appearance:textfield}.grid-cell__editor ::ng-deep .text-input{width:100%;min-width:0;box-sizing:border-box}.grid-cell__editor ::ng-deep .select,.grid-cell__editor ::ng-deep .select__trigger{min-width:0;width:100%}.grid-cell__editor ::ng-deep *{max-width:100%}.grid-cell__editor moz-datepicker{width:100%;min-width:0;box-sizing:border-box}.grid-cell__editor ::ng-deep .mc-datepicker,.grid-cell__editor ::ng-deep .mc-text-input{width:100%;min-width:0;box-sizing:border-box;height:28px;font-size:var(--font-size-xs, 12px)}.grid-cell__editor ::ng-deep moz-datepicker label{display:none}.grid-cell>*:not(.grid-cell__fill-handle){position:relative;z-index:1}.grid-cell:before{content:\"\";position:absolute;inset:3px;border-radius:4px;pointer-events:none;z-index:0}.grid-cell:hover:before{background:#f1f3f4}.grid-cell--focused:hover:before,.grid-cell--in-range:hover:before,.grid-cell--in-fill-range:hover:before,.grid-cell--in-fill-reject-range:hover:before{background:transparent}.grid-cell--focused{z-index:2}.grid-cell--focused:after{content:\"\";position:absolute;inset:0;border:2px solid var(--color-background-accent-inverse);border-radius:4px;pointer-events:none}.grid-cell--ref-highlight{z-index:2}.grid-cell--ref-highlight:after{content:\"\";position:absolute;inset:0;border:2px solid var(--moz-grid-ref-color, transparent);border-radius:4px;pointer-events:none;z-index:3}.grid-cell--in-range{background:var(--color-background-accent)}.grid-cell--readonly .grid-cell__value{color:var(--color-text-secondary, #666)}.grid-cell--in-fill-range{background:#34a85314}.grid-cell--in-fill-range:after{content:\"\";position:absolute;inset:0;border:1px dashed var(--color-success, #34a853);border-radius:4px;pointer-events:none}.grid-cell--in-fill-reject-range{background:#ea302d1f;cursor:not-allowed;z-index:2}.grid-cell--in-fill-reject-range:after{content:\"\";position:absolute;inset:0;border:2px dashed var(--Status-Standalone-element-Error, #ea302d);border-radius:4px;pointer-events:none;z-index:3}.grid-cell--cut{background:#1a73e80f}.grid-cell__cut-mark{position:absolute;pointer-events:none;z-index:5;--cut-color: var(--color-background-accent-inverse, #1a73e8)}.grid-cell__cut-mark--top,.grid-cell__cut-mark--bottom{left:0;right:0;height:2px;background-image:linear-gradient(90deg,var(--cut-color) 50%,transparent 50%);background-size:8px 2px;background-repeat:repeat-x;animation:moz-grid-marching-ants-x .5s linear infinite}.grid-cell__cut-mark--top{top:0}.grid-cell__cut-mark--bottom{bottom:0}.grid-cell__cut-mark--left,.grid-cell__cut-mark--right{top:0;bottom:0;width:2px;background-image:linear-gradient(180deg,var(--cut-color) 50%,transparent 50%);background-size:2px 8px;background-repeat:repeat-y;animation:moz-grid-marching-ants-y .5s linear infinite}.grid-cell__cut-mark--left{left:0}.grid-cell__cut-mark--right{right:0}@keyframes moz-grid-marching-ants-x{0%{background-position-x:0}to{background-position-x:8px}}@keyframes moz-grid-marching-ants-y{0%{background-position-y:0}to{background-position-y:8px}}.grid-cell__fill-handle{position:absolute;right:0;bottom:0;width:8px;height:8px;background:var(--color-background-accent-inverse);cursor:crosshair;z-index:4}.grid-cell--error{outline:1px solid var(--Status-Border-Error, #ef5f5c);outline-offset:-2px;z-index:1;border-radius:4px}.grid-cell--error:hover:before{background:transparent}.grid-cell--formula-error .grid-cell__value{color:var(--Status-Text-Error, #d0021b);font-style:italic}.grid-cell__error-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-left:auto;cursor:help;position:relative;z-index:2;fill:var(--Status-Standalone-element-Error, #ea302d)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MozSelectComponent, selector: "moz-select", inputs: ["id", "name", "options", "placeholder", "isInvalid", "disabled", "readonly", "size"] }, { kind: "component", type: MozCheckboxComponent, selector: "moz-checkbox", inputs: ["id", "name", "label", "indeterminate", "isInvalid", "disabled", "indented"] }, { kind: "component", type: MozDatepickerComponent, selector: "moz-datepicker", inputs: ["id", "disabled", "readonly", "invalid", "error", "clearable", "size", "label"] }, { kind: "directive", type: MozTooltipDirective, selector: "[mozTooltip]", inputs: ["mozTooltip", "tooltipPosition", "tooltipNoPointer"] }, { kind: "component", type: ErrorFilled24, selector: "ErrorFilled24", inputs: ["hostClass"] }, { kind: "component", type: MozGridFormulaEditorComponent, selector: "moz-grid-formula-editor", inputs: ["value", "locale", "editingAddr"], outputs: ["valueChange", "commit", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13260
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: MozGridCellComponent, isStandalone: true, selector: "moz-grid-cell", inputs: { row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, colIndex: { classPropertyName: "colIndex", publicName: "colIndex", isSignal: true, isRequired: true, transformFunction: null }, colState: { classPropertyName: "colState", publicName: "colState", isSignal: true, isRequired: true, transformFunction: null }, def: { classPropertyName: "def", publicName: "def", isSignal: true, isRequired: true, transformFunction: null }, isLast: { classPropertyName: "isLast", publicName: "isLast", isSignal: true, isRequired: false, transformFunction: null }, pinnedEnd: { classPropertyName: "pinnedEnd", publicName: "pinnedEnd", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { commitEdit: "commitEdit", cancelEdit: "cancelEdit" }, host: { properties: { "style.flex": "isLast() ? \"1 0 auto\" : \"0 0 auto\"", "style.width.px": "isLast() ? undefined : colState().currentWidth", "style.min-width.px": "isLast() ? colState().currentWidth : resolvedMinWidth()" } }, ngImport: i0, template: "<div\n class=\"grid-cell\"\n [class.grid-cell--focused]=\"isFocused()\"\n [class.grid-cell--in-range]=\"isInRange()\"\n [class.grid-cell--in-fill-range]=\"isInFillRange()\"\n [class.grid-cell--in-fill-reject-range]=\"isInFillRejectRange()\"\n [class.grid-cell--cut]=\"cutEdges().any\"\n [class.grid-cell--last]=\"isLast()\"\n [class.grid-cell--pinned-end]=\"pinnedEnd()\"\n [class.grid-cell--readonly]=\"!def().editable\"\n [class.grid-cell--error]=\"cellError()\"\n [class.grid-cell--formula-error]=\"hasFormulaError()\"\n [class.grid-cell--ref-highlight]=\"refHighlightColor()\"\n [style.--moz-grid-ref-color]=\"refHighlightColor()\"\n [attr.aria-invalid]=\"cellError() ? 'true' : null\"\n (click)=\"onCellClick($event)\"\n (dblclick)=\"onDoubleClick()\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter()\"\n>\n @if (isEditing()) {\n <div class=\"grid-cell__editor\" (focusout)=\"onEditorBlur($event)\">\n @if (isFormulaEditing()) {\n <moz-grid-formula-editor\n [value]=\"$any(editState().draftValue)\"\n (valueChange)=\"updateDraftFn($event)\"\n (commit)=\"commitEditFn()\"\n (cancel)=\"onFormulaCancel()\"\n />\n } @else if (editTemplate()) {\n <div class=\"grid-cell__editor-custom\">\n <ng-container\n [ngTemplateOutlet]=\"editTemplate()!\"\n [ngTemplateOutletContext]=\"{\n $implicit: value(),\n row: row(),\n field: def().field,\n draft: editState().draftValue,\n updateDraft: updateDraftFn,\n commitEdit: commitEditFn\n }\"\n />\n </div>\n } @else { @switch (editorType()) { @case ('text') {\n <input\n class=\"grid-cell__input grid-cell__input--plain\"\n type=\"text\"\n [value]=\"editState().draftValue\"\n (input)=\"onEditorInput($event)\"\n />\n } @case ('number') {\n <input\n class=\"grid-cell__input grid-cell__input--plain\"\n type=\"number\"\n [value]=\"editState().draftValue\"\n (input)=\"onEditorInput($event)\"\n />\n } @case ('select') {\n <moz-select\n name=\"cell-editor\"\n [options]=\"def().cellEditorOptions ?? []\"\n [ngModel]=\"editState().draftValue\"\n (change)=\"onSelectChange($event)\"\n [size]=\"'s'\"\n />\n } @case ('checkbox') {\n <moz-checkbox\n [id]=\"'grid-cell-editor-' + rowIndex() + '-' + colIndex()\"\n [ngModel]=\"!!editState().draftValue\"\n (change)=\"onCheckboxChange($event)\"\n />\n } @case ('date') {\n <moz-datepicker\n [id]=\"'grid-cell-editor-' + rowIndex() + '-' + colIndex()\"\n size=\"s\"\n [ngModel]=\"editState().draftValue\"\n (ngModelChange)=\"onDateChange($event)\"\n />\n } @default {\n <input\n class=\"grid-cell__input grid-cell__input--plain\"\n type=\"text\"\n [value]=\"editState().draftValue\"\n (input)=\"onEditorInput($event)\"\n />\n } } }\n </div>\n } @else { @if (cellTemplate()) {\n <div class=\"grid-cell__custom\">\n <ng-container\n [ngTemplateOutlet]=\"cellTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), row: row(), field: def().field }\"\n />\n </div>\n } @else {\n <span class=\"grid-cell__value\">{{ displayValue() }}</span>\n } } @if (cutEdges(); as edges) { @if (edges.top) {\n <div class=\"grid-cell__cut-mark grid-cell__cut-mark--top\"></div>\n } @if (edges.bottom) {\n <div class=\"grid-cell__cut-mark grid-cell__cut-mark--bottom\"></div>\n } @if (edges.left) {\n <div class=\"grid-cell__cut-mark grid-cell__cut-mark--left\"></div>\n } @if (edges.right) {\n <div class=\"grid-cell__cut-mark grid-cell__cut-mark--right\"></div>\n } } @if (isFocused() && !isEditing() && def().editable) {\n <div class=\"grid-cell__fill-handle\" (mousedown)=\"onFillHandleMouseDown($event)\"></div>\n } @if (cellError(); as error) {\n <div\n class=\"grid-cell__error-icon\"\n [mozTooltip]=\"error.message\"\n tooltipPosition=\"top\"\n aria-label=\"Erreur de validation\"\n >\n <ErrorFilled24 />\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;height:100%;min-width:0}.grid-cell{display:flex;align-items:center;position:relative;padding:0 var(--spacing-s, 8px);height:100%;border-right:1px solid var(--color-border-primary);overflow:hidden;box-sizing:border-box;min-width:0;background:inherit;cursor:pointer}.grid-cell--last{border-right:none}.grid-cell--pinned-end{border-right:none;border-left:1px solid var(--color-border-primary)}:host(:first-child) .grid-cell--pinned-end{border-left:none}.grid-cell__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--font-size-s, 14px);color:var(--color-text-primary);position:relative;z-index:1}.grid-cell__editor{width:100%;min-width:0;max-width:100%;height:100%;display:flex;align-items:center;overflow:hidden;box-sizing:border-box;position:relative;z-index:1}.grid-cell__editor-custom{width:100%;min-width:0;max-width:100%;overflow:hidden;box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:4px}.grid-cell__editor input,.grid-cell__editor moz-select{width:100%;min-width:0;box-sizing:border-box}.grid-cell__input--plain{border:none;outline:none;background:transparent;font-family:inherit;font-size:var(--font-size-s, 14px);color:var(--color-text-primary);padding:0;height:100%;width:100%;min-width:0;box-sizing:border-box}.grid-cell__input--plain:focus{outline:none}.grid-cell__input--plain[type=number]::-webkit-inner-spin-button,.grid-cell__input--plain[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.grid-cell__input--plain[type=number]{-moz-appearance:textfield}.grid-cell__editor ::ng-deep .text-input{width:100%;min-width:0;box-sizing:border-box}.grid-cell__editor ::ng-deep .select,.grid-cell__editor ::ng-deep .select__trigger{min-width:0;width:100%}.grid-cell__editor ::ng-deep *{max-width:100%}.grid-cell__editor moz-datepicker{width:100%;min-width:0;box-sizing:border-box}.grid-cell__editor ::ng-deep .mc-datepicker,.grid-cell__editor ::ng-deep .mc-text-input{width:100%;min-width:0;box-sizing:border-box;height:28px;font-size:var(--font-size-xs, 12px)}.grid-cell__editor ::ng-deep moz-datepicker label{display:none}.grid-cell>*:not(.grid-cell__fill-handle){position:relative;z-index:1}.grid-cell:before{content:\"\";position:absolute;inset:3px;border-radius:4px;pointer-events:none;z-index:0}.grid-cell:hover:before{background:#f1f3f4}.grid-cell--focused:hover:before,.grid-cell--in-range:hover:before,.grid-cell--in-fill-range:hover:before,.grid-cell--in-fill-reject-range:hover:before{background:transparent}.grid-cell--focused{z-index:2}.grid-cell--focused:after{content:\"\";position:absolute;inset:0;border:2px solid var(--color-background-accent-inverse);border-radius:4px;pointer-events:none}.grid-cell--ref-highlight{z-index:2}.grid-cell--ref-highlight:after{content:\"\";position:absolute;inset:0;border:2px solid var(--moz-grid-ref-color, transparent);border-radius:4px;pointer-events:none;z-index:3}.grid-cell--in-range{background:var(--color-background-accent)}.grid-cell--readonly .grid-cell__value{color:var(--color-text-secondary, #666)}.grid-cell--in-fill-range{background:#34a85314}.grid-cell--in-fill-range:after{content:\"\";position:absolute;inset:0;border:1px dashed var(--color-success, #34a853);border-radius:4px;pointer-events:none}.grid-cell--in-fill-reject-range{background:#ea302d1f;cursor:not-allowed;z-index:2}.grid-cell--in-fill-reject-range:after{content:\"\";position:absolute;inset:0;border:2px dashed var(--Status-Standalone-element-Error, #ea302d);border-radius:4px;pointer-events:none;z-index:3}.grid-cell--cut{background:#1a73e80f}.grid-cell__cut-mark{position:absolute;pointer-events:none;z-index:5;--cut-color: var(--color-background-accent-inverse, #1a73e8)}.grid-cell__cut-mark--top,.grid-cell__cut-mark--bottom{left:0;right:0;height:2px;background-image:linear-gradient(90deg,var(--cut-color) 50%,transparent 50%);background-size:8px 2px;background-repeat:repeat-x;animation:moz-grid-marching-ants-x .5s linear infinite}.grid-cell__cut-mark--top{top:0}.grid-cell__cut-mark--bottom{bottom:0}.grid-cell__cut-mark--left,.grid-cell__cut-mark--right{top:0;bottom:0;width:2px;background-image:linear-gradient(180deg,var(--cut-color) 50%,transparent 50%);background-size:2px 8px;background-repeat:repeat-y;animation:moz-grid-marching-ants-y .5s linear infinite}.grid-cell__cut-mark--left{left:0}.grid-cell__cut-mark--right{right:0}@keyframes moz-grid-marching-ants-x{0%{background-position-x:0}to{background-position-x:8px}}@keyframes moz-grid-marching-ants-y{0%{background-position-y:0}to{background-position-y:8px}}.grid-cell__fill-handle{position:absolute;right:0;bottom:0;width:8px;height:8px;background:var(--color-background-accent-inverse);cursor:crosshair;z-index:4}.grid-cell--error{outline:1px solid var(--Status-Border-Error, #ef5f5c);outline-offset:-2px;z-index:1;border-radius:4px}.grid-cell--error:hover:before{background:transparent}.grid-cell--formula-error .grid-cell__value{color:var(--Status-Text-Error, #d0021b);font-style:italic}.grid-cell__error-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-left:auto;cursor:help;position:relative;z-index:2;fill:var(--Status-Standalone-element-Error, #ea302d)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MozSelectComponent, selector: "moz-select", inputs: ["id", "name", "options", "placeholder", "isInvalid", "disabled", "readonly", "size"] }, { kind: "component", type: MozCheckboxComponent, selector: "moz-checkbox", inputs: ["id", "name", "label", "indeterminate", "isInvalid", "disabled", "indented"] }, { kind: "component", type: MozDatepickerComponent, selector: "moz-datepicker", inputs: ["id", "disabled", "readonly", "invalid", "error", "clearable", "size", "label"] }, { kind: "directive", type: MozTooltipDirective, selector: "[mozTooltip]", inputs: ["mozTooltip", "tooltipPosition", "tooltipNoPointer"] }, { kind: "component", type: ErrorFilled24, selector: "ErrorFilled24", inputs: ["hostClass"] }, { kind: "component", type: MozGridFormulaEditorComponent, selector: "moz-grid-formula-editor", inputs: ["value", "locale", "editingAddr", "disableCellPick"], outputs: ["valueChange", "commit", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13071
13261
|
}
|
|
13072
13262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MozGridCellComponent, decorators: [{
|
|
13073
13263
|
type: Component,
|
|
@@ -15751,6 +15941,7 @@ class MozGridComponent {
|
|
|
15751
15941
|
class="moz-grid__formula-bar-editor"
|
|
15752
15942
|
[value]="formulaBarDraft() ?? ''"
|
|
15753
15943
|
[editingAddr]="formulaBarEditingAddr()"
|
|
15944
|
+
[disableCellPick]="true"
|
|
15754
15945
|
(valueChange)="onFormulaBarEditorChange($event)"
|
|
15755
15946
|
(commit)="onFormulaBarEditorCommit()"
|
|
15756
15947
|
(cancel)="onFormulaBarEditorCancel()"
|
|
@@ -15842,7 +16033,7 @@ class MozGridComponent {
|
|
|
15842
16033
|
/>
|
|
15843
16034
|
</div>
|
|
15844
16035
|
</div>
|
|
15845
|
-
`, isInline: true, styles: [":host{display:block;height:100%;--moz-grid-ref-color-0: #1a73e8;--moz-grid-ref-color-1: #d93025;--moz-grid-ref-color-2: #188038;--moz-grid-ref-color-3: #e37400;--moz-grid-ref-color-4: #8430ce;--moz-grid-ref-color-5: #009e95;--moz-grid-ref-color-6: #c5221f;--moz-grid-ref-color-7: #5f6368}.moz-grid-wrapper{display:flex;flex-direction:column;font-family:var(--font-family-primary);height:100%;min-height:0;gap:16px}.moz-grid-wrapper--fullscreen{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999;background:var(--color-background-primary)}.moz-grid{display:flex;flex-direction:column;border-radius:var(--border-radius-l);overflow:hidden;background:var(--color-background-primary);flex:1;min-height:0;position:relative;box-shadow:0 0 6px #cdd4d8}.moz-grid__empty-overlay{position:absolute;inset:0;top:var(--moz-grid-header-height, 48px);display:flex;align-items:center;justify-content:center;background:var(--Background-Primary, #fff);z-index:1}.moz-grid:focus{outline:none}.moz-grid--loading{opacity:.6;pointer-events:none}.moz-grid__toolbar{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;min-height:48px;gap:var(--spacing-s, 8px)}.moz-grid__toolbar-left,.moz-grid__toolbar-right{display:flex;align-items:center;gap:var(--spacing-xs, 4px)}.moz-grid__toolbar-filter-btn{display:inline-flex;align-items:center;gap:4px}.moz-grid__formula-bar{display:flex;align-items:stretch;flex-shrink:0;height:32px;border:1px solid var(--Border-Primary, #cdd4d8);border-radius:var(--border-radius-s, 4px);background:var(--color-background-primary, #fff);font-family:var(--font-family-monospace, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--font-size-s, 13px);overflow:hidden}.moz-grid__formula-bar-addr{display:flex;align-items:center;justify-content:center;min-width:72px;padding:0 8px;border-right:1px solid var(--Border-Primary, #cdd4d8);color:var(--color-text-primary);font-weight:600;-webkit-user-select:text;user-select:text}.moz-grid__formula-bar-fx{display:flex;align-items:center;justify-content:center;width:32px;border-right:1px solid var(--Border-Primary, #cdd4d8);color:var(--color-text-secondary);font-style:italic;font-weight:500}.moz-grid__formula-bar-content{flex:1;min-width:0;display:flex;align-items:stretch;overflow:hidden}.moz-grid__formula-bar-input{flex:1;min-width:0;padding:0 10px;color:var(--color-text-primary);font:inherit;background:transparent;border:none;outline:none;text-overflow:ellipsis;white-space:nowrap}.moz-grid__formula-bar-input:focus{outline:2px solid var(--color-border-accent, #1a73e8);outline-offset:-2px;border-radius:var(--border-radius-xs, 2px)}.moz-grid__formula-bar-input:disabled{color:var(--color-text-secondary);cursor:not-allowed}.moz-grid__formula-bar-editor{flex:1;min-width:0;display:flex;align-items:stretch}.moz-grid__formula-bar-editor .moz-grid-formula-editor,.moz-grid__formula-bar-editor .moz-grid-formula-editor__input{width:100%;height:100%}.moz-grid__toolbar-filter-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;border-radius:9px;background:var(--Status-Standalone-element-Primary, #0071ce);color:#fff;font-size:11px;font-weight:600;line-height:1}.moz-grid__selection-banner{display:flex;align-items:center;gap:var(--spacing-s, 8px);flex:1;justify-content:center;border-radius:var(--border-radius-s);border:1px solid var(--Border-Primary, #cdd4d8);background:var(--Neutral-Grey-000, #fff)}.moz-grid__selection-text{font-size:var(--font-size-s, 14px);color:var(--color-text-primary);white-space:nowrap}.moz-grid__selection-link{padding:0;border:none;background:transparent;color:var(--color-background-accent-inverse);font-size:var(--font-size-s, 14px);font-weight:600;cursor:pointer;white-space:nowrap;text-decoration:underline}.moz-grid__selection-link:hover{color:var(--color-primary-dark, #1557b0)}.moz-grid__tag-bar{display:flex;align-items:center;flex-wrap:wrap;gap:var(--spacing-xs, 4px);padding:var(--spacing-xxs, 2px) var(--spacing-s, 8px);flex-shrink:0}.moz-grid__tag-bar-label{width:100%;font-size:var(--font-size-xs, 12px);text-transform:uppercase;white-space:nowrap;color:var(--text-icon-tertiary);font-size:var(--Typography-Font-size-Body-XS, 12px);font-weight:400}.moz-grid__tag-action-btn{padding:2px 8px;border:none;background:transparent;color:var(--color-background-accent-inverse);font-size:var(--font-size-xs, 12px);font-weight:600;cursor:pointer}.moz-grid__tag-action-btn:hover{text-decoration:underline}.moz-grid__group-tag-btn{display:inline-flex;align-items:center;gap:2px;padding:0;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;line-height:1}.moz-grid__group-tag-btn ::ng-deep svg{fill:#fff!important;width:16px;height:16px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MozGridHeaderComponent, selector: "moz-grid-header", inputs: ["showCheckbox", "showExpand", "reorderable"], outputs: ["sortClick", "menuAction", "resizeStart", "selectAllToggle", "columnReorder"] }, { kind: "component", type: MozGridBodyComponent, selector: "moz-grid-body", inputs: ["showCheckbox", "showExpand", "detailTemplate"], outputs: ["cellEdit", "cellEditCancel", "rowSelectionToggle", "groupToggle"] }, { kind: "component", type: MozGridFooterComponent, selector: "moz-grid-footer", inputs: ["pageSizeOptions"], outputs: ["pageChange"] }, { kind: "component", type: MozGridLoadingIndicatorComponent, selector: "moz-grid-loading-indicator" }, { kind: "component", type: MozGridSelectionBarComponent, selector: "moz-grid-selection-bar", outputs: ["editClick", "copyClick", "pasteClick", "deleteClick", "exportClick"] }, { kind: "component", type: MozGridEmptyStateComponent, selector: "moz-grid-empty-state", inputs: ["kind", "title", "description", "actionLabel"], outputs: ["action"] }, { kind: "component", type: MozTagComponent, selector: "moz-tag", inputs: ["type", "size", "id", "name", "disabled", "contextualisedNumber", "removableLabel"], outputs: ["removeTag"] }, { kind: "component", type: MozIconButtonComponent, selector: "moz-icon-button", inputs: ["id", "appearance", "size", "disabled", "ghost", "outlined", "type", "ariaLabel"], outputs: ["activated"] }, { kind: "component", type: ViewGridX420, selector: "ViewGridX420", inputs: ["hostClass"] }, { kind: "component", type: Filter20, selector: "Filter20", inputs: ["hostClass"] }, { kind: "component", type: Settings20, selector: "Settings20", inputs: ["hostClass"] }, { kind: "component", type: FullscreenEnter20, selector: "FullscreenEnter20", inputs: ["hostClass"] }, { kind: "component", type: FullscreenExit20, selector: "FullscreenExit20", inputs: ["hostClass"] }, { kind: "component", type: Download20, selector: "Download20", inputs: ["hostClass"] }, { kind: "component", type: ChevronUp20, selector: "ChevronUp20", inputs: ["hostClass"] }, { kind: "component", type: ChevronDown20, selector: "ChevronDown20", inputs: ["hostClass"] }, { kind: "component", type: Keyboard20, selector: "Keyboard20", inputs: ["hostClass"] }, { kind: "component", type: Calculator20, selector: "Calculator20", inputs: ["hostClass"] }, { kind: "component", type: MozButtonComponent, selector: "button[moz-button]", inputs: ["appearance", "size", "disabled", "ghost", "outlined", "iconPosition", "type", "isLoading"] }, { kind: "component", type: MozGridFormulaEditorComponent, selector: "moz-grid-formula-editor", inputs: ["value", "locale", "editingAddr"], outputs: ["valueChange", "commit", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16036
|
+
`, isInline: true, styles: [":host{display:block;height:100%;--moz-grid-ref-color-0: #1a73e8;--moz-grid-ref-color-1: #d93025;--moz-grid-ref-color-2: #188038;--moz-grid-ref-color-3: #e37400;--moz-grid-ref-color-4: #8430ce;--moz-grid-ref-color-5: #009e95;--moz-grid-ref-color-6: #c5221f;--moz-grid-ref-color-7: #5f6368}.moz-grid-wrapper{display:flex;flex-direction:column;font-family:var(--font-family-primary);height:100%;min-height:0;gap:16px}.moz-grid-wrapper--fullscreen{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999;background:var(--color-background-primary)}.moz-grid{display:flex;flex-direction:column;border-radius:var(--border-radius-l);overflow:hidden;background:var(--color-background-primary);flex:1;min-height:0;position:relative;box-shadow:0 0 6px #cdd4d8}.moz-grid__empty-overlay{position:absolute;inset:0;top:var(--moz-grid-header-height, 48px);display:flex;align-items:center;justify-content:center;background:var(--Background-Primary, #fff);z-index:1}.moz-grid:focus{outline:none}.moz-grid--loading{opacity:.6;pointer-events:none}.moz-grid__toolbar{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;min-height:48px;gap:var(--spacing-s, 8px)}.moz-grid__toolbar-left,.moz-grid__toolbar-right{display:flex;align-items:center;gap:var(--spacing-xs, 4px)}.moz-grid__toolbar-filter-btn{display:inline-flex;align-items:center;gap:4px}.moz-grid__formula-bar{display:flex;align-items:stretch;flex-shrink:0;height:32px;border:1px solid var(--Border-Primary, #cdd4d8);border-radius:var(--border-radius-s, 4px);background:var(--color-background-primary, #fff);font-family:var(--font-family-monospace, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--font-size-s, 13px);overflow:hidden}.moz-grid__formula-bar-addr{display:flex;align-items:center;justify-content:center;min-width:72px;padding:0 8px;border-right:1px solid var(--Border-Primary, #cdd4d8);color:var(--color-text-primary);font-weight:600;-webkit-user-select:text;user-select:text}.moz-grid__formula-bar-fx{display:flex;align-items:center;justify-content:center;width:32px;border-right:1px solid var(--Border-Primary, #cdd4d8);color:var(--color-text-secondary);font-style:italic;font-weight:500}.moz-grid__formula-bar-content{flex:1;min-width:0;display:flex;align-items:stretch;overflow:hidden}.moz-grid__formula-bar-input{flex:1;min-width:0;padding:0 10px;color:var(--color-text-primary);font:inherit;background:transparent;border:none;outline:none;text-overflow:ellipsis;white-space:nowrap}.moz-grid__formula-bar-input:focus{outline:2px solid var(--color-border-accent, #1a73e8);outline-offset:-2px;border-radius:var(--border-radius-xs, 2px)}.moz-grid__formula-bar-input:disabled{color:var(--color-text-secondary);cursor:not-allowed}.moz-grid__formula-bar-editor{flex:1;min-width:0;display:flex;align-items:stretch}.moz-grid__formula-bar-editor .moz-grid-formula-editor,.moz-grid__formula-bar-editor .moz-grid-formula-editor__input{width:100%;height:100%}.moz-grid__toolbar-filter-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;border-radius:9px;background:var(--Status-Standalone-element-Primary, #0071ce);color:#fff;font-size:11px;font-weight:600;line-height:1}.moz-grid__selection-banner{display:flex;align-items:center;gap:var(--spacing-s, 8px);flex:1;justify-content:center;border-radius:var(--border-radius-s);border:1px solid var(--Border-Primary, #cdd4d8);background:var(--Neutral-Grey-000, #fff)}.moz-grid__selection-text{font-size:var(--font-size-s, 14px);color:var(--color-text-primary);white-space:nowrap}.moz-grid__selection-link{padding:0;border:none;background:transparent;color:var(--color-background-accent-inverse);font-size:var(--font-size-s, 14px);font-weight:600;cursor:pointer;white-space:nowrap;text-decoration:underline}.moz-grid__selection-link:hover{color:var(--color-primary-dark, #1557b0)}.moz-grid__tag-bar{display:flex;align-items:center;flex-wrap:wrap;gap:var(--spacing-xs, 4px);padding:var(--spacing-xxs, 2px) var(--spacing-s, 8px);flex-shrink:0}.moz-grid__tag-bar-label{width:100%;font-size:var(--font-size-xs, 12px);text-transform:uppercase;white-space:nowrap;color:var(--text-icon-tertiary);font-size:var(--Typography-Font-size-Body-XS, 12px);font-weight:400}.moz-grid__tag-action-btn{padding:2px 8px;border:none;background:transparent;color:var(--color-background-accent-inverse);font-size:var(--font-size-xs, 12px);font-weight:600;cursor:pointer}.moz-grid__tag-action-btn:hover{text-decoration:underline}.moz-grid__group-tag-btn{display:inline-flex;align-items:center;gap:2px;padding:0;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;line-height:1}.moz-grid__group-tag-btn ::ng-deep svg{fill:#fff!important;width:16px;height:16px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MozGridHeaderComponent, selector: "moz-grid-header", inputs: ["showCheckbox", "showExpand", "reorderable"], outputs: ["sortClick", "menuAction", "resizeStart", "selectAllToggle", "columnReorder"] }, { kind: "component", type: MozGridBodyComponent, selector: "moz-grid-body", inputs: ["showCheckbox", "showExpand", "detailTemplate"], outputs: ["cellEdit", "cellEditCancel", "rowSelectionToggle", "groupToggle"] }, { kind: "component", type: MozGridFooterComponent, selector: "moz-grid-footer", inputs: ["pageSizeOptions"], outputs: ["pageChange"] }, { kind: "component", type: MozGridLoadingIndicatorComponent, selector: "moz-grid-loading-indicator" }, { kind: "component", type: MozGridSelectionBarComponent, selector: "moz-grid-selection-bar", outputs: ["editClick", "copyClick", "pasteClick", "deleteClick", "exportClick"] }, { kind: "component", type: MozGridEmptyStateComponent, selector: "moz-grid-empty-state", inputs: ["kind", "title", "description", "actionLabel"], outputs: ["action"] }, { kind: "component", type: MozTagComponent, selector: "moz-tag", inputs: ["type", "size", "id", "name", "disabled", "contextualisedNumber", "removableLabel"], outputs: ["removeTag"] }, { kind: "component", type: MozIconButtonComponent, selector: "moz-icon-button", inputs: ["id", "appearance", "size", "disabled", "ghost", "outlined", "type", "ariaLabel"], outputs: ["activated"] }, { kind: "component", type: ViewGridX420, selector: "ViewGridX420", inputs: ["hostClass"] }, { kind: "component", type: Filter20, selector: "Filter20", inputs: ["hostClass"] }, { kind: "component", type: Settings20, selector: "Settings20", inputs: ["hostClass"] }, { kind: "component", type: FullscreenEnter20, selector: "FullscreenEnter20", inputs: ["hostClass"] }, { kind: "component", type: FullscreenExit20, selector: "FullscreenExit20", inputs: ["hostClass"] }, { kind: "component", type: Download20, selector: "Download20", inputs: ["hostClass"] }, { kind: "component", type: ChevronUp20, selector: "ChevronUp20", inputs: ["hostClass"] }, { kind: "component", type: ChevronDown20, selector: "ChevronDown20", inputs: ["hostClass"] }, { kind: "component", type: Keyboard20, selector: "Keyboard20", inputs: ["hostClass"] }, { kind: "component", type: Calculator20, selector: "Calculator20", inputs: ["hostClass"] }, { kind: "component", type: MozButtonComponent, selector: "button[moz-button]", inputs: ["appearance", "size", "disabled", "ghost", "outlined", "iconPosition", "type", "isLoading"] }, { kind: "component", type: MozGridFormulaEditorComponent, selector: "moz-grid-formula-editor", inputs: ["value", "locale", "editingAddr", "disableCellPick"], outputs: ["valueChange", "commit", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15846
16037
|
}
|
|
15847
16038
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MozGridComponent, decorators: [{
|
|
15848
16039
|
type: Component,
|
|
@@ -16093,6 +16284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
16093
16284
|
class="moz-grid__formula-bar-editor"
|
|
16094
16285
|
[value]="formulaBarDraft() ?? ''"
|
|
16095
16286
|
[editingAddr]="formulaBarEditingAddr()"
|
|
16287
|
+
[disableCellPick]="true"
|
|
16096
16288
|
(valueChange)="onFormulaBarEditorChange($event)"
|
|
16097
16289
|
(commit)="onFormulaBarEditorCommit()"
|
|
16098
16290
|
(cancel)="onFormulaBarEditorCancel()"
|
|
@@ -16399,6 +16591,13 @@ class MozComboboxComponent {
|
|
|
16399
16591
|
clearable = input(false, ...(ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []));
|
|
16400
16592
|
/** Show a search/filter input inside the dropdown */
|
|
16401
16593
|
searchable = input(false, ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
16594
|
+
/**
|
|
16595
|
+
* When true, the search query is split on spaces/commas and each term is
|
|
16596
|
+
* matched independently (e.g. "red shoe" matches labels containing either
|
|
16597
|
+
* "red" or "shoe"). When false, the query is matched as a single substring
|
|
16598
|
+
* so users can search for multi-word labels like "Item 1".
|
|
16599
|
+
*/
|
|
16600
|
+
multiSearch = input(false, ...(ngDevMode ? [{ debugName: "multiSearch" }] : /* istanbul ignore next */ []));
|
|
16402
16601
|
/** Show "Select all / Clear" action buttons (multiple only) */
|
|
16403
16602
|
showActions = input(false, ...(ngDevMode ? [{ debugName: "showActions" }] : /* istanbul ignore next */ []));
|
|
16404
16603
|
/** Whether the component is in a loading state (e.g. async data) */
|
|
@@ -16507,10 +16706,12 @@ class MozComboboxComponent {
|
|
|
16507
16706
|
if (!query)
|
|
16508
16707
|
return this.flatItems();
|
|
16509
16708
|
const flat = this.flatItems();
|
|
16510
|
-
const parts =
|
|
16511
|
-
|
|
16512
|
-
|
|
16513
|
-
|
|
16709
|
+
const parts = this.multiSearch()
|
|
16710
|
+
? query
|
|
16711
|
+
.split(/[,\s]+/)
|
|
16712
|
+
.map((s) => s.toLowerCase().trim())
|
|
16713
|
+
.filter(Boolean)
|
|
16714
|
+
: [query.toLowerCase()];
|
|
16514
16715
|
// Find which section titles have matching children
|
|
16515
16716
|
const matchingSections = new Set();
|
|
16516
16717
|
for (const item of flat) {
|
|
@@ -16965,13 +17166,13 @@ class MozComboboxComponent {
|
|
|
16965
17166
|
}
|
|
16966
17167
|
}
|
|
16967
17168
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MozComboboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16968
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: MozComboboxComponent, isStandalone: true, selector: "moz-combobox", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, selectAllText: { classPropertyName: "selectAllText", publicName: "selectAllText", isSignal: true, isRequired: false, transformFunction: null }, clearText: { classPropertyName: "clearText", publicName: "clearText", isSignal: true, isRequired: false, transformFunction: null }, selectedSuffix: { classPropertyName: "selectedSuffix", publicName: "selectedSuffix", isSignal: true, isRequired: false, transformFunction: null }, clearAriaLabel: { classPropertyName: "clearAriaLabel", publicName: "clearAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, showNoResultText: { classPropertyName: "showNoResultText", publicName: "showNoResultText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", opened: "opened", closed: "closed", searched: "searched" }, providers: [
|
|
17169
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: MozComboboxComponent, isStandalone: true, selector: "moz-combobox", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, multiSearch: { classPropertyName: "multiSearch", publicName: "multiSearch", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, selectAllText: { classPropertyName: "selectAllText", publicName: "selectAllText", isSignal: true, isRequired: false, transformFunction: null }, clearText: { classPropertyName: "clearText", publicName: "clearText", isSignal: true, isRequired: false, transformFunction: null }, selectedSuffix: { classPropertyName: "selectedSuffix", publicName: "selectedSuffix", isSignal: true, isRequired: false, transformFunction: null }, clearAriaLabel: { classPropertyName: "clearAriaLabel", publicName: "clearAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, showNoResultText: { classPropertyName: "showNoResultText", publicName: "showNoResultText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", opened: "opened", closed: "closed", searched: "searched" }, providers: [
|
|
16969
17170
|
{
|
|
16970
17171
|
provide: NG_VALUE_ACCESSOR,
|
|
16971
17172
|
useExisting: forwardRef(() => MozComboboxComponent),
|
|
16972
17173
|
multi: true,
|
|
16973
17174
|
},
|
|
16974
|
-
], viewQueries: [{ propertyName: "triggerEl", first: true, predicate: ["triggerBtn"], descendants: true, isSignal: true }, { propertyName: "viewportEl", first: true, predicate: ["viewport"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- ====================================================================== -->\n<!-- TRIGGER -->\n<!-- ====================================================================== -->\n<div [class]=\"wrapperClasses()\">\n <div class=\"mc-combobox__input\">\n <button\n #triggerBtn\n type=\"button\"\n class=\"mc-combobox__control\"\n role=\"combobox\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n [disabled]=\"isEffectivelyDisabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? comboboxId + '-opt-' + focusedIndex() : null\n \"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-invalid]=\"invalid() || null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (displayValue()) {\n <span class=\"mc-combobox__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"mc-combobox__placeholder\">{{ placeholder() }}</span>\n }\n </button>\n\n <!-- Counter (compact + multiple) -->\n @if (multiple() && compact() && selectedCount() > 0) {\n <span class=\"mc-combobox__counter\" aria-live=\"polite\">\n {{ selectedCount() }} {{ selectedSuffix() }}\n </span>\n }\n\n <!-- Clear button -->\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"mc-combobox__clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClear($event)\"\n >\n <CrossCircleFilled24 />\n </button>\n }\n\n <!-- Trigger loader -->\n @if (loading()) {\n <moz-loader size=\"s\" [appearance]=\"'accent'\" class=\"mc-combobox__loader\" />\n }\n\n <!-- Chevron -->\n <button\n type=\"button\"\n class=\"mc-combobox__icon\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggle()\"\n >\n <ChevronDown24 />\n </button>\n </div>\n</div>\n\n<!-- ====================================================================== -->\n<!-- OVERLAY / DROPDOWN -->\n<!-- ====================================================================== -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"mc-combobox-backdrop\"\n (backdropClick)=\"onOverlayOutsideClick()\"\n (attach)=\"onOverlayAttached()\"\n>\n <div\n class=\"mc-option-listbox mc-listbox__content mc-combobox__listbox\"\n (keydown)=\"onPanelKeydown($event)\"\n >\n <!-- Search -->\n @if (searchable()) {\n <div class=\"mc-option-listbox__search\">\n <Search24 icon />\n <input\n #searchInput\n moz-text-input\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n [size]=\"'s'\"\n />\n </div>\n <hr class=\"mc-option-listbox__separator\" />\n }\n\n <!-- Actions (multiple only) -->\n @if (showActions() && multiple()) {\n <div class=\"mc-option-listbox__actions\">\n <button\n moz-button\n type=\"button\"\n [size]=\"'s'\"\n [ghost]=\"true\"\n [appearance]=\"'accent'\"\n (click)=\"selectAll()\"\n >\n {{ selectAllText() }}\n </button>\n <button moz-button type=\"button\" [size]=\"'s'\" [ghost]=\"true\" (click)=\"clearSelection()\">\n {{ clearText() }}\n </button>\n </div>\n <hr class=\"mc-option-listbox__separator\" />\n }\n\n <!-- Listbox with virtual scroll -->\n <div\n #listbox\n role=\"listbox\"\n [id]=\"listboxId\"\n class=\"mc-option-listbox__list mc-combobox__virtual-host\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n [attr.aria-label]=\"ariaLabel() ?? 'Options'\"\n [attr.aria-busy]=\"loading() || null\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? comboboxId + '-opt-' + focusedIndex() : null\n \"\n tabindex=\"-1\"\n >\n @if (loading()) {\n <div class=\"mc-combobox__loading\" role=\"status\">\n <moz-loader size=\"s\" [appearance]=\"'accent'\" [text]=\"loadingText()\" />\n </div>\n } @else if (filteredItems().length === 0 && showNoResultText() && searchQuery().length > 0) {\n <div class=\"mc-option-listbox__empty\" role=\"presentation\" aria-live=\"polite\">\n {{ noResultsText() }}\n </div>\n } @else {\n <cdk-virtual-scroll-viewport\n #viewport\n [itemSize]=\"itemSizePx\"\n [style.height.px]=\"viewportHeight()\"\n class=\"mc-combobox__viewport\"\n >\n <ng-container\n *cdkVirtualFor=\"let item of filteredItems(); let i = index; trackBy: trackByFlatItem\"\n >\n <!-- Section header -->\n @if (isFlatSection(item)) {\n <div\n class=\"mc-option-listbox__item mc-option-listbox__item--section\"\n [class.mc-option-listbox__item--selectable]=\"item.checkable && multiple()\"\n [class.mc-option-listbox__item--selected]=\"\n item.checkable &&\n multiple() &&\n (isSectionFullySelected(item.title) || isSectionPartiallySelected(item.title))\n \"\n role=\"presentation\"\n (click)=\"item.checkable && multiple() ? toggleSection(item.title) : null\"\n >\n <div class=\"mc-option-listbox__label\">\n <div class=\"mc-option-listbox__content\">\n <span class=\"mc-option-listbox__section-title\">{{ item.title }}</span>\n </div>\n <div class=\"mc-option-listbox__spacer\"></div>\n @if (item.checkable && multiple()) {\n <moz-checkbox\n class=\"mc-option-listbox__checkbox\"\n [id]=\"comboboxId + '-section-cb-' + i\"\n [ngModel]=\"isSectionFullySelected(item.title)\"\n [indeterminate]=\"isSectionPartiallySelected(item.title)\"\n />\n }\n </div>\n </div>\n }\n\n <!-- Option -->\n @if (isFlatOption(item)) {\n <div\n role=\"option\"\n [id]=\"comboboxId + '-opt-' + i\"\n [attr.aria-selected]=\"isOptionSelected($any(item.value))\"\n [attr.aria-disabled]=\"item.disabled || null\"\n class=\"mc-option-listbox__item\"\n [class.mc-option-listbox__item--selectable]=\"!item.disabled\"\n [class.mc-option-listbox__item--disabled]=\"item.disabled\"\n [class.mc-option-listbox__item--selected]=\"isOptionSelected($any(item.value))\"\n [class.mc-option-listbox__item--active]=\"focusedIndex() === i\"\n (click)=\"!item.disabled && selectOption($any(item.value))\"\n (mouseenter)=\"focusedIndex.set(i)\"\n >\n <div class=\"mc-option-listbox__label\">\n @if (item.icon) {\n <div class=\"mc-option-listbox__prepend\">\n <span class=\"mc-option-listbox__icon\">{{ item.icon }}</span>\n </div>\n }\n <div class=\"mc-option-listbox__content\">\n <span class=\"mc-option-listbox__text\">{{ item.label }}</span>\n @if (item.content) {\n <span class=\"mc-option-listbox__additional\">{{ item.content }}</span>\n }\n </div>\n <div class=\"mc-option-listbox__spacer\"></div>\n\n <!-- Selection indicator -->\n @if (multiple()) {\n <moz-checkbox\n class=\"mc-option-listbox__checkbox\"\n [id]=\"comboboxId + '-cb-' + i\"\n [ngModel]=\"isOptionSelected($any(item.value))\"\n />\n } @else {\n <CheckCircle24 class=\"mc-option-listbox__selection-icon\" />\n }\n </div>\n </div>\n }\n </ng-container>\n </cdk-virtual-scroll-viewport>\n }\n </div>\n </div>\n</ng-template>\n", styles: [".mc-combobox{position:relative;width:18.75rem}.mc-combobox__input{transition:box-shadow .2s ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-s, .0625rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, .25rem);transition:all ease .2s;color:var(--forms-color-text-default, #000000);display:block;width:100%;display:flex;align-items:center;gap:.5rem;box-sizing:border-box}.mc-combobox__input:focus-within{box-shadow:0 0 0 .125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)),0 0 0 .25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:.125rem solid transparent;outline-offset:.125rem}.mc-combobox__input:hover:not(:focus-within){border-color:var(--forms-color-border-hover, #4d4d4d);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-hover, #4d4d4d)}.mc-combobox__input:has(.mc-combobox__control:disabled){background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none}.mc-combobox__input .mc-combobox__control{text-align:left;font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-regular, 400);color:var(--forms-color-text-default, #000000);background-color:transparent;border:none;padding-left:.75rem;padding-right:0;flex-grow:1;height:3rem;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-combobox__input .mc-combobox__control:focus-within{outline:none}.mc-combobox__icon{border:none;display:flex;align-items:center;cursor:pointer;padding-right:.75rem;background:none;color:var(--forms-color-icon-interactive, #000000);fill:currentcolor}.mc-combobox__clear{padding:0;display:flex;align-items:center;justify-content:center;border:none;background:none;cursor:pointer;color:var(--forms-color-icon-clear, #666666);fill:currentcolor}.mc-combobox__counter{height:1.5rem;display:flex;flex-shrink:0;align-items:center;justify-content:center;padding:0 .5rem;border-radius:var(--border-radius-l, 1rem);background-color:var(--forms-color-selection-counter-background, #464e63);font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-50, .75rem);line-height:var(--line-height-s, 1.3);color:var(--forms-color-selection-counter-text, #ffffff)}.mc-combobox__listbox{position:absolute;left:0;top:calc(100% + .25rem);visibility:hidden;opacity:0;box-shadow:var(--shadow-bottom-s-x, 0px) var(--shadow-bottom-s-y, 5px) var(--shadow-bottom-s-blur, 10px) var(--shadow-bottom-s-spread, -2px) rgba(0,0,0,var(--shadow-bottom-s-opacity, 20%));border:var(--border-width-s, .0625rem) solid var(--color-border-primary, #cccccc);border-radius:var(--border-radius-m, .5rem);width:100%;z-index:10;background-color:var(--color-background-primary, #ffffff);pointer-events:all}.mc-combobox--open .mc-combobox__listbox{visibility:visible;opacity:1}.mc-combobox--s .mc-combobox__control{height:2rem;font-size:var(--font-size-100, .875rem);padding-left:.5rem}.mc-combobox--s .mc-combobox__icon{padding-right:.5rem}.mc-combobox--s .mc-combobox__clear{width:1.25rem;height:1.25rem}.mc-combobox--invalid .mc-combobox__input{border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-invalid, #ea302d)}.mc-combobox--invalid .mc-combobox__input:hover:not(:focus-within){border-color:var(--forms-color-border-invalid-hover, #c61112);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-invalid-hover, #c61112)}.mc-combobox--disabled .mc-combobox__input{background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none}.mc-combobox--disabled .mc-combobox__control{color:var(--forms-color-text-disabled, #737373)}.mc-combobox--disabled .mc-combobox__icon{color:var(--forms-color-icon-disabled, #737373)}.mc-combobox--readonly .mc-combobox__input{border-color:var(--forms-color-border-read-only, #cccccc);pointer-events:none}.mc-option-listbox__list{overflow:auto;display:flex;flex-direction:column;gap:.125rem;margin:0;padding:.5rem;max-height:18.75rem}.mc-option-listbox__item{display:block;border-radius:var(--border-radius-s, .25rem)}.mc-option-listbox__item--disabled{color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__label{pointer-events:none;color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__additional{color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__checkbox{border:none;background-color:var(--forms-color-background-disabled, #d9d9d9)}.mc-option-listbox__item--readonly .mc-option-listbox__label{pointer-events:none}.mc-option-listbox__item--selected:not(.mc-option-listbox__item--section){background-color:var(--option-listbox-color-background-checked, #ebf5de)}.mc-option-listbox__item--selected .mc-option-listbox__selection-icon{opacity:1;color:var(--option-listbox-color-selection-indicator-default, #117f03);fill:currentcolor}.mc-option-listbox__item--selected .mc-option-listbox__checkbox{border:none;background-color:var(--forms-color-background-checked, #117f03);color:var(--forms-color-icon-inverse, #ffffff);fill:currentcolor}.mc-option-listbox__item--selected .mc-option-listbox__checkbox svg{display:block}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected{background-color:var(--option-listbox-color-background-checked-read-only, #eff1f6)}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected .mc-option-listbox__selection-icon{color:var(--option-listbox-color-selection-indicator-read-only, #000000)}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected .mc-option-listbox__checkbox{border:2px solid var(--forms-color-border-read-only, #cccccc);background-color:var(--forms-color-background-default, #ffffff);color:var(--option-listbox-color-selection-indicator-read-only, #000000)}.mc-option-listbox__item--selectable{cursor:pointer}.mc-option-listbox__item--selectable:not(.mc-option-listbox__item--disabled):hover,.mc-option-listbox__item--selectable:not(.mc-option-listbox__item--disabled).mc-option-listbox__item--active{background-color:var(--option-listbox-color-background-hover, rgba(0, 0, 0, .05))}.mc-option-listbox__content{display:flex;flex-direction:column;gap:.125rem}.mc-option-listbox__additional{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-50, .75rem);color:var(--option-listbox-color-text-information, #666666)}.mc-option-listbox__label{display:flex;align-items:center;gap:.5rem;height:3rem;padding:.5rem;border-radius:var(--border-radius-s, .25rem);line-height:var(--line-height-s, 1.3);box-sizing:border-box}.mc-option-listbox__checkbox{display:flex;align-items:center;justify-content:center;height:1.25rem;width:1.25rem;border:.125rem solid var(--forms-color-border-default, #666666);border-radius:.25rem;box-sizing:border-box}.mc-option-listbox__checkbox svg{display:none}.mc-option-listbox__spacer{flex-grow:1}.mc-option-listbox__selection-icon{opacity:0}.mc-option-listbox__section-title{font-size:var(--font-size-100, .875rem);font-weight:var(--font-weight-semi-bold, 600);margin:0;color:var(--option-listbox-color-text-section-title, #666666)}.mc-option-listbox__search{margin:.5rem;width:unset}.mc-option-listbox__separator{display:block;height:1px;border:0;border-top:1px solid var(--color-border-primary, #cccccc);margin:0;padding:0}.mc-option-listbox__actions{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem}.mc-combobox__virtual-host{overflow:hidden;max-height:none;padding:0}.mc-combobox__viewport,.mc-combobox__viewport .cdk-virtual-scroll-content-wrapper{width:100%}.mc-combobox__loader{display:flex;align-items:center;padding-inline:4px}.mc-combobox__loading,.mc-option-listbox__empty{display:flex;align-items:center;justify-content:center;padding:24px 16px}\n"], dependencies: [{ kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: MozLoaderComponent, selector: "moz-loader", inputs: ["appearance", "size", "text"] }, { kind: "component", type: MozButtonComponent, selector: "button[moz-button]", inputs: ["appearance", "size", "disabled", "ghost", "outlined", "iconPosition", "type", "isLoading"] }, { kind: "component", type: CrossCircleFilled24, selector: "CrossCircleFilled24", inputs: ["hostClass"] }, { kind: "component", type: ChevronDown24, selector: "ChevronDown24", inputs: ["hostClass"] }, { kind: "component", type: Search24, selector: "Search24", inputs: ["hostClass"] }, { kind: "component", type: MozTextInput, selector: "input[moz-text-input]", inputs: ["isInvalid", "disabled", "readonly", "size", "clearable", "clearLabel", "prefix", "suffix"] }, { kind: "component", type: MozCheckboxComponent, selector: "moz-checkbox", inputs: ["id", "name", "label", "indeterminate", "isInvalid", "disabled", "indented"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CheckCircle24, selector: "CheckCircle24", inputs: ["hostClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17175
|
+
], viewQueries: [{ propertyName: "triggerEl", first: true, predicate: ["triggerBtn"], descendants: true, isSignal: true }, { propertyName: "viewportEl", first: true, predicate: ["viewport"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- ====================================================================== -->\n<!-- TRIGGER -->\n<!-- ====================================================================== -->\n<div [class]=\"wrapperClasses()\">\n <div class=\"mc-combobox__input\">\n <button\n #triggerBtn\n type=\"button\"\n class=\"mc-combobox__control\"\n role=\"combobox\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n [disabled]=\"isEffectivelyDisabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? comboboxId + '-opt-' + focusedIndex() : null\n \"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-invalid]=\"invalid() || null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (displayValue()) {\n <span class=\"mc-combobox__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"mc-combobox__placeholder\">{{ placeholder() }}</span>\n }\n </button>\n\n <!-- Counter (compact + multiple) -->\n @if (multiple() && compact() && selectedCount() > 0) {\n <span class=\"mc-combobox__counter\" aria-live=\"polite\">\n {{ selectedCount() }} {{ selectedSuffix() }}\n </span>\n }\n\n <!-- Clear button -->\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"mc-combobox__clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClear($event)\"\n >\n <CrossCircleFilled24 />\n </button>\n }\n\n <!-- Trigger loader -->\n @if (loading()) {\n <moz-loader size=\"s\" [appearance]=\"'accent'\" class=\"mc-combobox__loader\" />\n }\n\n <!-- Chevron -->\n <button\n type=\"button\"\n class=\"mc-combobox__icon\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggle()\"\n >\n <ChevronDown24 />\n </button>\n </div>\n</div>\n\n<!-- ====================================================================== -->\n<!-- OVERLAY / DROPDOWN -->\n<!-- ====================================================================== -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"mc-combobox-backdrop\"\n (backdropClick)=\"onOverlayOutsideClick()\"\n (attach)=\"onOverlayAttached()\"\n>\n <div\n class=\"mc-option-listbox mc-listbox__content mc-combobox__listbox\"\n (keydown)=\"onPanelKeydown($event)\"\n >\n <!-- Search -->\n @if (searchable()) {\n <div class=\"mc-option-listbox__search\">\n <Search24 icon />\n <input\n #searchInput\n moz-text-input\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n [size]=\"'s'\"\n />\n </div>\n <hr class=\"mc-option-listbox__separator\" />\n }\n\n <!-- Actions (multiple only) -->\n @if (showActions() && multiple()) {\n <div class=\"mc-option-listbox__actions\">\n <button\n moz-button\n type=\"button\"\n [size]=\"'s'\"\n [ghost]=\"true\"\n [appearance]=\"'accent'\"\n (click)=\"selectAll()\"\n >\n {{ selectAllText() }}\n </button>\n <button moz-button type=\"button\" [size]=\"'s'\" [ghost]=\"true\" (click)=\"clearSelection()\">\n {{ clearText() }}\n </button>\n </div>\n <hr class=\"mc-option-listbox__separator\" />\n }\n\n <!-- Listbox with virtual scroll -->\n <div\n #listbox\n role=\"listbox\"\n [id]=\"listboxId\"\n class=\"mc-option-listbox__list mc-combobox__virtual-host\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n [attr.aria-label]=\"ariaLabel() ?? 'Options'\"\n [attr.aria-busy]=\"loading() || null\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? comboboxId + '-opt-' + focusedIndex() : null\n \"\n tabindex=\"-1\"\n >\n @if (loading()) {\n <div class=\"mc-combobox__loading\" role=\"status\">\n <moz-loader size=\"s\" [appearance]=\"'accent'\" [text]=\"loadingText()\" />\n </div>\n } @else if (filteredItems().length === 0 && showNoResultText() && searchQuery().length > 0) {\n <div class=\"mc-option-listbox__empty\" role=\"presentation\" aria-live=\"polite\">\n {{ noResultsText() }}\n </div>\n } @else {\n <cdk-virtual-scroll-viewport\n #viewport\n [itemSize]=\"itemSizePx\"\n [style.height.px]=\"viewportHeight()\"\n class=\"mc-combobox__viewport\"\n >\n <ng-container\n *cdkVirtualFor=\"let item of filteredItems(); let i = index; trackBy: trackByFlatItem\"\n >\n <!-- Section header -->\n @if (isFlatSection(item)) {\n <div\n class=\"mc-option-listbox__item mc-option-listbox__item--section\"\n [class.mc-option-listbox__item--selectable]=\"item.checkable && multiple()\"\n [class.mc-option-listbox__item--selected]=\"\n item.checkable &&\n multiple() &&\n (isSectionFullySelected(item.title) || isSectionPartiallySelected(item.title))\n \"\n role=\"presentation\"\n (click)=\"item.checkable && multiple() ? toggleSection(item.title) : null\"\n >\n <div class=\"mc-option-listbox__label\">\n <div class=\"mc-option-listbox__content\">\n <span class=\"mc-option-listbox__section-title\">{{ item.title }}</span>\n </div>\n <div class=\"mc-option-listbox__spacer\"></div>\n @if (item.checkable && multiple()) {\n <moz-checkbox\n class=\"mc-option-listbox__checkbox\"\n [id]=\"comboboxId + '-section-cb-' + i\"\n [ngModel]=\"isSectionFullySelected(item.title)\"\n [indeterminate]=\"isSectionPartiallySelected(item.title)\"\n />\n }\n </div>\n </div>\n }\n\n <!-- Option -->\n @if (isFlatOption(item)) {\n <div\n role=\"option\"\n [id]=\"comboboxId + '-opt-' + i\"\n [attr.aria-selected]=\"isOptionSelected($any(item.value))\"\n [attr.aria-disabled]=\"item.disabled || null\"\n class=\"mc-option-listbox__item\"\n [class.mc-option-listbox__item--selectable]=\"!item.disabled\"\n [class.mc-option-listbox__item--disabled]=\"item.disabled\"\n [class.mc-option-listbox__item--selected]=\"isOptionSelected($any(item.value))\"\n [class.mc-option-listbox__item--active]=\"focusedIndex() === i\"\n (click)=\"!item.disabled && selectOption($any(item.value))\"\n (mouseenter)=\"focusedIndex.set(i)\"\n >\n <div class=\"mc-option-listbox__label\">\n @if (item.icon) {\n <div class=\"mc-option-listbox__prepend\">\n <span class=\"mc-option-listbox__icon\">{{ item.icon }}</span>\n </div>\n }\n <div class=\"mc-option-listbox__content\">\n <span class=\"mc-option-listbox__text\">{{ item.label }}</span>\n @if (item.content) {\n <span class=\"mc-option-listbox__additional\">{{ item.content }}</span>\n }\n </div>\n <div class=\"mc-option-listbox__spacer\"></div>\n\n <!-- Selection indicator -->\n @if (multiple()) {\n <moz-checkbox\n class=\"mc-option-listbox__checkbox\"\n [id]=\"comboboxId + '-cb-' + i\"\n [ngModel]=\"isOptionSelected($any(item.value))\"\n [disabled]=\"!!item.disabled\"\n />\n } @else {\n <CheckCircle24 class=\"mc-option-listbox__selection-icon\" />\n }\n </div>\n </div>\n }\n </ng-container>\n </cdk-virtual-scroll-viewport>\n }\n </div>\n </div>\n</ng-template>\n", styles: [".mc-combobox{position:relative;width:18.75rem}.mc-combobox__input{transition:box-shadow .2s ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-s, .0625rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, .25rem);transition:all ease .2s;color:var(--forms-color-text-default, #000000);display:block;width:100%;display:flex;align-items:center;gap:.5rem;box-sizing:border-box}.mc-combobox__input:focus-within{box-shadow:0 0 0 .125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)),0 0 0 .25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:.125rem solid transparent;outline-offset:.125rem}.mc-combobox__input:hover:not(:focus-within){border-color:var(--forms-color-border-hover, #4d4d4d);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-hover, #4d4d4d)}.mc-combobox__input:has(.mc-combobox__control:disabled){background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none}.mc-combobox__input .mc-combobox__control{text-align:left;font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-regular, 400);color:var(--forms-color-text-default, #000000);background-color:transparent;border:none;padding-left:.75rem;padding-right:0;flex-grow:1;height:3rem;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-combobox__input .mc-combobox__control:focus-within{outline:none}.mc-combobox__icon{border:none;display:flex;align-items:center;cursor:pointer;padding-right:.75rem;background:none;color:var(--forms-color-icon-interactive, #000000);fill:currentcolor}.mc-combobox__clear{padding:0;display:flex;align-items:center;justify-content:center;border:none;background:none;cursor:pointer;color:var(--forms-color-icon-clear, #666666);fill:currentcolor}.mc-combobox__counter{height:1.5rem;display:flex;flex-shrink:0;align-items:center;justify-content:center;padding:0 .5rem;border-radius:var(--border-radius-l, 1rem);background-color:var(--forms-color-selection-counter-background, #464e63);font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-50, .75rem);line-height:var(--line-height-s, 1.3);color:var(--forms-color-selection-counter-text, #ffffff)}.mc-combobox__listbox{position:absolute;left:0;top:calc(100% + .25rem);visibility:hidden;opacity:0;box-shadow:var(--shadow-bottom-s-x, 0px) var(--shadow-bottom-s-y, 5px) var(--shadow-bottom-s-blur, 10px) var(--shadow-bottom-s-spread, -2px) rgba(0,0,0,var(--shadow-bottom-s-opacity, 20%));border:var(--border-width-s, .0625rem) solid var(--color-border-primary, #cccccc);border-radius:var(--border-radius-m, .5rem);width:100%;z-index:10;background-color:var(--color-background-primary, #ffffff);pointer-events:all}.mc-combobox--open .mc-combobox__listbox{visibility:visible;opacity:1}.mc-combobox--s .mc-combobox__control{height:2rem;font-size:var(--font-size-100, .875rem);padding-left:.5rem}.mc-combobox--s .mc-combobox__icon{padding-right:.5rem}.mc-combobox--s .mc-combobox__clear{width:1.25rem;height:1.25rem}.mc-combobox--invalid .mc-combobox__input{border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-invalid, #ea302d)}.mc-combobox--invalid .mc-combobox__input:hover:not(:focus-within){border-color:var(--forms-color-border-invalid-hover, #c61112);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-invalid-hover, #c61112)}.mc-combobox--disabled .mc-combobox__input{background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none}.mc-combobox--disabled .mc-combobox__control{color:var(--forms-color-text-disabled, #737373)}.mc-combobox--disabled .mc-combobox__icon{color:var(--forms-color-icon-disabled, #737373)}.mc-combobox--readonly .mc-combobox__input{border-color:var(--forms-color-border-read-only, #cccccc);pointer-events:none}.mc-option-listbox__list{overflow:auto;display:flex;flex-direction:column;gap:.125rem;margin:0;padding:.5rem;max-height:18.75rem}.mc-option-listbox__item{display:block;border-radius:var(--border-radius-s, .25rem)}.mc-option-listbox__item--disabled{color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__label{pointer-events:none;color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__additional{color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__checkbox{border:none;background-color:var(--forms-color-background-disabled, #d9d9d9)}.mc-option-listbox__item--readonly .mc-option-listbox__label{pointer-events:none}.mc-option-listbox__item--selected:not(.mc-option-listbox__item--section){background-color:var(--option-listbox-color-background-checked, #ebf5de)}.mc-option-listbox__item--selected .mc-option-listbox__selection-icon{opacity:1;color:var(--option-listbox-color-selection-indicator-default, #117f03);fill:currentcolor}.mc-option-listbox__item--selected .mc-option-listbox__checkbox{border:none;background-color:var(--forms-color-background-checked, #117f03);color:var(--forms-color-icon-inverse, #ffffff);fill:currentcolor}.mc-option-listbox__item--selected .mc-option-listbox__checkbox svg{display:block}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected{background-color:var(--option-listbox-color-background-checked-read-only, #eff1f6)}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected .mc-option-listbox__selection-icon{color:var(--option-listbox-color-selection-indicator-read-only, #000000)}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected .mc-option-listbox__checkbox{border:2px solid var(--forms-color-border-read-only, #cccccc);background-color:var(--forms-color-background-default, #ffffff);color:var(--option-listbox-color-selection-indicator-read-only, #000000)}.mc-option-listbox__item--selectable{cursor:pointer}.mc-option-listbox__item--selectable:not(.mc-option-listbox__item--disabled):hover,.mc-option-listbox__item--selectable:not(.mc-option-listbox__item--disabled).mc-option-listbox__item--active{background-color:var(--option-listbox-color-background-hover, rgba(0, 0, 0, .05))}.mc-option-listbox__content{display:flex;flex-direction:column;gap:.125rem}.mc-option-listbox__additional{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-50, .75rem);color:var(--option-listbox-color-text-information, #666666)}.mc-option-listbox__label{display:flex;align-items:center;gap:.5rem;height:3rem;padding:.5rem;border-radius:var(--border-radius-s, .25rem);line-height:var(--line-height-s, 1.3);box-sizing:border-box}.mc-option-listbox__checkbox{display:flex;align-items:center;justify-content:center;height:1.25rem;width:1.25rem;border:.125rem solid var(--forms-color-border-default, #666666);border-radius:.25rem;box-sizing:border-box}.mc-option-listbox__checkbox svg{display:none}.mc-option-listbox__spacer{flex-grow:1}.mc-option-listbox__selection-icon{opacity:0}.mc-option-listbox__section-title{font-size:var(--font-size-100, .875rem);font-weight:var(--font-weight-semi-bold, 600);margin:0;color:var(--option-listbox-color-text-section-title, #666666)}.mc-option-listbox__search{margin:.5rem;width:unset}.mc-option-listbox__separator{display:block;height:1px;border:0;border-top:1px solid var(--color-border-primary, #cccccc);margin:0;padding:0}.mc-option-listbox__actions{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem}.mc-combobox__virtual-host{overflow:hidden;max-height:none;padding:0}.mc-combobox__viewport,.mc-combobox__viewport .cdk-virtual-scroll-content-wrapper{width:100%}.mc-combobox__loader{display:flex;align-items:center;padding-inline:4px}.mc-combobox__loading,.mc-option-listbox__empty{display:flex;align-items:center;justify-content:center;padding:24px 16px}\n"], dependencies: [{ kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: MozLoaderComponent, selector: "moz-loader", inputs: ["appearance", "size", "text"] }, { kind: "component", type: MozButtonComponent, selector: "button[moz-button]", inputs: ["appearance", "size", "disabled", "ghost", "outlined", "iconPosition", "type", "isLoading"] }, { kind: "component", type: CrossCircleFilled24, selector: "CrossCircleFilled24", inputs: ["hostClass"] }, { kind: "component", type: ChevronDown24, selector: "ChevronDown24", inputs: ["hostClass"] }, { kind: "component", type: Search24, selector: "Search24", inputs: ["hostClass"] }, { kind: "component", type: MozTextInput, selector: "input[moz-text-input]", inputs: ["isInvalid", "disabled", "readonly", "size", "clearable", "clearLabel", "prefix", "suffix"] }, { kind: "component", type: MozCheckboxComponent, selector: "moz-checkbox", inputs: ["id", "name", "label", "indeterminate", "isInvalid", "disabled", "indented"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CheckCircle24, selector: "CheckCircle24", inputs: ["hostClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16975
17176
|
}
|
|
16976
17177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MozComboboxComponent, decorators: [{
|
|
16977
17178
|
type: Component,
|
|
@@ -16994,8 +17195,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
16994
17195
|
useExisting: forwardRef(() => MozComboboxComponent),
|
|
16995
17196
|
multi: true,
|
|
16996
17197
|
},
|
|
16997
|
-
], template: "<!-- ====================================================================== -->\n<!-- TRIGGER -->\n<!-- ====================================================================== -->\n<div [class]=\"wrapperClasses()\">\n <div class=\"mc-combobox__input\">\n <button\n #triggerBtn\n type=\"button\"\n class=\"mc-combobox__control\"\n role=\"combobox\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n [disabled]=\"isEffectivelyDisabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? comboboxId + '-opt-' + focusedIndex() : null\n \"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-invalid]=\"invalid() || null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (displayValue()) {\n <span class=\"mc-combobox__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"mc-combobox__placeholder\">{{ placeholder() }}</span>\n }\n </button>\n\n <!-- Counter (compact + multiple) -->\n @if (multiple() && compact() && selectedCount() > 0) {\n <span class=\"mc-combobox__counter\" aria-live=\"polite\">\n {{ selectedCount() }} {{ selectedSuffix() }}\n </span>\n }\n\n <!-- Clear button -->\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"mc-combobox__clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClear($event)\"\n >\n <CrossCircleFilled24 />\n </button>\n }\n\n <!-- Trigger loader -->\n @if (loading()) {\n <moz-loader size=\"s\" [appearance]=\"'accent'\" class=\"mc-combobox__loader\" />\n }\n\n <!-- Chevron -->\n <button\n type=\"button\"\n class=\"mc-combobox__icon\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggle()\"\n >\n <ChevronDown24 />\n </button>\n </div>\n</div>\n\n<!-- ====================================================================== -->\n<!-- OVERLAY / DROPDOWN -->\n<!-- ====================================================================== -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"mc-combobox-backdrop\"\n (backdropClick)=\"onOverlayOutsideClick()\"\n (attach)=\"onOverlayAttached()\"\n>\n <div\n class=\"mc-option-listbox mc-listbox__content mc-combobox__listbox\"\n (keydown)=\"onPanelKeydown($event)\"\n >\n <!-- Search -->\n @if (searchable()) {\n <div class=\"mc-option-listbox__search\">\n <Search24 icon />\n <input\n #searchInput\n moz-text-input\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n [size]=\"'s'\"\n />\n </div>\n <hr class=\"mc-option-listbox__separator\" />\n }\n\n <!-- Actions (multiple only) -->\n @if (showActions() && multiple()) {\n <div class=\"mc-option-listbox__actions\">\n <button\n moz-button\n type=\"button\"\n [size]=\"'s'\"\n [ghost]=\"true\"\n [appearance]=\"'accent'\"\n (click)=\"selectAll()\"\n >\n {{ selectAllText() }}\n </button>\n <button moz-button type=\"button\" [size]=\"'s'\" [ghost]=\"true\" (click)=\"clearSelection()\">\n {{ clearText() }}\n </button>\n </div>\n <hr class=\"mc-option-listbox__separator\" />\n }\n\n <!-- Listbox with virtual scroll -->\n <div\n #listbox\n role=\"listbox\"\n [id]=\"listboxId\"\n class=\"mc-option-listbox__list mc-combobox__virtual-host\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n [attr.aria-label]=\"ariaLabel() ?? 'Options'\"\n [attr.aria-busy]=\"loading() || null\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? comboboxId + '-opt-' + focusedIndex() : null\n \"\n tabindex=\"-1\"\n >\n @if (loading()) {\n <div class=\"mc-combobox__loading\" role=\"status\">\n <moz-loader size=\"s\" [appearance]=\"'accent'\" [text]=\"loadingText()\" />\n </div>\n } @else if (filteredItems().length === 0 && showNoResultText() && searchQuery().length > 0) {\n <div class=\"mc-option-listbox__empty\" role=\"presentation\" aria-live=\"polite\">\n {{ noResultsText() }}\n </div>\n } @else {\n <cdk-virtual-scroll-viewport\n #viewport\n [itemSize]=\"itemSizePx\"\n [style.height.px]=\"viewportHeight()\"\n class=\"mc-combobox__viewport\"\n >\n <ng-container\n *cdkVirtualFor=\"let item of filteredItems(); let i = index; trackBy: trackByFlatItem\"\n >\n <!-- Section header -->\n @if (isFlatSection(item)) {\n <div\n class=\"mc-option-listbox__item mc-option-listbox__item--section\"\n [class.mc-option-listbox__item--selectable]=\"item.checkable && multiple()\"\n [class.mc-option-listbox__item--selected]=\"\n item.checkable &&\n multiple() &&\n (isSectionFullySelected(item.title) || isSectionPartiallySelected(item.title))\n \"\n role=\"presentation\"\n (click)=\"item.checkable && multiple() ? toggleSection(item.title) : null\"\n >\n <div class=\"mc-option-listbox__label\">\n <div class=\"mc-option-listbox__content\">\n <span class=\"mc-option-listbox__section-title\">{{ item.title }}</span>\n </div>\n <div class=\"mc-option-listbox__spacer\"></div>\n @if (item.checkable && multiple()) {\n <moz-checkbox\n class=\"mc-option-listbox__checkbox\"\n [id]=\"comboboxId + '-section-cb-' + i\"\n [ngModel]=\"isSectionFullySelected(item.title)\"\n [indeterminate]=\"isSectionPartiallySelected(item.title)\"\n />\n }\n </div>\n </div>\n }\n\n <!-- Option -->\n @if (isFlatOption(item)) {\n <div\n role=\"option\"\n [id]=\"comboboxId + '-opt-' + i\"\n [attr.aria-selected]=\"isOptionSelected($any(item.value))\"\n [attr.aria-disabled]=\"item.disabled || null\"\n class=\"mc-option-listbox__item\"\n [class.mc-option-listbox__item--selectable]=\"!item.disabled\"\n [class.mc-option-listbox__item--disabled]=\"item.disabled\"\n [class.mc-option-listbox__item--selected]=\"isOptionSelected($any(item.value))\"\n [class.mc-option-listbox__item--active]=\"focusedIndex() === i\"\n (click)=\"!item.disabled && selectOption($any(item.value))\"\n (mouseenter)=\"focusedIndex.set(i)\"\n >\n <div class=\"mc-option-listbox__label\">\n @if (item.icon) {\n <div class=\"mc-option-listbox__prepend\">\n <span class=\"mc-option-listbox__icon\">{{ item.icon }}</span>\n </div>\n }\n <div class=\"mc-option-listbox__content\">\n <span class=\"mc-option-listbox__text\">{{ item.label }}</span>\n @if (item.content) {\n <span class=\"mc-option-listbox__additional\">{{ item.content }}</span>\n }\n </div>\n <div class=\"mc-option-listbox__spacer\"></div>\n\n <!-- Selection indicator -->\n @if (multiple()) {\n <moz-checkbox\n class=\"mc-option-listbox__checkbox\"\n [id]=\"comboboxId + '-cb-' + i\"\n [ngModel]=\"isOptionSelected($any(item.value))\"\n />\n } @else {\n <CheckCircle24 class=\"mc-option-listbox__selection-icon\" />\n }\n </div>\n </div>\n }\n </ng-container>\n </cdk-virtual-scroll-viewport>\n }\n </div>\n </div>\n</ng-template>\n", styles: [".mc-combobox{position:relative;width:18.75rem}.mc-combobox__input{transition:box-shadow .2s ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-s, .0625rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, .25rem);transition:all ease .2s;color:var(--forms-color-text-default, #000000);display:block;width:100%;display:flex;align-items:center;gap:.5rem;box-sizing:border-box}.mc-combobox__input:focus-within{box-shadow:0 0 0 .125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)),0 0 0 .25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:.125rem solid transparent;outline-offset:.125rem}.mc-combobox__input:hover:not(:focus-within){border-color:var(--forms-color-border-hover, #4d4d4d);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-hover, #4d4d4d)}.mc-combobox__input:has(.mc-combobox__control:disabled){background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none}.mc-combobox__input .mc-combobox__control{text-align:left;font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-regular, 400);color:var(--forms-color-text-default, #000000);background-color:transparent;border:none;padding-left:.75rem;padding-right:0;flex-grow:1;height:3rem;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-combobox__input .mc-combobox__control:focus-within{outline:none}.mc-combobox__icon{border:none;display:flex;align-items:center;cursor:pointer;padding-right:.75rem;background:none;color:var(--forms-color-icon-interactive, #000000);fill:currentcolor}.mc-combobox__clear{padding:0;display:flex;align-items:center;justify-content:center;border:none;background:none;cursor:pointer;color:var(--forms-color-icon-clear, #666666);fill:currentcolor}.mc-combobox__counter{height:1.5rem;display:flex;flex-shrink:0;align-items:center;justify-content:center;padding:0 .5rem;border-radius:var(--border-radius-l, 1rem);background-color:var(--forms-color-selection-counter-background, #464e63);font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-50, .75rem);line-height:var(--line-height-s, 1.3);color:var(--forms-color-selection-counter-text, #ffffff)}.mc-combobox__listbox{position:absolute;left:0;top:calc(100% + .25rem);visibility:hidden;opacity:0;box-shadow:var(--shadow-bottom-s-x, 0px) var(--shadow-bottom-s-y, 5px) var(--shadow-bottom-s-blur, 10px) var(--shadow-bottom-s-spread, -2px) rgba(0,0,0,var(--shadow-bottom-s-opacity, 20%));border:var(--border-width-s, .0625rem) solid var(--color-border-primary, #cccccc);border-radius:var(--border-radius-m, .5rem);width:100%;z-index:10;background-color:var(--color-background-primary, #ffffff);pointer-events:all}.mc-combobox--open .mc-combobox__listbox{visibility:visible;opacity:1}.mc-combobox--s .mc-combobox__control{height:2rem;font-size:var(--font-size-100, .875rem);padding-left:.5rem}.mc-combobox--s .mc-combobox__icon{padding-right:.5rem}.mc-combobox--s .mc-combobox__clear{width:1.25rem;height:1.25rem}.mc-combobox--invalid .mc-combobox__input{border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-invalid, #ea302d)}.mc-combobox--invalid .mc-combobox__input:hover:not(:focus-within){border-color:var(--forms-color-border-invalid-hover, #c61112);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-invalid-hover, #c61112)}.mc-combobox--disabled .mc-combobox__input{background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none}.mc-combobox--disabled .mc-combobox__control{color:var(--forms-color-text-disabled, #737373)}.mc-combobox--disabled .mc-combobox__icon{color:var(--forms-color-icon-disabled, #737373)}.mc-combobox--readonly .mc-combobox__input{border-color:var(--forms-color-border-read-only, #cccccc);pointer-events:none}.mc-option-listbox__list{overflow:auto;display:flex;flex-direction:column;gap:.125rem;margin:0;padding:.5rem;max-height:18.75rem}.mc-option-listbox__item{display:block;border-radius:var(--border-radius-s, .25rem)}.mc-option-listbox__item--disabled{color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__label{pointer-events:none;color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__additional{color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__checkbox{border:none;background-color:var(--forms-color-background-disabled, #d9d9d9)}.mc-option-listbox__item--readonly .mc-option-listbox__label{pointer-events:none}.mc-option-listbox__item--selected:not(.mc-option-listbox__item--section){background-color:var(--option-listbox-color-background-checked, #ebf5de)}.mc-option-listbox__item--selected .mc-option-listbox__selection-icon{opacity:1;color:var(--option-listbox-color-selection-indicator-default, #117f03);fill:currentcolor}.mc-option-listbox__item--selected .mc-option-listbox__checkbox{border:none;background-color:var(--forms-color-background-checked, #117f03);color:var(--forms-color-icon-inverse, #ffffff);fill:currentcolor}.mc-option-listbox__item--selected .mc-option-listbox__checkbox svg{display:block}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected{background-color:var(--option-listbox-color-background-checked-read-only, #eff1f6)}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected .mc-option-listbox__selection-icon{color:var(--option-listbox-color-selection-indicator-read-only, #000000)}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected .mc-option-listbox__checkbox{border:2px solid var(--forms-color-border-read-only, #cccccc);background-color:var(--forms-color-background-default, #ffffff);color:var(--option-listbox-color-selection-indicator-read-only, #000000)}.mc-option-listbox__item--selectable{cursor:pointer}.mc-option-listbox__item--selectable:not(.mc-option-listbox__item--disabled):hover,.mc-option-listbox__item--selectable:not(.mc-option-listbox__item--disabled).mc-option-listbox__item--active{background-color:var(--option-listbox-color-background-hover, rgba(0, 0, 0, .05))}.mc-option-listbox__content{display:flex;flex-direction:column;gap:.125rem}.mc-option-listbox__additional{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-50, .75rem);color:var(--option-listbox-color-text-information, #666666)}.mc-option-listbox__label{display:flex;align-items:center;gap:.5rem;height:3rem;padding:.5rem;border-radius:var(--border-radius-s, .25rem);line-height:var(--line-height-s, 1.3);box-sizing:border-box}.mc-option-listbox__checkbox{display:flex;align-items:center;justify-content:center;height:1.25rem;width:1.25rem;border:.125rem solid var(--forms-color-border-default, #666666);border-radius:.25rem;box-sizing:border-box}.mc-option-listbox__checkbox svg{display:none}.mc-option-listbox__spacer{flex-grow:1}.mc-option-listbox__selection-icon{opacity:0}.mc-option-listbox__section-title{font-size:var(--font-size-100, .875rem);font-weight:var(--font-weight-semi-bold, 600);margin:0;color:var(--option-listbox-color-text-section-title, #666666)}.mc-option-listbox__search{margin:.5rem;width:unset}.mc-option-listbox__separator{display:block;height:1px;border:0;border-top:1px solid var(--color-border-primary, #cccccc);margin:0;padding:0}.mc-option-listbox__actions{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem}.mc-combobox__virtual-host{overflow:hidden;max-height:none;padding:0}.mc-combobox__viewport,.mc-combobox__viewport .cdk-virtual-scroll-content-wrapper{width:100%}.mc-combobox__loader{display:flex;align-items:center;padding-inline:4px}.mc-combobox__loading,.mc-option-listbox__empty{display:flex;align-items:center;justify-content:center;padding:24px 16px}\n"] }]
|
|
16998
|
-
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], showActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showActions", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], noResultsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsText", required: false }] }], selectAllText: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllText", required: false }] }], clearText: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearText", required: false }] }], selectedSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedSuffix", required: false }] }], clearAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAriaLabel", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], showNoResultText: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNoResultText", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], searched: [{ type: i0.Output, args: ["searched"] }], triggerEl: [{ type: i0.ViewChild, args: ['triggerBtn', { isSignal: true }] }], viewportEl: [{ type: i0.ViewChild, args: ['viewport', { isSignal: true }] }] } });
|
|
17198
|
+
], template: "<!-- ====================================================================== -->\n<!-- TRIGGER -->\n<!-- ====================================================================== -->\n<div [class]=\"wrapperClasses()\">\n <div class=\"mc-combobox__input\">\n <button\n #triggerBtn\n type=\"button\"\n class=\"mc-combobox__control\"\n role=\"combobox\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n [disabled]=\"isEffectivelyDisabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? comboboxId + '-opt-' + focusedIndex() : null\n \"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-invalid]=\"invalid() || null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (displayValue()) {\n <span class=\"mc-combobox__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"mc-combobox__placeholder\">{{ placeholder() }}</span>\n }\n </button>\n\n <!-- Counter (compact + multiple) -->\n @if (multiple() && compact() && selectedCount() > 0) {\n <span class=\"mc-combobox__counter\" aria-live=\"polite\">\n {{ selectedCount() }} {{ selectedSuffix() }}\n </span>\n }\n\n <!-- Clear button -->\n @if (showClear()) {\n <button\n type=\"button\"\n class=\"mc-combobox__clear\"\n [attr.aria-label]=\"clearAriaLabel()\"\n (click)=\"onClear($event)\"\n >\n <CrossCircleFilled24 />\n </button>\n }\n\n <!-- Trigger loader -->\n @if (loading()) {\n <moz-loader size=\"s\" [appearance]=\"'accent'\" class=\"mc-combobox__loader\" />\n }\n\n <!-- Chevron -->\n <button\n type=\"button\"\n class=\"mc-combobox__icon\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (click)=\"toggle()\"\n >\n <ChevronDown24 />\n </button>\n </div>\n</div>\n\n<!-- ====================================================================== -->\n<!-- OVERLAY / DROPDOWN -->\n<!-- ====================================================================== -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"mc-combobox-backdrop\"\n (backdropClick)=\"onOverlayOutsideClick()\"\n (attach)=\"onOverlayAttached()\"\n>\n <div\n class=\"mc-option-listbox mc-listbox__content mc-combobox__listbox\"\n (keydown)=\"onPanelKeydown($event)\"\n >\n <!-- Search -->\n @if (searchable()) {\n <div class=\"mc-option-listbox__search\">\n <Search24 icon />\n <input\n #searchInput\n moz-text-input\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n [size]=\"'s'\"\n />\n </div>\n <hr class=\"mc-option-listbox__separator\" />\n }\n\n <!-- Actions (multiple only) -->\n @if (showActions() && multiple()) {\n <div class=\"mc-option-listbox__actions\">\n <button\n moz-button\n type=\"button\"\n [size]=\"'s'\"\n [ghost]=\"true\"\n [appearance]=\"'accent'\"\n (click)=\"selectAll()\"\n >\n {{ selectAllText() }}\n </button>\n <button moz-button type=\"button\" [size]=\"'s'\" [ghost]=\"true\" (click)=\"clearSelection()\">\n {{ clearText() }}\n </button>\n </div>\n <hr class=\"mc-option-listbox__separator\" />\n }\n\n <!-- Listbox with virtual scroll -->\n <div\n #listbox\n role=\"listbox\"\n [id]=\"listboxId\"\n class=\"mc-option-listbox__list mc-combobox__virtual-host\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n [attr.aria-label]=\"ariaLabel() ?? 'Options'\"\n [attr.aria-busy]=\"loading() || null\"\n [attr.aria-activedescendant]=\"\n focusedIndex() >= 0 ? comboboxId + '-opt-' + focusedIndex() : null\n \"\n tabindex=\"-1\"\n >\n @if (loading()) {\n <div class=\"mc-combobox__loading\" role=\"status\">\n <moz-loader size=\"s\" [appearance]=\"'accent'\" [text]=\"loadingText()\" />\n </div>\n } @else if (filteredItems().length === 0 && showNoResultText() && searchQuery().length > 0) {\n <div class=\"mc-option-listbox__empty\" role=\"presentation\" aria-live=\"polite\">\n {{ noResultsText() }}\n </div>\n } @else {\n <cdk-virtual-scroll-viewport\n #viewport\n [itemSize]=\"itemSizePx\"\n [style.height.px]=\"viewportHeight()\"\n class=\"mc-combobox__viewport\"\n >\n <ng-container\n *cdkVirtualFor=\"let item of filteredItems(); let i = index; trackBy: trackByFlatItem\"\n >\n <!-- Section header -->\n @if (isFlatSection(item)) {\n <div\n class=\"mc-option-listbox__item mc-option-listbox__item--section\"\n [class.mc-option-listbox__item--selectable]=\"item.checkable && multiple()\"\n [class.mc-option-listbox__item--selected]=\"\n item.checkable &&\n multiple() &&\n (isSectionFullySelected(item.title) || isSectionPartiallySelected(item.title))\n \"\n role=\"presentation\"\n (click)=\"item.checkable && multiple() ? toggleSection(item.title) : null\"\n >\n <div class=\"mc-option-listbox__label\">\n <div class=\"mc-option-listbox__content\">\n <span class=\"mc-option-listbox__section-title\">{{ item.title }}</span>\n </div>\n <div class=\"mc-option-listbox__spacer\"></div>\n @if (item.checkable && multiple()) {\n <moz-checkbox\n class=\"mc-option-listbox__checkbox\"\n [id]=\"comboboxId + '-section-cb-' + i\"\n [ngModel]=\"isSectionFullySelected(item.title)\"\n [indeterminate]=\"isSectionPartiallySelected(item.title)\"\n />\n }\n </div>\n </div>\n }\n\n <!-- Option -->\n @if (isFlatOption(item)) {\n <div\n role=\"option\"\n [id]=\"comboboxId + '-opt-' + i\"\n [attr.aria-selected]=\"isOptionSelected($any(item.value))\"\n [attr.aria-disabled]=\"item.disabled || null\"\n class=\"mc-option-listbox__item\"\n [class.mc-option-listbox__item--selectable]=\"!item.disabled\"\n [class.mc-option-listbox__item--disabled]=\"item.disabled\"\n [class.mc-option-listbox__item--selected]=\"isOptionSelected($any(item.value))\"\n [class.mc-option-listbox__item--active]=\"focusedIndex() === i\"\n (click)=\"!item.disabled && selectOption($any(item.value))\"\n (mouseenter)=\"focusedIndex.set(i)\"\n >\n <div class=\"mc-option-listbox__label\">\n @if (item.icon) {\n <div class=\"mc-option-listbox__prepend\">\n <span class=\"mc-option-listbox__icon\">{{ item.icon }}</span>\n </div>\n }\n <div class=\"mc-option-listbox__content\">\n <span class=\"mc-option-listbox__text\">{{ item.label }}</span>\n @if (item.content) {\n <span class=\"mc-option-listbox__additional\">{{ item.content }}</span>\n }\n </div>\n <div class=\"mc-option-listbox__spacer\"></div>\n\n <!-- Selection indicator -->\n @if (multiple()) {\n <moz-checkbox\n class=\"mc-option-listbox__checkbox\"\n [id]=\"comboboxId + '-cb-' + i\"\n [ngModel]=\"isOptionSelected($any(item.value))\"\n [disabled]=\"!!item.disabled\"\n />\n } @else {\n <CheckCircle24 class=\"mc-option-listbox__selection-icon\" />\n }\n </div>\n </div>\n }\n </ng-container>\n </cdk-virtual-scroll-viewport>\n }\n </div>\n </div>\n</ng-template>\n", styles: [".mc-combobox{position:relative;width:18.75rem}.mc-combobox__input{transition:box-shadow .2s ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-s, .0625rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, .25rem);transition:all ease .2s;color:var(--forms-color-text-default, #000000);display:block;width:100%;display:flex;align-items:center;gap:.5rem;box-sizing:border-box}.mc-combobox__input:focus-within{box-shadow:0 0 0 .125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)),0 0 0 .25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:.125rem solid transparent;outline-offset:.125rem}.mc-combobox__input:hover:not(:focus-within){border-color:var(--forms-color-border-hover, #4d4d4d);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-hover, #4d4d4d)}.mc-combobox__input:has(.mc-combobox__control:disabled){background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none}.mc-combobox__input .mc-combobox__control{text-align:left;font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-regular, 400);color:var(--forms-color-text-default, #000000);background-color:transparent;border:none;padding-left:.75rem;padding-right:0;flex-grow:1;height:3rem;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-combobox__input .mc-combobox__control:focus-within{outline:none}.mc-combobox__icon{border:none;display:flex;align-items:center;cursor:pointer;padding-right:.75rem;background:none;color:var(--forms-color-icon-interactive, #000000);fill:currentcolor}.mc-combobox__clear{padding:0;display:flex;align-items:center;justify-content:center;border:none;background:none;cursor:pointer;color:var(--forms-color-icon-clear, #666666);fill:currentcolor}.mc-combobox__counter{height:1.5rem;display:flex;flex-shrink:0;align-items:center;justify-content:center;padding:0 .5rem;border-radius:var(--border-radius-l, 1rem);background-color:var(--forms-color-selection-counter-background, #464e63);font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-50, .75rem);line-height:var(--line-height-s, 1.3);color:var(--forms-color-selection-counter-text, #ffffff)}.mc-combobox__listbox{position:absolute;left:0;top:calc(100% + .25rem);visibility:hidden;opacity:0;box-shadow:var(--shadow-bottom-s-x, 0px) var(--shadow-bottom-s-y, 5px) var(--shadow-bottom-s-blur, 10px) var(--shadow-bottom-s-spread, -2px) rgba(0,0,0,var(--shadow-bottom-s-opacity, 20%));border:var(--border-width-s, .0625rem) solid var(--color-border-primary, #cccccc);border-radius:var(--border-radius-m, .5rem);width:100%;z-index:10;background-color:var(--color-background-primary, #ffffff);pointer-events:all}.mc-combobox--open .mc-combobox__listbox{visibility:visible;opacity:1}.mc-combobox--s .mc-combobox__control{height:2rem;font-size:var(--font-size-100, .875rem);padding-left:.5rem}.mc-combobox--s .mc-combobox__icon{padding-right:.5rem}.mc-combobox--s .mc-combobox__clear{width:1.25rem;height:1.25rem}.mc-combobox--invalid .mc-combobox__input{border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-invalid, #ea302d)}.mc-combobox--invalid .mc-combobox__input:hover:not(:focus-within){border-color:var(--forms-color-border-invalid-hover, #c61112);box-shadow:0 0 0 var(--border-width-s, .0625rem) var(--forms-color-border-invalid-hover, #c61112)}.mc-combobox--disabled .mc-combobox__input{background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none}.mc-combobox--disabled .mc-combobox__control{color:var(--forms-color-text-disabled, #737373)}.mc-combobox--disabled .mc-combobox__icon{color:var(--forms-color-icon-disabled, #737373)}.mc-combobox--readonly .mc-combobox__input{border-color:var(--forms-color-border-read-only, #cccccc);pointer-events:none}.mc-option-listbox__list{overflow:auto;display:flex;flex-direction:column;gap:.125rem;margin:0;padding:.5rem;max-height:18.75rem}.mc-option-listbox__item{display:block;border-radius:var(--border-radius-s, .25rem)}.mc-option-listbox__item--disabled{color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__label{pointer-events:none;color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__additional{color:var(--option-listbox-color-text-disabled, #b3b3b3)}.mc-option-listbox__item--disabled .mc-option-listbox__checkbox{border:none;background-color:var(--forms-color-background-disabled, #d9d9d9)}.mc-option-listbox__item--readonly .mc-option-listbox__label{pointer-events:none}.mc-option-listbox__item--selected:not(.mc-option-listbox__item--section){background-color:var(--option-listbox-color-background-checked, #ebf5de)}.mc-option-listbox__item--selected .mc-option-listbox__selection-icon{opacity:1;color:var(--option-listbox-color-selection-indicator-default, #117f03);fill:currentcolor}.mc-option-listbox__item--selected .mc-option-listbox__checkbox{border:none;background-color:var(--forms-color-background-checked, #117f03);color:var(--forms-color-icon-inverse, #ffffff);fill:currentcolor}.mc-option-listbox__item--selected .mc-option-listbox__checkbox svg{display:block}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected{background-color:var(--option-listbox-color-background-checked-read-only, #eff1f6)}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected .mc-option-listbox__selection-icon{color:var(--option-listbox-color-selection-indicator-read-only, #000000)}.mc-option-listbox__item--readonly.mc-option-listbox__item--selected .mc-option-listbox__checkbox{border:2px solid var(--forms-color-border-read-only, #cccccc);background-color:var(--forms-color-background-default, #ffffff);color:var(--option-listbox-color-selection-indicator-read-only, #000000)}.mc-option-listbox__item--selectable{cursor:pointer}.mc-option-listbox__item--selectable:not(.mc-option-listbox__item--disabled):hover,.mc-option-listbox__item--selectable:not(.mc-option-listbox__item--disabled).mc-option-listbox__item--active{background-color:var(--option-listbox-color-background-hover, rgba(0, 0, 0, .05))}.mc-option-listbox__content{display:flex;flex-direction:column;gap:.125rem}.mc-option-listbox__additional{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-50, .75rem);color:var(--option-listbox-color-text-information, #666666)}.mc-option-listbox__label{display:flex;align-items:center;gap:.5rem;height:3rem;padding:.5rem;border-radius:var(--border-radius-s, .25rem);line-height:var(--line-height-s, 1.3);box-sizing:border-box}.mc-option-listbox__checkbox{display:flex;align-items:center;justify-content:center;height:1.25rem;width:1.25rem;border:.125rem solid var(--forms-color-border-default, #666666);border-radius:.25rem;box-sizing:border-box}.mc-option-listbox__checkbox svg{display:none}.mc-option-listbox__spacer{flex-grow:1}.mc-option-listbox__selection-icon{opacity:0}.mc-option-listbox__section-title{font-size:var(--font-size-100, .875rem);font-weight:var(--font-weight-semi-bold, 600);margin:0;color:var(--option-listbox-color-text-section-title, #666666)}.mc-option-listbox__search{margin:.5rem;width:unset}.mc-option-listbox__separator{display:block;height:1px;border:0;border-top:1px solid var(--color-border-primary, #cccccc);margin:0;padding:0}.mc-option-listbox__actions{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem}.mc-combobox__virtual-host{overflow:hidden;max-height:none;padding:0}.mc-combobox__viewport,.mc-combobox__viewport .cdk-virtual-scroll-content-wrapper{width:100%}.mc-combobox__loader{display:flex;align-items:center;padding-inline:4px}.mc-combobox__loading,.mc-option-listbox__empty{display:flex;align-items:center;justify-content:center;padding:24px 16px}\n"] }]
|
|
17199
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], multiSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSearch", required: false }] }], showActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showActions", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], noResultsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsText", required: false }] }], selectAllText: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllText", required: false }] }], clearText: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearText", required: false }] }], selectedSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedSuffix", required: false }] }], clearAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAriaLabel", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], showNoResultText: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNoResultText", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], searched: [{ type: i0.Output, args: ["searched"] }], triggerEl: [{ type: i0.ViewChild, args: ['triggerBtn', { isSignal: true }] }], viewportEl: [{ type: i0.ViewChild, args: ['viewport', { isSignal: true }] }] } });
|
|
16999
17200
|
|
|
17000
17201
|
/**
|
|
17001
17202
|
* Harness for a single option inside the combobox dropdown.
|