@quadrel-enterprise-ui/framework 21.12.0-beta.345.1 → 21.12.1

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.
@@ -7704,20 +7704,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
7704
7704
  * two errors with the same name and message stay equal despite different stacks.
7705
7705
  * - `WeakMap` and `WeakSet` have no readable content and are only equal to
7706
7706
  * themselves.
7707
- * - Values on `Object.prototype` skip the slot check and count as plain
7708
- * objects, as in Node. This keeps large form values fast.
7709
7707
  * - Structures deeper than 1200 levels report a difference instead of exhausting
7710
7708
  * the call stack.
7711
7709
  */
7712
- const qdIsDeepEqual = (left, right) => quickCompare(left, right, new Set(), 0) ??
7713
- compare(left, right, {
7714
- positions: new Map(),
7715
- partners: new Map(),
7716
- results: new Map(),
7717
- assumptions: 0,
7718
- depth: 0,
7719
- nextPosition: 0
7720
- });
7710
+ const qdIsDeepEqual = (left, right) => compare(left, right, {
7711
+ positions: new Map(),
7712
+ partners: new Map(),
7713
+ results: new Map(),
7714
+ assumptions: 0,
7715
+ depth: 0,
7716
+ nextPosition: 0
7717
+ });
7721
7718
  const MAX_DEPTH = 1200;
7722
7719
  const getterOf = (target, key) => Object.getOwnPropertyDescriptor(target, key)?.get;
7723
7720
  const TYPED_ARRAY_PROTOTYPE = Object.getPrototypeOf(Int8Array.prototype);
@@ -7749,15 +7746,6 @@ const survives = (probe) => {
7749
7746
  };
7750
7747
  const callable = (reader, value) => survives(() => reader.call(value));
7751
7748
  const isSameValueZero = (left, right) => left === right || (left !== left && right !== right);
7752
- const hasPlainTag = (value) => {
7753
- try {
7754
- return Object.prototype.toString.call(value) === '[object Object]';
7755
- }
7756
- catch {
7757
- return false;
7758
- }
7759
- };
7760
- const isObjectLiteral = (value) => Object.getPrototypeOf(value) === Object.prototype && hasPlainTag(value);
7761
7749
  const hasErrorAncestor = (value) => {
7762
7750
  let current = Object.getPrototypeOf(value);
7763
7751
  while (current !== null) {
@@ -7828,33 +7816,18 @@ const hidesStateBehindSlots = (value) => {
7828
7816
  return false;
7829
7817
  return ownEnumerableKeys(value).length === 0;
7830
7818
  };
7831
- const readSlotKind = (value) => {
7832
- const probed = probedKind(value);
7833
- if (probed !== undefined)
7834
- return probed;
7835
- if (callable(readUrlHref, value))
7836
- return 'url';
7837
- return isWeakCollection(value) ? 'opaque' : null;
7838
- };
7839
- const SLOT_KINDS = new WeakMap();
7840
- const slotKindOf = (value) => {
7841
- const known = SLOT_KINDS.get(value);
7842
- if (known !== undefined)
7843
- return known;
7844
- const kind = readSlotKind(value);
7845
- SLOT_KINDS.set(value, kind);
7846
- return kind;
7847
- };
7848
7819
  const kindOf = (value) => {
7849
7820
  if (Array.isArray(value))
7850
7821
  return 'array';
7851
- if (isObjectLiteral(value))
7852
- return 'plain';
7853
7822
  if (ArrayBuffer.isView(value))
7854
7823
  return callable(readViewLength, value) ? 'dataView' : 'typedArray';
7855
- const slotKind = slotKindOf(value);
7856
- if (slotKind !== null)
7857
- return slotKind;
7824
+ const probed = probedKind(value);
7825
+ if (probed !== undefined)
7826
+ return probed;
7827
+ if (callable(readUrlHref, value))
7828
+ return 'url';
7829
+ if (isWeakCollection(value))
7830
+ return 'opaque';
7858
7831
  if (hasErrorAncestor(value))
7859
7832
  return 'error';
7860
7833
  if (hidesStateBehindSlots(value))
@@ -8115,141 +8088,6 @@ const compare = (left, right, state) => {
8115
8088
  return false;
8116
8089
  return compareObjects(left, right, state);
8117
8090
  };
8118
- const QUICK_MAX_DEPTH = 64;
8119
- const hasSymbolKeys = (value) => Object.getOwnPropertySymbols(value).length !== 0;
8120
- const hasOwnKeys = (value) => Object.keys(value).length !== 0 || hasSymbolKeys(value);
8121
- const stringKeysOf = (value) => {
8122
- const keys = Object.keys(value);
8123
- return hasSymbolKeys(value) ? undefined : keys;
8124
- };
8125
- const matchesOnlyItself = (value) => value === null || typeof value !== 'object';
8126
- const isListedIndex = (list, index) => Object.prototype.propertyIsEnumerable.call(list, index);
8127
- const isOwnIndex = (list, index, listed) => listed || Object.prototype.hasOwnProperty.call(list, index);
8128
- const matchUnlistedIndex = (left, right, index, leftListed, rightListed) => {
8129
- const inLeft = isOwnIndex(left, index, leftListed);
8130
- if (inLeft !== isOwnIndex(right, index, rightListed))
8131
- return 'differ';
8132
- return inLeft ? 'compare' : 'skip';
8133
- };
8134
- const hasOnlyIndices = (list, listedIndices) => stringKeysOf(list)?.length === listedIndices;
8135
- const quickCompareOwnKeys = (left, right, seen, depth) => {
8136
- const keys = stringKeysOf(left);
8137
- if (keys === undefined)
8138
- return undefined;
8139
- const rightKeys = stringKeysOf(right);
8140
- if (rightKeys === undefined)
8141
- return undefined;
8142
- if (keys.length !== rightKeys.length)
8143
- return false;
8144
- for (const key of keys) {
8145
- if (!Object.prototype.propertyIsEnumerable.call(right, key))
8146
- return false;
8147
- const verdict = quickCompare(readKey(left, key), readKey(right, key), seen, depth);
8148
- if (verdict !== true)
8149
- return verdict;
8150
- }
8151
- return true;
8152
- };
8153
- const quickCompareArrays = (left, right, seen, depth) => {
8154
- if (!Array.isArray(left) || !Array.isArray(right))
8155
- return undefined;
8156
- const length = left.length;
8157
- if (length !== right.length)
8158
- return false;
8159
- let leftUnlisted = 0;
8160
- let rightUnlisted = 0;
8161
- for (let index = 0; index !== length; index++) {
8162
- const leftListed = isListedIndex(left, index);
8163
- const rightListed = isListedIndex(right, index);
8164
- const match = leftListed && rightListed ? 'compare' : matchUnlistedIndex(left, right, index, leftListed, rightListed);
8165
- if (match === 'differ')
8166
- return false;
8167
- leftUnlisted += Number(!leftListed);
8168
- rightUnlisted += Number(!rightListed);
8169
- if (match !== 'compare')
8170
- continue;
8171
- const verdict = quickCompare(left[index], right[index], seen, depth);
8172
- if (verdict !== true)
8173
- return verdict;
8174
- }
8175
- return hasOnlyIndices(left, length - leftUnlisted) && hasOnlyIndices(right, length - rightUnlisted)
8176
- ? true
8177
- : undefined;
8178
- };
8179
- const areBareValues = (reader, left, right) => callable(reader, left) && callable(reader, right) && !hasOwnKeys(left) && !hasOwnKeys(right);
8180
- const quickCompareDates = (left, right) => {
8181
- if (!areBareValues(readDateValue, left, right))
8182
- return undefined;
8183
- return isSameValueZero(readDateValue.call(left), readDateValue.call(right));
8184
- };
8185
- const quickCompareMapEntry = (right, key, value, seen, depth) => {
8186
- if (!Map.prototype.has.call(right, key))
8187
- return matchesOnlyItself(key) ? false : undefined;
8188
- const verdict = quickCompare(value, Map.prototype.get.call(right, key), seen, depth);
8189
- return verdict === false && !matchesOnlyItself(key) ? undefined : verdict;
8190
- };
8191
- const quickCompareMaps = (left, right, seen, depth) => {
8192
- if (!areBareValues(readMapSize, left, right))
8193
- return undefined;
8194
- if (readMapSize.call(left) !== readMapSize.call(right))
8195
- return false;
8196
- let allMatch = true;
8197
- for (const [key, value] of mapEntriesOf(left)) {
8198
- const verdict = quickCompareMapEntry(right, key, value, seen, depth);
8199
- if (verdict === undefined)
8200
- return undefined;
8201
- allMatch &&= verdict;
8202
- }
8203
- return allMatch;
8204
- };
8205
- const quickCompareSets = (left, right) => {
8206
- if (!areBareValues(readSetSize, left, right))
8207
- return undefined;
8208
- if (readSetSize.call(left) !== readSetSize.call(right))
8209
- return false;
8210
- for (const entry of setEntriesOf(left)) {
8211
- if (!Set.prototype.has.call(right, entry))
8212
- return matchesOnlyItself(entry) ? false : undefined;
8213
- }
8214
- return true;
8215
- };
8216
- const QUICK_COMPARATORS_BY_KIND = new Map([
8217
- ['plain', quickCompareOwnKeys],
8218
- ['array', quickCompareArrays],
8219
- ['date', quickCompareDates],
8220
- ['map', quickCompareMaps],
8221
- ['set', quickCompareSets]
8222
- ]);
8223
- const quickCompareByKind = (left, right, seen, depth) => {
8224
- const kind = kindOf(left);
8225
- if (kind !== kindOf(right))
8226
- return false;
8227
- return QUICK_COMPARATORS_BY_KIND.get(kind)?.(left, right, seen, depth);
8228
- };
8229
- const isPlainRecord = (value) => !Array.isArray(value) && hasPlainTag(value);
8230
- const quickCompareRecords = (left, right, seen, depth) => isPlainRecord(left) && isPlainRecord(right)
8231
- ? quickCompareOwnKeys(left, right, seen, depth)
8232
- : quickCompareByKind(left, right, seen, depth);
8233
- const QUICK_COMPARATORS = new Map([
8234
- [Object.prototype, quickCompareRecords],
8235
- [Array.prototype, quickCompareArrays],
8236
- [Date.prototype, quickCompareDates],
8237
- [Map.prototype, quickCompareMaps],
8238
- [Set.prototype, quickCompareSets]
8239
- ]);
8240
- const quickCompare = (left, right, seen, depth) => {
8241
- if (isSameValueZero(left, right))
8242
- return true;
8243
- if (left === null || right === null || typeof left !== 'object' || typeof right !== 'object')
8244
- return false;
8245
- if (depth === QUICK_MAX_DEPTH || seen.has(left))
8246
- return undefined;
8247
- seen.add(left);
8248
- const prototype = Object.getPrototypeOf(left);
8249
- if (prototype !== Object.getPrototypeOf(right))
8250
- return false;
8251
- return (QUICK_COMPARATORS.get(prototype) ?? quickCompareByKind)(left, right, seen, depth + 1);
8252
- };
8253
8091
 
8254
8092
  /**
8255
8093
  * The maximum number of characters a tooltip shows, headline and paragraphs together.
@@ -12781,9 +12619,10 @@ class QdInputComponent {
12781
12619
  return this.control.getMaxLengthOrUndefined();
12782
12620
  }
12783
12621
  get valueAsList() {
12784
- const displayValue = this.inputType === 'number'
12785
- ? this.numberInputService.formatNumberForViewonly(this._value.value)
12786
- : this._value.value;
12622
+ const value = this._value.value;
12623
+ if (value == null || value === '')
12624
+ return [null];
12625
+ const displayValue = this.inputType === 'number' ? this.numberInputService.formatNumberForViewonly(value) : value;
12787
12626
  return [`${displayValue}${this._value.unit ? ' ' + this.getUnitLabel(this._value.unit) : ''}`];
12788
12627
  }
12789
12628
  ngOnInit() {