@salesforce/lwc-adapters-uiapi 1.227.2 → 1.228.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.
- package/dist/main.js +575 -411
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -533,7 +533,7 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
533
533
|
}
|
|
534
534
|
return resourceParams;
|
|
535
535
|
}
|
|
536
|
-
// engine version: 0.145.
|
|
536
|
+
// engine version: 0.145.2-6a13677c
|
|
537
537
|
|
|
538
538
|
/**
|
|
539
539
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -7646,6 +7646,21 @@ function createFragmentMap(documentNode) {
|
|
|
7646
7646
|
});
|
|
7647
7647
|
return fragments;
|
|
7648
7648
|
}
|
|
7649
|
+
function mergeFragmentWithExistingSelections(fragmentFieldSelection, existingSelections) {
|
|
7650
|
+
// Check if there is an existing selection for this field we can merge with
|
|
7651
|
+
const existingField = getRequestedField(fragmentFieldSelection.name.value, existingSelections);
|
|
7652
|
+
if (existingField === undefined) {
|
|
7653
|
+
existingSelections.push(fragmentFieldSelection);
|
|
7654
|
+
}
|
|
7655
|
+
else {
|
|
7656
|
+
if (existingField.selectionSet) {
|
|
7657
|
+
const mergedSelections = mergeSelectionSets(existingField.selectionSet, fragmentFieldSelection.selectionSet);
|
|
7658
|
+
existingField.selectionSet.selections = mergedSelections
|
|
7659
|
+
? mergedSelections.selections
|
|
7660
|
+
: [];
|
|
7661
|
+
}
|
|
7662
|
+
}
|
|
7663
|
+
}
|
|
7649
7664
|
|
|
7650
7665
|
function buildFieldState(state, fullPath, data) {
|
|
7651
7666
|
return {
|
|
@@ -7714,6 +7729,220 @@ function serializeValueNode(valueNode, variables) {
|
|
|
7714
7729
|
}
|
|
7715
7730
|
}
|
|
7716
7731
|
}
|
|
7732
|
+
let selectionSetRequestedFieldsWeakMap = new WeakMap();
|
|
7733
|
+
function getRequestedFieldsForType(typename, selectionSet, namedFragmentsMap, isFragmentApplicable) {
|
|
7734
|
+
let cachedRequestedFieldsConfigurations = selectionSetRequestedFieldsWeakMap.get(selectionSet);
|
|
7735
|
+
if (cachedRequestedFieldsConfigurations === undefined) {
|
|
7736
|
+
cachedRequestedFieldsConfigurations = new Map();
|
|
7737
|
+
selectionSetRequestedFieldsWeakMap.set(selectionSet, cachedRequestedFieldsConfigurations);
|
|
7738
|
+
}
|
|
7739
|
+
const cachedRequestedFieldsForType = cachedRequestedFieldsConfigurations.get(typename);
|
|
7740
|
+
if (cachedRequestedFieldsForType !== undefined) {
|
|
7741
|
+
return cachedRequestedFieldsForType;
|
|
7742
|
+
}
|
|
7743
|
+
const selections = calculateRequestedFieldsForType(typename, selectionSet, namedFragmentsMap, isFragmentApplicable);
|
|
7744
|
+
cachedRequestedFieldsConfigurations.set(typename, selections);
|
|
7745
|
+
return selections;
|
|
7746
|
+
}
|
|
7747
|
+
function getRequestedField(responseDataFieldName, requestedFields) {
|
|
7748
|
+
return requestedFields.find((fieldNode) => (fieldNode.alias && fieldNode.alias.value === responseDataFieldName) ||
|
|
7749
|
+
(!fieldNode.alias && fieldNode.name.value === responseDataFieldName));
|
|
7750
|
+
}
|
|
7751
|
+
function calculateRequestedFieldsForType(typename, selectionSet, namedFragmentsMap, isFragmentApplicable) {
|
|
7752
|
+
const selections = [];
|
|
7753
|
+
selectionSet.selections.forEach((selection) => {
|
|
7754
|
+
if (selection.kind === 'Field') {
|
|
7755
|
+
selections.push(selection);
|
|
7756
|
+
}
|
|
7757
|
+
if (selection.kind === 'InlineFragment' && isFragmentApplicable(selection, typename)) {
|
|
7758
|
+
// loops over the map to get the values.
|
|
7759
|
+
getRequestedFieldsForType(typename, selection.selectionSet, namedFragmentsMap, isFragmentApplicable).forEach((fragmentFieldSelection) => {
|
|
7760
|
+
mergeFragmentWithExistingSelections(fragmentFieldSelection, selections);
|
|
7761
|
+
});
|
|
7762
|
+
}
|
|
7763
|
+
if (selection.kind === 'FragmentSpread') {
|
|
7764
|
+
const namedFragment = namedFragmentsMap[selection.name.value];
|
|
7765
|
+
if (namedFragment && isFragmentApplicable(namedFragment, typename)) {
|
|
7766
|
+
// loops over the map to get the values.
|
|
7767
|
+
getRequestedFieldsForType(typename, namedFragment.selectionSet, namedFragmentsMap, isFragmentApplicable).forEach((fragmentFieldSelection) => {
|
|
7768
|
+
mergeFragmentWithExistingSelections(fragmentFieldSelection, selections);
|
|
7769
|
+
});
|
|
7770
|
+
}
|
|
7771
|
+
}
|
|
7772
|
+
});
|
|
7773
|
+
// Needs to happen after the selections are merged.
|
|
7774
|
+
return selections.reduce((acc, fieldNode) => {
|
|
7775
|
+
const fieldName = fieldNode.alias ? fieldNode.alias.value : fieldNode.name.value;
|
|
7776
|
+
// TODO: W-13485835. Some fields are not being merged, and this logic reproduces the current behavior in which the first field with name is being used.
|
|
7777
|
+
if (!acc.has(fieldName)) {
|
|
7778
|
+
acc.set(fieldName, fieldNode);
|
|
7779
|
+
}
|
|
7780
|
+
else {
|
|
7781
|
+
const existingFieldNode = acc.get(fieldName);
|
|
7782
|
+
acc.set(fieldName, {
|
|
7783
|
+
...existingFieldNode,
|
|
7784
|
+
selectionSet: mergeSelectionSets(existingFieldNode === null || existingFieldNode === void 0 ? void 0 : existingFieldNode.selectionSet, fieldNode.selectionSet),
|
|
7785
|
+
});
|
|
7786
|
+
}
|
|
7787
|
+
return acc;
|
|
7788
|
+
}, new Map());
|
|
7789
|
+
}
|
|
7790
|
+
function mergeSelectionSets(set1, set2) {
|
|
7791
|
+
if (!set2) {
|
|
7792
|
+
return set1;
|
|
7793
|
+
}
|
|
7794
|
+
const set1Selections = !set1 ? [] : set1.selections;
|
|
7795
|
+
const mergedSelections = [...set1Selections];
|
|
7796
|
+
for (const selection of set2.selections) {
|
|
7797
|
+
if (selection.kind === 'Field') {
|
|
7798
|
+
const existingFieldIndex = mergedSelections.findIndex((sel) => {
|
|
7799
|
+
return sel.kind === 'Field' && isExactSameField(sel, selection);
|
|
7800
|
+
});
|
|
7801
|
+
if (existingFieldIndex > -1) {
|
|
7802
|
+
const existingField = mergedSelections[existingFieldIndex];
|
|
7803
|
+
const mergedSelectionSet = mergeSelectionSets(existingField.selectionSet, selection.selectionSet);
|
|
7804
|
+
if (mergedSelectionSet) {
|
|
7805
|
+
mergedSelections[existingFieldIndex] = {
|
|
7806
|
+
...existingField,
|
|
7807
|
+
selectionSet: mergedSelectionSet,
|
|
7808
|
+
};
|
|
7809
|
+
}
|
|
7810
|
+
}
|
|
7811
|
+
else {
|
|
7812
|
+
mergedSelections.push(selection);
|
|
7813
|
+
}
|
|
7814
|
+
}
|
|
7815
|
+
else if (selection.kind === 'FragmentSpread') {
|
|
7816
|
+
if (!mergedSelections.some((sel) => sel.kind === 'FragmentSpread' &&
|
|
7817
|
+
sel.name.value === selection.name.value &&
|
|
7818
|
+
areDirectivesEqual(sel.directives, selection.directives))) {
|
|
7819
|
+
mergedSelections.push(selection);
|
|
7820
|
+
}
|
|
7821
|
+
}
|
|
7822
|
+
else if (selection.kind === 'InlineFragment') {
|
|
7823
|
+
const existingFragmentIndex = mergedSelections.findIndex((sel) => {
|
|
7824
|
+
return (sel.kind === 'InlineFragment' &&
|
|
7825
|
+
areTypeConditionsEqual(sel.typeCondition, selection.typeCondition) &&
|
|
7826
|
+
areDirectivesEqual(sel.directives, selection.directives));
|
|
7827
|
+
});
|
|
7828
|
+
if (existingFragmentIndex > -1) {
|
|
7829
|
+
const existingFragment = mergedSelections[existingFragmentIndex];
|
|
7830
|
+
const mergedSelectionSet = mergeSelectionSets(existingFragment.selectionSet, selection.selectionSet);
|
|
7831
|
+
if (mergedSelectionSet) {
|
|
7832
|
+
mergedSelections[existingFragmentIndex] = {
|
|
7833
|
+
...existingFragment,
|
|
7834
|
+
selectionSet: mergedSelectionSet,
|
|
7835
|
+
};
|
|
7836
|
+
}
|
|
7837
|
+
}
|
|
7838
|
+
else {
|
|
7839
|
+
mergedSelections.push(selection);
|
|
7840
|
+
}
|
|
7841
|
+
}
|
|
7842
|
+
}
|
|
7843
|
+
return { kind: 'SelectionSet', selections: mergedSelections };
|
|
7844
|
+
}
|
|
7845
|
+
function areArgumentsEqual(args1, args2) {
|
|
7846
|
+
if (!args1 && !args2) {
|
|
7847
|
+
return true;
|
|
7848
|
+
}
|
|
7849
|
+
// length 0 arguments is semantically equivalent to falsy arguments.
|
|
7850
|
+
if ((!args1 || args1.length === 0) && (!args2 || args2.length === 0)) {
|
|
7851
|
+
return true;
|
|
7852
|
+
}
|
|
7853
|
+
if ((!args1 && args2) || (args1 && !args2)) {
|
|
7854
|
+
return false;
|
|
7855
|
+
}
|
|
7856
|
+
if (args1.length !== args2.length) {
|
|
7857
|
+
return false;
|
|
7858
|
+
}
|
|
7859
|
+
for (const arg of args1) {
|
|
7860
|
+
const matchingArg = args2.find((a) => a.name.value === arg.name.value && areValuesEqual(a.value, arg.value));
|
|
7861
|
+
if (!matchingArg) {
|
|
7862
|
+
return false;
|
|
7863
|
+
}
|
|
7864
|
+
}
|
|
7865
|
+
return true;
|
|
7866
|
+
}
|
|
7867
|
+
function areDirectivesEqual(dirs1, dirs2) {
|
|
7868
|
+
if (!dirs1 && !dirs2) {
|
|
7869
|
+
return true;
|
|
7870
|
+
}
|
|
7871
|
+
if ((!dirs1 || dirs1.length === 0) && (!dirs2 || dirs2.length === 0)) {
|
|
7872
|
+
return true;
|
|
7873
|
+
}
|
|
7874
|
+
if ((!dirs1 && dirs2) || (dirs1 && !dirs2)) {
|
|
7875
|
+
return false;
|
|
7876
|
+
}
|
|
7877
|
+
if (dirs1.length !== dirs2.length) {
|
|
7878
|
+
return false;
|
|
7879
|
+
}
|
|
7880
|
+
for (const dir of dirs1) {
|
|
7881
|
+
const matchingDir = dirs2.find((d) => d.name.value === dir.name.value && areArgumentsEqual(d.arguments, dir.arguments));
|
|
7882
|
+
if (!matchingDir) {
|
|
7883
|
+
return false;
|
|
7884
|
+
}
|
|
7885
|
+
}
|
|
7886
|
+
return true;
|
|
7887
|
+
}
|
|
7888
|
+
function areValuesEqual(valueNode1, valueNode2) {
|
|
7889
|
+
if (valueNode1.kind !== valueNode2.kind) {
|
|
7890
|
+
return false;
|
|
7891
|
+
}
|
|
7892
|
+
// Typescript doesn't understand that the above check means that the switch applies to both values. So there will be casts here.
|
|
7893
|
+
switch (valueNode1.kind) {
|
|
7894
|
+
case 'StringValue':
|
|
7895
|
+
case 'IntValue':
|
|
7896
|
+
case 'FloatValue':
|
|
7897
|
+
case 'BooleanValue':
|
|
7898
|
+
case 'EnumValue':
|
|
7899
|
+
return valueNode1.value === valueNode2.value;
|
|
7900
|
+
case 'NullValue':
|
|
7901
|
+
return true; // Both Null value nodes? Always true.
|
|
7902
|
+
case 'ListValue':
|
|
7903
|
+
if (valueNode1.values.length !== valueNode2.values.length) {
|
|
7904
|
+
return false;
|
|
7905
|
+
}
|
|
7906
|
+
for (let i = 0; i < valueNode1.values.length; i++) {
|
|
7907
|
+
if (!areValuesEqual(valueNode1.values[i], valueNode2.values[i])) {
|
|
7908
|
+
return false;
|
|
7909
|
+
}
|
|
7910
|
+
}
|
|
7911
|
+
return true;
|
|
7912
|
+
case 'ObjectValue':
|
|
7913
|
+
if (valueNode1.fields.length !== valueNode2.fields.length) {
|
|
7914
|
+
return false;
|
|
7915
|
+
}
|
|
7916
|
+
for (let i = 0; i < valueNode1.fields.length; i++) {
|
|
7917
|
+
const field1 = valueNode1.fields[i];
|
|
7918
|
+
const field2 = valueNode2.fields.find((f) => f.name.value === field1.name.value);
|
|
7919
|
+
if (!field2 || !areValuesEqual(field1.value, field2.value)) {
|
|
7920
|
+
return false;
|
|
7921
|
+
}
|
|
7922
|
+
}
|
|
7923
|
+
return true;
|
|
7924
|
+
case 'Variable':
|
|
7925
|
+
return valueNode1.name.value === valueNode2.name.value;
|
|
7926
|
+
default:
|
|
7927
|
+
return false;
|
|
7928
|
+
}
|
|
7929
|
+
}
|
|
7930
|
+
function areTypeConditionsEqual(typeCondition1, typeCondition2) {
|
|
7931
|
+
if (typeCondition1 === undefined && typeCondition2 === undefined) {
|
|
7932
|
+
return true;
|
|
7933
|
+
}
|
|
7934
|
+
if ((!typeCondition1 && typeCondition2) || (typeCondition1 && !typeCondition2)) {
|
|
7935
|
+
return false;
|
|
7936
|
+
}
|
|
7937
|
+
return typeCondition1.name.value === typeCondition2.name.value;
|
|
7938
|
+
}
|
|
7939
|
+
function isExactSameField(field1, field2) {
|
|
7940
|
+
var _a, _b;
|
|
7941
|
+
return (field1.name.value === field2.name.value &&
|
|
7942
|
+
((_a = field1.alias) === null || _a === void 0 ? void 0 : _a.value) === ((_b = field2.alias) === null || _b === void 0 ? void 0 : _b.value) &&
|
|
7943
|
+
areArgumentsEqual(field1.arguments, field2.arguments) &&
|
|
7944
|
+
areDirectivesEqual(field1.directives, field2.directives));
|
|
7945
|
+
}
|
|
7717
7946
|
|
|
7718
7947
|
function serializeOperationNode(operationNode, variables, fragmentMap) {
|
|
7719
7948
|
return `${serializeSelectionSet(operationNode.selectionSet, variables, fragmentMap)}`;
|
|
@@ -7770,6 +7999,53 @@ function getOperationFromDocument(document, operationName) {
|
|
|
7770
7999
|
return operations[0]; // If a named operation is not provided, we return the first one
|
|
7771
8000
|
}
|
|
7772
8001
|
|
|
8002
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty$1 } = Object.prototype;
|
|
8003
|
+
// Deep merge that works on GraphQL data. It:
|
|
8004
|
+
// - recursively merges any Object properties that are present in both
|
|
8005
|
+
// - recursively merges arrays by deepMerging each Object item in the array (by index).
|
|
8006
|
+
function deepMerge(target, ...sources) {
|
|
8007
|
+
for (const source of sources) {
|
|
8008
|
+
for (const key in source) {
|
|
8009
|
+
if (ObjectPrototypeHasOwnProperty$1.call(source, key)) {
|
|
8010
|
+
const targetValue = target[key];
|
|
8011
|
+
const sourceValue = source[key];
|
|
8012
|
+
if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {
|
|
8013
|
+
const maxLength = Math.max(targetValue.length, sourceValue.length);
|
|
8014
|
+
target[key] = Array.from({ length: maxLength }, (_, index) => {
|
|
8015
|
+
const targetItem = targetValue[index];
|
|
8016
|
+
const sourceItem = sourceValue[index];
|
|
8017
|
+
if (targetItem === undefined) {
|
|
8018
|
+
return sourceItem;
|
|
8019
|
+
}
|
|
8020
|
+
else if (sourceItem === undefined) {
|
|
8021
|
+
return targetItem;
|
|
8022
|
+
}
|
|
8023
|
+
else if (targetItem instanceof Object &&
|
|
8024
|
+
!Array.isArray(targetItem) &&
|
|
8025
|
+
sourceItem instanceof Object &&
|
|
8026
|
+
!Array.isArray(sourceItem)) {
|
|
8027
|
+
return deepMerge({}, targetItem, sourceItem);
|
|
8028
|
+
}
|
|
8029
|
+
else {
|
|
8030
|
+
return sourceItem;
|
|
8031
|
+
}
|
|
8032
|
+
});
|
|
8033
|
+
}
|
|
8034
|
+
else if (targetValue instanceof Object &&
|
|
8035
|
+
!Array.isArray(targetValue) &&
|
|
8036
|
+
sourceValue instanceof Object &&
|
|
8037
|
+
!Array.isArray(sourceValue)) {
|
|
8038
|
+
deepMerge(targetValue, sourceValue);
|
|
8039
|
+
}
|
|
8040
|
+
else {
|
|
8041
|
+
target[key] = sourceValue;
|
|
8042
|
+
}
|
|
8043
|
+
}
|
|
8044
|
+
}
|
|
8045
|
+
}
|
|
8046
|
+
return target;
|
|
8047
|
+
}
|
|
8048
|
+
|
|
7773
8049
|
/**
|
|
7774
8050
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
7775
8051
|
* All rights reserved.
|
|
@@ -10345,7 +10621,7 @@ function getTypeCacheKeys$1T(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
10345
10621
|
getTypeCacheKeys$1W(rootKeySet, luvio, input_fields[key], () => rootKey + "__fields" + "__" + key);
|
|
10346
10622
|
}
|
|
10347
10623
|
}
|
|
10348
|
-
const notifyUpdateAvailableFactory$
|
|
10624
|
+
const notifyUpdateAvailableFactory$3 = (luvio) => {
|
|
10349
10625
|
return function notifyRecordUpdateAvailable(configs) {
|
|
10350
10626
|
if (process.env.NODE_ENV !== 'production') {
|
|
10351
10627
|
const requiredKeyParams = ['recordId'];
|
|
@@ -19969,6 +20245,150 @@ function getTypeCacheKeys$1L(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
19969
20245
|
});
|
|
19970
20246
|
}
|
|
19971
20247
|
|
|
20248
|
+
const TTL$v = 900000;
|
|
20249
|
+
const VERSION$25 = "993b0a7bce6056c4f57ed300ec153d9c";
|
|
20250
|
+
function validate$1e(obj, path = 'QuickActionDefaultsRepresentation') {
|
|
20251
|
+
const v_error = (() => {
|
|
20252
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
20253
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
20254
|
+
}
|
|
20255
|
+
const obj_actionApiName = obj.actionApiName;
|
|
20256
|
+
const path_actionApiName = path + '.actionApiName';
|
|
20257
|
+
if (typeof obj_actionApiName !== 'string') {
|
|
20258
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionApiName + '" (at "' + path_actionApiName + '")');
|
|
20259
|
+
}
|
|
20260
|
+
const obj_eTag = obj.eTag;
|
|
20261
|
+
const path_eTag = path + '.eTag';
|
|
20262
|
+
if (typeof obj_eTag !== 'string') {
|
|
20263
|
+
return new TypeError('Expected "string" but received "' + typeof obj_eTag + '" (at "' + path_eTag + '")');
|
|
20264
|
+
}
|
|
20265
|
+
const obj_fields = obj.fields;
|
|
20266
|
+
const path_fields = path + '.fields';
|
|
20267
|
+
if (typeof obj_fields !== 'object' || ArrayIsArray(obj_fields) || obj_fields === null) {
|
|
20268
|
+
return new TypeError('Expected "object" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
|
|
20269
|
+
}
|
|
20270
|
+
const obj_fields_keys = ObjectKeys(obj_fields);
|
|
20271
|
+
for (let i = 0; i < obj_fields_keys.length; i++) {
|
|
20272
|
+
const key = obj_fields_keys[i];
|
|
20273
|
+
const obj_fields_prop = obj_fields[key];
|
|
20274
|
+
const path_fields_prop = path_fields + '["' + key + '"]';
|
|
20275
|
+
if (typeof obj_fields_prop !== 'object') {
|
|
20276
|
+
return new TypeError('Expected "object" but received "' + typeof obj_fields_prop + '" (at "' + path_fields_prop + '")');
|
|
20277
|
+
}
|
|
20278
|
+
}
|
|
20279
|
+
const obj_objectApiName = obj.objectApiName;
|
|
20280
|
+
const path_objectApiName = path + '.objectApiName';
|
|
20281
|
+
if (typeof obj_objectApiName !== 'string') {
|
|
20282
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectApiName + '" (at "' + path_objectApiName + '")');
|
|
20283
|
+
}
|
|
20284
|
+
})();
|
|
20285
|
+
return v_error === undefined ? null : v_error;
|
|
20286
|
+
}
|
|
20287
|
+
const RepresentationType$J = 'QuickActionDefaultsRepresentation';
|
|
20288
|
+
function keyBuilder$2L(luvio, config) {
|
|
20289
|
+
return keyPrefix + '::' + RepresentationType$J + ':' + config.actionApiName;
|
|
20290
|
+
}
|
|
20291
|
+
function keyBuilderFromType$p(luvio, object) {
|
|
20292
|
+
const keyParams = {
|
|
20293
|
+
actionApiName: object.actionApiName
|
|
20294
|
+
};
|
|
20295
|
+
return keyBuilder$2L(luvio, keyParams);
|
|
20296
|
+
}
|
|
20297
|
+
function dynamicNormalize$4(ingestParams) {
|
|
20298
|
+
return function normalize_dynamic(input, existing, path, luvio, store, timestamp) {
|
|
20299
|
+
const input_fields = input.fields;
|
|
20300
|
+
const input_fields_id = path.fullPath + '__fields';
|
|
20301
|
+
const input_fields_keys = Object.keys(input_fields);
|
|
20302
|
+
const input_fields_length = input_fields_keys.length;
|
|
20303
|
+
for (let i = 0; i < input_fields_length; i++) {
|
|
20304
|
+
const key = input_fields_keys[i];
|
|
20305
|
+
const input_fields_prop = input_fields[key];
|
|
20306
|
+
const input_fields_prop_id = input_fields_id + '__' + key;
|
|
20307
|
+
input_fields[key] = ingestParams.fields(input_fields_prop, {
|
|
20308
|
+
fullPath: input_fields_prop_id,
|
|
20309
|
+
propertyName: key,
|
|
20310
|
+
parent: {
|
|
20311
|
+
data: input,
|
|
20312
|
+
key: path.fullPath,
|
|
20313
|
+
existing: existing,
|
|
20314
|
+
},
|
|
20315
|
+
ttl: path.ttl
|
|
20316
|
+
}, luvio, store, timestamp);
|
|
20317
|
+
}
|
|
20318
|
+
return input;
|
|
20319
|
+
};
|
|
20320
|
+
}
|
|
20321
|
+
const dynamicSelect$5 = function dynamicQuickActionDefaultsRepresentationSelect(params) {
|
|
20322
|
+
const fieldsPathSelection = params.fields === undefined ? {
|
|
20323
|
+
name: 'fields',
|
|
20324
|
+
kind: 'Link',
|
|
20325
|
+
map: true,
|
|
20326
|
+
fragment: select$2Q()
|
|
20327
|
+
} : params.fields;
|
|
20328
|
+
return {
|
|
20329
|
+
kind: 'Fragment',
|
|
20330
|
+
version: VERSION$25,
|
|
20331
|
+
private: [
|
|
20332
|
+
'eTag'
|
|
20333
|
+
],
|
|
20334
|
+
selections: [
|
|
20335
|
+
{
|
|
20336
|
+
name: 'actionApiName',
|
|
20337
|
+
kind: 'Scalar'
|
|
20338
|
+
},
|
|
20339
|
+
fieldsPathSelection,
|
|
20340
|
+
{
|
|
20341
|
+
name: 'objectApiName',
|
|
20342
|
+
kind: 'Scalar'
|
|
20343
|
+
}
|
|
20344
|
+
]
|
|
20345
|
+
};
|
|
20346
|
+
};
|
|
20347
|
+
function equals$P(existing, incoming) {
|
|
20348
|
+
const existing_actionApiName = existing.actionApiName;
|
|
20349
|
+
const incoming_actionApiName = incoming.actionApiName;
|
|
20350
|
+
if (!(existing_actionApiName === incoming_actionApiName)) {
|
|
20351
|
+
return false;
|
|
20352
|
+
}
|
|
20353
|
+
const existing_eTag = existing.eTag;
|
|
20354
|
+
const incoming_eTag = incoming.eTag;
|
|
20355
|
+
if (!(existing_eTag === incoming_eTag)) {
|
|
20356
|
+
return false;
|
|
20357
|
+
}
|
|
20358
|
+
const existing_objectApiName = existing.objectApiName;
|
|
20359
|
+
const incoming_objectApiName = incoming.objectApiName;
|
|
20360
|
+
if (!(existing_objectApiName === incoming_objectApiName)) {
|
|
20361
|
+
return false;
|
|
20362
|
+
}
|
|
20363
|
+
const existing_fields = existing.fields;
|
|
20364
|
+
const incoming_fields = incoming.fields;
|
|
20365
|
+
const equals_fields_props = equalsObject(existing_fields, incoming_fields, (existing_fields_prop, incoming_fields_prop) => {
|
|
20366
|
+
if (!(existing_fields_prop.__ref === incoming_fields_prop.__ref)) {
|
|
20367
|
+
return false;
|
|
20368
|
+
}
|
|
20369
|
+
});
|
|
20370
|
+
if (equals_fields_props === false) {
|
|
20371
|
+
return false;
|
|
20372
|
+
}
|
|
20373
|
+
return true;
|
|
20374
|
+
}
|
|
20375
|
+
function getTypeCacheKeys$1K(rootKeySet, luvio, input, fullPathFactory) {
|
|
20376
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
20377
|
+
const rootKey = keyBuilderFromType$p(luvio, input);
|
|
20378
|
+
rootKeySet.set(rootKey, {
|
|
20379
|
+
namespace: keyPrefix,
|
|
20380
|
+
representationName: RepresentationType$J,
|
|
20381
|
+
mergeable: false
|
|
20382
|
+
});
|
|
20383
|
+
const input_fields = input.fields;
|
|
20384
|
+
const input_fields_keys = ObjectKeys(input_fields);
|
|
20385
|
+
const input_fields_length = input_fields_keys.length;
|
|
20386
|
+
for (let i = 0; i < input_fields_length; i++) {
|
|
20387
|
+
const key = input_fields_keys[i];
|
|
20388
|
+
getTypeCacheKeys$1W(rootKeySet, luvio, input_fields[key], () => rootKey + "__fields" + "__" + key);
|
|
20389
|
+
}
|
|
20390
|
+
}
|
|
20391
|
+
|
|
19972
20392
|
function toSortedStringArrayAllowEmpty(value) {
|
|
19973
20393
|
const valueArray = isArray(value) ? value : [value];
|
|
19974
20394
|
if (valueArray.length === 0) {
|
|
@@ -19991,8 +20411,8 @@ function coerceFormFactor(form) {
|
|
|
19991
20411
|
return undefined;
|
|
19992
20412
|
}
|
|
19993
20413
|
|
|
19994
|
-
const VERSION$
|
|
19995
|
-
function validate$
|
|
20414
|
+
const VERSION$24 = "3f49d751896cf66e6e29788d8880e2cc";
|
|
20415
|
+
function validate$1d(obj, path = 'PlatformActionRepresentation') {
|
|
19996
20416
|
const v_error = (() => {
|
|
19997
20417
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
19998
20418
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -20326,17 +20746,17 @@ function validate$1e(obj, path = 'PlatformActionRepresentation') {
|
|
|
20326
20746
|
})();
|
|
20327
20747
|
return v_error === undefined ? null : v_error;
|
|
20328
20748
|
}
|
|
20329
|
-
const RepresentationType$
|
|
20330
|
-
function keyBuilder$
|
|
20331
|
-
return keyPrefix + '::' + RepresentationType$
|
|
20749
|
+
const RepresentationType$I = 'PlatformActionRepresentation';
|
|
20750
|
+
function keyBuilder$2K(luvio, config) {
|
|
20751
|
+
return keyPrefix + '::' + RepresentationType$I + ':' + config.externalId + ':' + (config.relatedSourceObject === null ? '' : config.relatedSourceObject) + ':' + (config.relatedListRecordId === null ? '' : config.relatedListRecordId);
|
|
20332
20752
|
}
|
|
20333
|
-
function keyBuilderFromType$
|
|
20753
|
+
function keyBuilderFromType$o(luvio, object) {
|
|
20334
20754
|
const keyParams = {
|
|
20335
20755
|
externalId: object.externalId,
|
|
20336
20756
|
relatedSourceObject: object.relatedSourceObject,
|
|
20337
20757
|
relatedListRecordId: object.relatedListRecordId
|
|
20338
20758
|
};
|
|
20339
|
-
return keyBuilder$
|
|
20759
|
+
return keyBuilder$2K(luvio, keyParams);
|
|
20340
20760
|
}
|
|
20341
20761
|
function normalize$B(input, existing, path, luvio, store, timestamp) {
|
|
20342
20762
|
return input;
|
|
@@ -20344,7 +20764,7 @@ function normalize$B(input, existing, path, luvio, store, timestamp) {
|
|
|
20344
20764
|
const select$2A = function PlatformActionRepresentationSelect() {
|
|
20345
20765
|
return {
|
|
20346
20766
|
kind: 'Fragment',
|
|
20347
|
-
version: VERSION$
|
|
20767
|
+
version: VERSION$24,
|
|
20348
20768
|
private: [
|
|
20349
20769
|
'id'
|
|
20350
20770
|
],
|
|
@@ -20424,7 +20844,7 @@ const select$2A = function PlatformActionRepresentationSelect() {
|
|
|
20424
20844
|
]
|
|
20425
20845
|
};
|
|
20426
20846
|
};
|
|
20427
|
-
function equals$
|
|
20847
|
+
function equals$O(existing, incoming) {
|
|
20428
20848
|
const existing_actionListContext = existing.actionListContext;
|
|
20429
20849
|
const incoming_actionListContext = incoming.actionListContext;
|
|
20430
20850
|
if (!(existing_actionListContext === incoming_actionListContext)) {
|
|
@@ -20524,28 +20944,28 @@ function equals$P(existing, incoming) {
|
|
|
20524
20944
|
}
|
|
20525
20945
|
const ingest$1G = function PlatformActionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
20526
20946
|
if (process.env.NODE_ENV !== 'production') {
|
|
20527
|
-
const validateError = validate$
|
|
20947
|
+
const validateError = validate$1d(input);
|
|
20528
20948
|
if (validateError !== null) {
|
|
20529
20949
|
throw validateError;
|
|
20530
20950
|
}
|
|
20531
20951
|
}
|
|
20532
|
-
const key = keyBuilderFromType$
|
|
20952
|
+
const key = keyBuilderFromType$o(luvio, input);
|
|
20533
20953
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
20534
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$B, "UiApi", VERSION$
|
|
20954
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$B, "UiApi", VERSION$24, RepresentationType$I, equals$O);
|
|
20535
20955
|
return createLink$1(key);
|
|
20536
20956
|
};
|
|
20537
|
-
function getTypeCacheKeys$
|
|
20957
|
+
function getTypeCacheKeys$1J(rootKeySet, luvio, input, fullPathFactory) {
|
|
20538
20958
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
20539
|
-
const rootKey = keyBuilderFromType$
|
|
20959
|
+
const rootKey = keyBuilderFromType$o(luvio, input);
|
|
20540
20960
|
rootKeySet.set(rootKey, {
|
|
20541
20961
|
namespace: keyPrefix,
|
|
20542
|
-
representationName: RepresentationType$
|
|
20962
|
+
representationName: RepresentationType$I,
|
|
20543
20963
|
mergeable: false
|
|
20544
20964
|
});
|
|
20545
20965
|
}
|
|
20546
20966
|
|
|
20547
|
-
const VERSION$
|
|
20548
|
-
function validate$
|
|
20967
|
+
const VERSION$23 = "378d506f563a4bd724b322d440df33d1";
|
|
20968
|
+
function validate$1c(obj, path = 'EntityActionRepresentation') {
|
|
20549
20969
|
const v_error = (() => {
|
|
20550
20970
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
20551
20971
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -20582,15 +21002,15 @@ function validate$1d(obj, path = 'EntityActionRepresentation') {
|
|
|
20582
21002
|
})();
|
|
20583
21003
|
return v_error === undefined ? null : v_error;
|
|
20584
21004
|
}
|
|
20585
|
-
const RepresentationType$
|
|
20586
|
-
function keyBuilder$
|
|
20587
|
-
return keyPrefix + '::' + RepresentationType$
|
|
21005
|
+
const RepresentationType$H = 'EntityActionRepresentation';
|
|
21006
|
+
function keyBuilder$2J(luvio, config) {
|
|
21007
|
+
return keyPrefix + '::' + RepresentationType$H + ':' + config.url;
|
|
20588
21008
|
}
|
|
20589
|
-
function keyBuilderFromType$
|
|
21009
|
+
function keyBuilderFromType$n(luvio, object) {
|
|
20590
21010
|
const keyParams = {
|
|
20591
21011
|
url: object.url
|
|
20592
21012
|
};
|
|
20593
|
-
return keyBuilder$
|
|
21013
|
+
return keyBuilder$2J(luvio, keyParams);
|
|
20594
21014
|
}
|
|
20595
21015
|
function normalize$A(input, existing, path, luvio, store, timestamp) {
|
|
20596
21016
|
const input_actions = input.actions;
|
|
@@ -20614,7 +21034,7 @@ function normalize$A(input, existing, path, luvio, store, timestamp) {
|
|
|
20614
21034
|
const select$2z = function EntityActionRepresentationSelect() {
|
|
20615
21035
|
return {
|
|
20616
21036
|
kind: 'Fragment',
|
|
20617
|
-
version: VERSION$
|
|
21037
|
+
version: VERSION$23,
|
|
20618
21038
|
private: [
|
|
20619
21039
|
'links',
|
|
20620
21040
|
'url'
|
|
@@ -20629,7 +21049,7 @@ const select$2z = function EntityActionRepresentationSelect() {
|
|
|
20629
21049
|
]
|
|
20630
21050
|
};
|
|
20631
21051
|
};
|
|
20632
|
-
function equals$
|
|
21052
|
+
function equals$N(existing, incoming) {
|
|
20633
21053
|
const existing_url = existing.url;
|
|
20634
21054
|
const incoming_url = incoming.url;
|
|
20635
21055
|
if (!(existing_url === incoming_url)) {
|
|
@@ -20659,33 +21079,33 @@ function equals$O(existing, incoming) {
|
|
|
20659
21079
|
}
|
|
20660
21080
|
const ingest$1F = function EntityActionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
20661
21081
|
if (process.env.NODE_ENV !== 'production') {
|
|
20662
|
-
const validateError = validate$
|
|
21082
|
+
const validateError = validate$1c(input);
|
|
20663
21083
|
if (validateError !== null) {
|
|
20664
21084
|
throw validateError;
|
|
20665
21085
|
}
|
|
20666
21086
|
}
|
|
20667
|
-
const key = keyBuilderFromType$
|
|
21087
|
+
const key = keyBuilderFromType$n(luvio, input);
|
|
20668
21088
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
20669
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$A, "UiApi", VERSION$
|
|
21089
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$A, "UiApi", VERSION$23, RepresentationType$H, equals$N);
|
|
20670
21090
|
return createLink$1(key);
|
|
20671
21091
|
};
|
|
20672
|
-
function getTypeCacheKeys$
|
|
21092
|
+
function getTypeCacheKeys$1I(rootKeySet, luvio, input, fullPathFactory) {
|
|
20673
21093
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
20674
|
-
const rootKey = keyBuilderFromType$
|
|
21094
|
+
const rootKey = keyBuilderFromType$n(luvio, input);
|
|
20675
21095
|
rootKeySet.set(rootKey, {
|
|
20676
21096
|
namespace: keyPrefix,
|
|
20677
|
-
representationName: RepresentationType$
|
|
21097
|
+
representationName: RepresentationType$H,
|
|
20678
21098
|
mergeable: false
|
|
20679
21099
|
});
|
|
20680
21100
|
const input_actions_length = input.actions.length;
|
|
20681
21101
|
for (let i = 0; i < input_actions_length; i++) {
|
|
20682
|
-
getTypeCacheKeys$
|
|
21102
|
+
getTypeCacheKeys$1J(rootKeySet, luvio, input.actions[i]);
|
|
20683
21103
|
}
|
|
20684
21104
|
}
|
|
20685
21105
|
|
|
20686
|
-
const TTL$
|
|
20687
|
-
const VERSION$
|
|
20688
|
-
function validate$
|
|
21106
|
+
const TTL$u = 300000;
|
|
21107
|
+
const VERSION$22 = "e485d96c1402a9ca2f56e56485af0216";
|
|
21108
|
+
function validate$1b(obj, path = 'ActionRepresentation') {
|
|
20689
21109
|
const v_error = (() => {
|
|
20690
21110
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
20691
21111
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -20717,7 +21137,7 @@ function validate$1c(obj, path = 'ActionRepresentation') {
|
|
|
20717
21137
|
})();
|
|
20718
21138
|
return v_error === undefined ? null : v_error;
|
|
20719
21139
|
}
|
|
20720
|
-
const RepresentationType$
|
|
21140
|
+
const RepresentationType$G = 'ActionRepresentation';
|
|
20721
21141
|
function normalize$z(input, existing, path, luvio, store, timestamp) {
|
|
20722
21142
|
const input_actions = input.actions;
|
|
20723
21143
|
const input_actions_id = path.fullPath + '__actions';
|
|
@@ -20743,7 +21163,7 @@ function normalize$z(input, existing, path, luvio, store, timestamp) {
|
|
|
20743
21163
|
const select$2y = function ActionRepresentationSelect() {
|
|
20744
21164
|
return {
|
|
20745
21165
|
kind: 'Fragment',
|
|
20746
|
-
version: VERSION$
|
|
21166
|
+
version: VERSION$22,
|
|
20747
21167
|
private: [
|
|
20748
21168
|
'eTag',
|
|
20749
21169
|
'url'
|
|
@@ -20758,7 +21178,7 @@ const select$2y = function ActionRepresentationSelect() {
|
|
|
20758
21178
|
]
|
|
20759
21179
|
};
|
|
20760
21180
|
};
|
|
20761
|
-
function equals$
|
|
21181
|
+
function equals$M(existing, incoming) {
|
|
20762
21182
|
const existing_eTag = existing.eTag;
|
|
20763
21183
|
const incoming_eTag = incoming.eTag;
|
|
20764
21184
|
if (!(existing_eTag === incoming_eTag)) {
|
|
@@ -20783,22 +21203,22 @@ function equals$N(existing, incoming) {
|
|
|
20783
21203
|
}
|
|
20784
21204
|
const ingest$1E = function ActionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
20785
21205
|
if (process.env.NODE_ENV !== 'production') {
|
|
20786
|
-
const validateError = validate$
|
|
21206
|
+
const validateError = validate$1b(input);
|
|
20787
21207
|
if (validateError !== null) {
|
|
20788
21208
|
throw validateError;
|
|
20789
21209
|
}
|
|
20790
21210
|
}
|
|
20791
21211
|
const key = path.fullPath;
|
|
20792
|
-
const ttlToUse = TTL$
|
|
20793
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$z, "UiApi", VERSION$
|
|
21212
|
+
const ttlToUse = TTL$u;
|
|
21213
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$z, "UiApi", VERSION$22, RepresentationType$G, equals$M);
|
|
20794
21214
|
return createLink$1(key);
|
|
20795
21215
|
};
|
|
20796
|
-
function getTypeCacheKeys$
|
|
21216
|
+
function getTypeCacheKeys$1H(rootKeySet, luvio, input, fullPathFactory) {
|
|
20797
21217
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
20798
21218
|
const rootKey = fullPathFactory();
|
|
20799
21219
|
rootKeySet.set(rootKey, {
|
|
20800
21220
|
namespace: keyPrefix,
|
|
20801
|
-
representationName: RepresentationType$
|
|
21221
|
+
representationName: RepresentationType$G,
|
|
20802
21222
|
mergeable: false
|
|
20803
21223
|
});
|
|
20804
21224
|
const input_actions = input.actions;
|
|
@@ -20806,22 +21226,22 @@ function getTypeCacheKeys$1I(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
20806
21226
|
const input_actions_length = input_actions_keys.length;
|
|
20807
21227
|
for (let i = 0; i < input_actions_length; i++) {
|
|
20808
21228
|
const key = input_actions_keys[i];
|
|
20809
|
-
getTypeCacheKeys$
|
|
21229
|
+
getTypeCacheKeys$1I(rootKeySet, luvio, input_actions[key]);
|
|
20810
21230
|
}
|
|
20811
21231
|
}
|
|
20812
21232
|
|
|
20813
21233
|
function select$2x(luvio, params) {
|
|
20814
21234
|
return select$2y();
|
|
20815
21235
|
}
|
|
20816
|
-
function keyBuilder$
|
|
21236
|
+
function keyBuilder$2I(luvio, params) {
|
|
20817
21237
|
return keyPrefix + '::ActionRepresentation:(' + 'actionTypes:' + params.queryParams.actionTypes + ',' + 'apiNames:' + params.queryParams.apiNames + ',' + 'formFactor:' + params.queryParams.formFactor + ',' + 'retrievalMode:' + params.queryParams.retrievalMode + ',' + 'sections:' + params.queryParams.sections + ')';
|
|
20818
21238
|
}
|
|
20819
21239
|
function getResponseCacheKeys$S(storeKeyMap, luvio, resourceParams, response) {
|
|
20820
|
-
getTypeCacheKeys$
|
|
21240
|
+
getTypeCacheKeys$1H(storeKeyMap, luvio, response, () => keyBuilder$2I(luvio, resourceParams));
|
|
20821
21241
|
}
|
|
20822
21242
|
function ingestSuccess$I(luvio, resourceParams, response, snapshotRefresh) {
|
|
20823
21243
|
const { body } = response;
|
|
20824
|
-
const key = keyBuilder$
|
|
21244
|
+
const key = keyBuilder$2I(luvio, resourceParams);
|
|
20825
21245
|
luvio.storeIngest(key, ingest$1E, body);
|
|
20826
21246
|
const snapshot = luvio.storeLookup({
|
|
20827
21247
|
recordId: key,
|
|
@@ -20837,13 +21257,13 @@ function ingestSuccess$I(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
20837
21257
|
return snapshot;
|
|
20838
21258
|
}
|
|
20839
21259
|
function ingestError$E(luvio, params, error, snapshotRefresh) {
|
|
20840
|
-
const key = keyBuilder$
|
|
21260
|
+
const key = keyBuilder$2I(luvio, params);
|
|
20841
21261
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
20842
21262
|
const storeMetadataParams = {
|
|
20843
|
-
ttl: TTL$
|
|
21263
|
+
ttl: TTL$u,
|
|
20844
21264
|
namespace: keyPrefix,
|
|
20845
|
-
version: VERSION$
|
|
20846
|
-
representationName: RepresentationType$
|
|
21265
|
+
version: VERSION$22,
|
|
21266
|
+
representationName: RepresentationType$G
|
|
20847
21267
|
};
|
|
20848
21268
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
20849
21269
|
return errorSnapshot;
|
|
@@ -20872,9 +21292,9 @@ const getGlobalActions_ConfigPropertyMetadata = [
|
|
|
20872
21292
|
];
|
|
20873
21293
|
const getGlobalActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$N, getGlobalActions_ConfigPropertyMetadata);
|
|
20874
21294
|
const createResourceParams$R = /*#__PURE__*/ createResourceParams$k(getGlobalActions_ConfigPropertyMetadata);
|
|
20875
|
-
function keyBuilder$
|
|
21295
|
+
function keyBuilder$2H(luvio, config) {
|
|
20876
21296
|
const resourceParams = createResourceParams$R(config);
|
|
20877
|
-
return keyBuilder$
|
|
21297
|
+
return keyBuilder$2I(luvio, resourceParams);
|
|
20878
21298
|
}
|
|
20879
21299
|
function typeCheckConfig$X(untrustedConfig) {
|
|
20880
21300
|
const config = {};
|
|
@@ -20933,7 +21353,7 @@ function buildNetworkSnapshotCachePolicy$L(context, coercedAdapterRequestContext
|
|
|
20933
21353
|
function buildCachedSnapshotCachePolicy$K(context, storeLookup) {
|
|
20934
21354
|
const { luvio, config } = context;
|
|
20935
21355
|
const selector = {
|
|
20936
|
-
recordId: keyBuilder$
|
|
21356
|
+
recordId: keyBuilder$2H(luvio, config),
|
|
20937
21357
|
node: adapterFragment$D(luvio, config),
|
|
20938
21358
|
variables: {},
|
|
20939
21359
|
};
|
|
@@ -20953,9 +21373,9 @@ const getGlobalActionsAdapterFactory = (luvio) => function UiApi__getGlobalActio
|
|
|
20953
21373
|
buildCachedSnapshotCachePolicy$K, buildNetworkSnapshotCachePolicy$L);
|
|
20954
21374
|
};
|
|
20955
21375
|
|
|
20956
|
-
const TTL$
|
|
20957
|
-
const VERSION$
|
|
20958
|
-
function validate$
|
|
21376
|
+
const TTL$t = 900000;
|
|
21377
|
+
const VERSION$21 = "3c5af9dc4086169091e3c5df2414c495";
|
|
21378
|
+
function validate$1a(obj, path = 'QuickActionLayoutRepresentation') {
|
|
20959
21379
|
const v_error = (() => {
|
|
20960
21380
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
20961
21381
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -20981,15 +21401,15 @@ function validate$1b(obj, path = 'QuickActionLayoutRepresentation') {
|
|
|
20981
21401
|
})();
|
|
20982
21402
|
return v_error === undefined ? null : v_error;
|
|
20983
21403
|
}
|
|
20984
|
-
const RepresentationType$
|
|
20985
|
-
function keyBuilder$
|
|
20986
|
-
return keyPrefix + '::' + RepresentationType$
|
|
21404
|
+
const RepresentationType$F = 'QuickActionLayoutRepresentation';
|
|
21405
|
+
function keyBuilder$2G(luvio, config) {
|
|
21406
|
+
return keyPrefix + '::' + RepresentationType$F + ':' + config.actionApiName;
|
|
20987
21407
|
}
|
|
20988
|
-
function keyBuilderFromType$
|
|
21408
|
+
function keyBuilderFromType$m(luvio, object) {
|
|
20989
21409
|
const keyParams = {
|
|
20990
21410
|
actionApiName: object.actionApiName
|
|
20991
21411
|
};
|
|
20992
|
-
return keyBuilder$
|
|
21412
|
+
return keyBuilder$2G(luvio, keyParams);
|
|
20993
21413
|
}
|
|
20994
21414
|
function normalize$y(input, existing, path, luvio, store, timestamp) {
|
|
20995
21415
|
return input;
|
|
@@ -20997,7 +21417,7 @@ function normalize$y(input, existing, path, luvio, store, timestamp) {
|
|
|
20997
21417
|
const select$2w = function QuickActionLayoutRepresentationSelect() {
|
|
20998
21418
|
return {
|
|
20999
21419
|
kind: 'Fragment',
|
|
21000
|
-
version: VERSION$
|
|
21420
|
+
version: VERSION$21,
|
|
21001
21421
|
private: [
|
|
21002
21422
|
'eTag'
|
|
21003
21423
|
],
|
|
@@ -21014,7 +21434,7 @@ const select$2w = function QuickActionLayoutRepresentationSelect() {
|
|
|
21014
21434
|
]
|
|
21015
21435
|
};
|
|
21016
21436
|
};
|
|
21017
|
-
function equals$
|
|
21437
|
+
function equals$L(existing, incoming) {
|
|
21018
21438
|
if (existing.eTag !== incoming.eTag) {
|
|
21019
21439
|
return false;
|
|
21020
21440
|
}
|
|
@@ -21022,22 +21442,22 @@ function equals$M(existing, incoming) {
|
|
|
21022
21442
|
}
|
|
21023
21443
|
const ingest$1D = function QuickActionLayoutRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
21024
21444
|
if (process.env.NODE_ENV !== 'production') {
|
|
21025
|
-
const validateError = validate$
|
|
21445
|
+
const validateError = validate$1a(input);
|
|
21026
21446
|
if (validateError !== null) {
|
|
21027
21447
|
throw validateError;
|
|
21028
21448
|
}
|
|
21029
21449
|
}
|
|
21030
|
-
const key = keyBuilderFromType$
|
|
21031
|
-
const ttlToUse = TTL$
|
|
21032
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$y, "UiApi", VERSION$
|
|
21450
|
+
const key = keyBuilderFromType$m(luvio, input);
|
|
21451
|
+
const ttlToUse = TTL$t;
|
|
21452
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$y, "UiApi", VERSION$21, RepresentationType$F, equals$L);
|
|
21033
21453
|
return createLink$1(key);
|
|
21034
21454
|
};
|
|
21035
|
-
function getTypeCacheKeys$
|
|
21455
|
+
function getTypeCacheKeys$1G(rootKeySet, luvio, input, fullPathFactory) {
|
|
21036
21456
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
21037
|
-
const rootKey = keyBuilderFromType$
|
|
21457
|
+
const rootKey = keyBuilderFromType$m(luvio, input);
|
|
21038
21458
|
rootKeySet.set(rootKey, {
|
|
21039
21459
|
namespace: keyPrefix,
|
|
21040
|
-
representationName: RepresentationType$
|
|
21460
|
+
representationName: RepresentationType$F,
|
|
21041
21461
|
mergeable: false
|
|
21042
21462
|
});
|
|
21043
21463
|
}
|
|
@@ -21045,17 +21465,17 @@ function getTypeCacheKeys$1H(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
21045
21465
|
function select$2v(luvio, params) {
|
|
21046
21466
|
return select$2w();
|
|
21047
21467
|
}
|
|
21048
|
-
function keyBuilder$
|
|
21049
|
-
return keyBuilder$
|
|
21468
|
+
function keyBuilder$2F(luvio, params) {
|
|
21469
|
+
return keyBuilder$2G(luvio, {
|
|
21050
21470
|
actionApiName: params.urlParams.actionApiName
|
|
21051
21471
|
});
|
|
21052
21472
|
}
|
|
21053
21473
|
function getResponseCacheKeys$R(storeKeyMap, luvio, resourceParams, response) {
|
|
21054
|
-
getTypeCacheKeys$
|
|
21474
|
+
getTypeCacheKeys$1G(storeKeyMap, luvio, response);
|
|
21055
21475
|
}
|
|
21056
21476
|
function ingestSuccess$H(luvio, resourceParams, response, snapshotRefresh) {
|
|
21057
21477
|
const { body } = response;
|
|
21058
|
-
const key = keyBuilder$
|
|
21478
|
+
const key = keyBuilder$2F(luvio, resourceParams);
|
|
21059
21479
|
luvio.storeIngest(key, ingest$1D, body);
|
|
21060
21480
|
const snapshot = luvio.storeLookup({
|
|
21061
21481
|
recordId: key,
|
|
@@ -21071,13 +21491,13 @@ function ingestSuccess$H(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
21071
21491
|
return snapshot;
|
|
21072
21492
|
}
|
|
21073
21493
|
function ingestError$D(luvio, params, error, snapshotRefresh) {
|
|
21074
|
-
const key = keyBuilder$
|
|
21494
|
+
const key = keyBuilder$2F(luvio, params);
|
|
21075
21495
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
21076
21496
|
const storeMetadataParams = {
|
|
21077
|
-
ttl: TTL$
|
|
21497
|
+
ttl: TTL$t,
|
|
21078
21498
|
namespace: keyPrefix,
|
|
21079
|
-
version: VERSION$
|
|
21080
|
-
representationName: RepresentationType$
|
|
21499
|
+
version: VERSION$21,
|
|
21500
|
+
representationName: RepresentationType$F
|
|
21081
21501
|
};
|
|
21082
21502
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
21083
21503
|
return errorSnapshot;
|
|
@@ -21102,9 +21522,9 @@ const getQuickActionLayout_ConfigPropertyMetadata = [
|
|
|
21102
21522
|
];
|
|
21103
21523
|
const getQuickActionLayout_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$M, getQuickActionLayout_ConfigPropertyMetadata);
|
|
21104
21524
|
const createResourceParams$Q = /*#__PURE__*/ createResourceParams$k(getQuickActionLayout_ConfigPropertyMetadata);
|
|
21105
|
-
function keyBuilder$
|
|
21525
|
+
function keyBuilder$2E(luvio, config) {
|
|
21106
21526
|
const resourceParams = createResourceParams$Q(config);
|
|
21107
|
-
return keyBuilder$
|
|
21527
|
+
return keyBuilder$2F(luvio, resourceParams);
|
|
21108
21528
|
}
|
|
21109
21529
|
function typeCheckConfig$W(untrustedConfig) {
|
|
21110
21530
|
const config = {};
|
|
@@ -21162,7 +21582,7 @@ function buildNetworkSnapshotCachePolicy$K(context, coercedAdapterRequestContext
|
|
|
21162
21582
|
function buildCachedSnapshotCachePolicy$J(context, storeLookup) {
|
|
21163
21583
|
const { luvio, config } = context;
|
|
21164
21584
|
const selector = {
|
|
21165
|
-
recordId: keyBuilder$
|
|
21585
|
+
recordId: keyBuilder$2E(luvio, config),
|
|
21166
21586
|
node: adapterFragment$C(luvio, config),
|
|
21167
21587
|
variables: {},
|
|
21168
21588
|
};
|
|
@@ -21217,15 +21637,15 @@ function getSortedObjectApiNamesArray(value) {
|
|
|
21217
21637
|
function select$2u(luvio, params) {
|
|
21218
21638
|
return select$2y();
|
|
21219
21639
|
}
|
|
21220
|
-
function keyBuilder$
|
|
21640
|
+
function keyBuilder$2D(luvio, params) {
|
|
21221
21641
|
return keyPrefix + '::ActionRepresentation:(' + 'actionTypes:' + params.queryParams.actionTypes + ',' + 'formFactor:' + params.queryParams.formFactor + ',' + 'sections:' + params.queryParams.sections + ',' + 'objectApiNames:' + params.urlParams.objectApiNames + ')';
|
|
21222
21642
|
}
|
|
21223
21643
|
function getResponseCacheKeys$Q(storeKeyMap, luvio, resourceParams, response) {
|
|
21224
|
-
getTypeCacheKeys$
|
|
21644
|
+
getTypeCacheKeys$1H(storeKeyMap, luvio, response, () => keyBuilder$2D(luvio, resourceParams));
|
|
21225
21645
|
}
|
|
21226
21646
|
function ingestSuccess$G(luvio, resourceParams, response, snapshotRefresh) {
|
|
21227
21647
|
const { body } = response;
|
|
21228
|
-
const key = keyBuilder$
|
|
21648
|
+
const key = keyBuilder$2D(luvio, resourceParams);
|
|
21229
21649
|
luvio.storeIngest(key, ingest$1E, body);
|
|
21230
21650
|
const snapshot = luvio.storeLookup({
|
|
21231
21651
|
recordId: key,
|
|
@@ -21241,13 +21661,13 @@ function ingestSuccess$G(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
21241
21661
|
return snapshot;
|
|
21242
21662
|
}
|
|
21243
21663
|
function ingestError$C(luvio, params, error, snapshotRefresh) {
|
|
21244
|
-
const key = keyBuilder$
|
|
21664
|
+
const key = keyBuilder$2D(luvio, params);
|
|
21245
21665
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
21246
21666
|
const storeMetadataParams = {
|
|
21247
|
-
ttl: TTL$
|
|
21667
|
+
ttl: TTL$u,
|
|
21248
21668
|
namespace: keyPrefix,
|
|
21249
|
-
version: VERSION$
|
|
21250
|
-
representationName: RepresentationType$
|
|
21669
|
+
version: VERSION$22,
|
|
21670
|
+
representationName: RepresentationType$G
|
|
21251
21671
|
};
|
|
21252
21672
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
21253
21673
|
return errorSnapshot;
|
|
@@ -21275,9 +21695,9 @@ const getLookupActions_ConfigPropertyMetadata = [
|
|
|
21275
21695
|
];
|
|
21276
21696
|
const getLookupActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$L, getLookupActions_ConfigPropertyMetadata);
|
|
21277
21697
|
const createResourceParams$P = /*#__PURE__*/ createResourceParams$k(getLookupActions_ConfigPropertyMetadata);
|
|
21278
|
-
function keyBuilder$
|
|
21698
|
+
function keyBuilder$2C(luvio, config) {
|
|
21279
21699
|
const resourceParams = createResourceParams$P(config);
|
|
21280
|
-
return keyBuilder$
|
|
21700
|
+
return keyBuilder$2D(luvio, resourceParams);
|
|
21281
21701
|
}
|
|
21282
21702
|
function typeCheckConfig$V(untrustedConfig) {
|
|
21283
21703
|
const config = {};
|
|
@@ -21336,7 +21756,7 @@ function buildNetworkSnapshotCachePolicy$J(context, coercedAdapterRequestContext
|
|
|
21336
21756
|
function buildCachedSnapshotCachePolicy$I(context, storeLookup) {
|
|
21337
21757
|
const { luvio, config } = context;
|
|
21338
21758
|
const selector = {
|
|
21339
|
-
recordId: keyBuilder$
|
|
21759
|
+
recordId: keyBuilder$2C(luvio, config),
|
|
21340
21760
|
node: adapterFragment$B(luvio, config),
|
|
21341
21761
|
variables: {},
|
|
21342
21762
|
};
|
|
@@ -21359,15 +21779,15 @@ const getLookupActionsAdapterFactory = (luvio) => function UiApi__getLookupActio
|
|
|
21359
21779
|
function select$2t(luvio, params) {
|
|
21360
21780
|
return select$2y();
|
|
21361
21781
|
}
|
|
21362
|
-
function keyBuilder$
|
|
21782
|
+
function keyBuilder$2B(luvio, params) {
|
|
21363
21783
|
return keyPrefix + '::ActionRepresentation:(' + 'actionTypes:' + params.queryParams.actionTypes + ',' + 'formFactor:' + params.queryParams.formFactor + ',' + 'sections:' + params.queryParams.sections + ',' + 'objectApiName:' + params.urlParams.objectApiName + ')';
|
|
21364
21784
|
}
|
|
21365
21785
|
function getResponseCacheKeys$P(storeKeyMap, luvio, resourceParams, response) {
|
|
21366
|
-
getTypeCacheKeys$
|
|
21786
|
+
getTypeCacheKeys$1H(storeKeyMap, luvio, response, () => keyBuilder$2B(luvio, resourceParams));
|
|
21367
21787
|
}
|
|
21368
21788
|
function ingestSuccess$F(luvio, resourceParams, response, snapshotRefresh) {
|
|
21369
21789
|
const { body } = response;
|
|
21370
|
-
const key = keyBuilder$
|
|
21790
|
+
const key = keyBuilder$2B(luvio, resourceParams);
|
|
21371
21791
|
luvio.storeIngest(key, ingest$1E, body);
|
|
21372
21792
|
const snapshot = luvio.storeLookup({
|
|
21373
21793
|
recordId: key,
|
|
@@ -21383,13 +21803,13 @@ function ingestSuccess$F(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
21383
21803
|
return snapshot;
|
|
21384
21804
|
}
|
|
21385
21805
|
function ingestError$B(luvio, params, error, snapshotRefresh) {
|
|
21386
|
-
const key = keyBuilder$
|
|
21806
|
+
const key = keyBuilder$2B(luvio, params);
|
|
21387
21807
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
21388
21808
|
const storeMetadataParams = {
|
|
21389
|
-
ttl: TTL$
|
|
21809
|
+
ttl: TTL$u,
|
|
21390
21810
|
namespace: keyPrefix,
|
|
21391
|
-
version: VERSION$
|
|
21392
|
-
representationName: RepresentationType$
|
|
21811
|
+
version: VERSION$22,
|
|
21812
|
+
representationName: RepresentationType$G
|
|
21393
21813
|
};
|
|
21394
21814
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
21395
21815
|
return errorSnapshot;
|
|
@@ -21417,9 +21837,9 @@ const getObjectCreateActions_ConfigPropertyMetadata = [
|
|
|
21417
21837
|
];
|
|
21418
21838
|
const getObjectCreateActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$K, getObjectCreateActions_ConfigPropertyMetadata);
|
|
21419
21839
|
const createResourceParams$O = /*#__PURE__*/ createResourceParams$k(getObjectCreateActions_ConfigPropertyMetadata);
|
|
21420
|
-
function keyBuilder$
|
|
21840
|
+
function keyBuilder$2A(luvio, config) {
|
|
21421
21841
|
const resourceParams = createResourceParams$O(config);
|
|
21422
|
-
return keyBuilder$
|
|
21842
|
+
return keyBuilder$2B(luvio, resourceParams);
|
|
21423
21843
|
}
|
|
21424
21844
|
function typeCheckConfig$U(untrustedConfig) {
|
|
21425
21845
|
const config = {};
|
|
@@ -21478,7 +21898,7 @@ function buildNetworkSnapshotCachePolicy$I(context, coercedAdapterRequestContext
|
|
|
21478
21898
|
function buildCachedSnapshotCachePolicy$H(context, storeLookup) {
|
|
21479
21899
|
const { luvio, config } = context;
|
|
21480
21900
|
const selector = {
|
|
21481
|
-
recordId: keyBuilder$
|
|
21901
|
+
recordId: keyBuilder$2A(luvio, config),
|
|
21482
21902
|
node: adapterFragment$A(luvio, config),
|
|
21483
21903
|
variables: {},
|
|
21484
21904
|
};
|
|
@@ -21498,8 +21918,8 @@ const getObjectCreateActionsAdapterFactory = (luvio) => function UiApi__getObjec
|
|
|
21498
21918
|
buildCachedSnapshotCachePolicy$H, buildNetworkSnapshotCachePolicy$I);
|
|
21499
21919
|
};
|
|
21500
21920
|
|
|
21501
|
-
const VERSION$
|
|
21502
|
-
function validate$
|
|
21921
|
+
const VERSION$20 = "fecd80e9e24a1c1e75fd5395cd34ff2e";
|
|
21922
|
+
function validate$19(obj, path = 'ActionOverrideRepresentation') {
|
|
21503
21923
|
const v_error = (() => {
|
|
21504
21924
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
21505
21925
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -21512,19 +21932,19 @@ function validate$1a(obj, path = 'ActionOverrideRepresentation') {
|
|
|
21512
21932
|
})();
|
|
21513
21933
|
return v_error === undefined ? null : v_error;
|
|
21514
21934
|
}
|
|
21515
|
-
const RepresentationType$
|
|
21935
|
+
const RepresentationType$E = 'ActionOverrideRepresentation';
|
|
21516
21936
|
function normalize$x(input, existing, path, luvio, store, timestamp) {
|
|
21517
21937
|
return input;
|
|
21518
21938
|
}
|
|
21519
21939
|
const select$2s = function ActionOverrideRepresentationSelect() {
|
|
21520
21940
|
return {
|
|
21521
21941
|
kind: 'Fragment',
|
|
21522
|
-
version: VERSION$
|
|
21942
|
+
version: VERSION$20,
|
|
21523
21943
|
private: [],
|
|
21524
21944
|
opaque: true
|
|
21525
21945
|
};
|
|
21526
21946
|
};
|
|
21527
|
-
function equals$
|
|
21947
|
+
function equals$K(existing, incoming) {
|
|
21528
21948
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
21529
21949
|
return false;
|
|
21530
21950
|
}
|
|
@@ -21532,22 +21952,22 @@ function equals$L(existing, incoming) {
|
|
|
21532
21952
|
}
|
|
21533
21953
|
const ingest$1C = function ActionOverrideRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
21534
21954
|
if (process.env.NODE_ENV !== 'production') {
|
|
21535
|
-
const validateError = validate$
|
|
21955
|
+
const validateError = validate$19(input);
|
|
21536
21956
|
if (validateError !== null) {
|
|
21537
21957
|
throw validateError;
|
|
21538
21958
|
}
|
|
21539
21959
|
}
|
|
21540
21960
|
const key = path.fullPath;
|
|
21541
21961
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
21542
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$x, "UiApi", VERSION$
|
|
21962
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$x, "UiApi", VERSION$20, RepresentationType$E, equals$K);
|
|
21543
21963
|
return createLink$1(key);
|
|
21544
21964
|
};
|
|
21545
|
-
function getTypeCacheKeys$
|
|
21965
|
+
function getTypeCacheKeys$1F(rootKeySet, luvio, input, fullPathFactory) {
|
|
21546
21966
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
21547
21967
|
const rootKey = fullPathFactory();
|
|
21548
21968
|
rootKeySet.set(rootKey, {
|
|
21549
21969
|
namespace: keyPrefix,
|
|
21550
|
-
representationName: RepresentationType$
|
|
21970
|
+
representationName: RepresentationType$E,
|
|
21551
21971
|
mergeable: false
|
|
21552
21972
|
});
|
|
21553
21973
|
}
|
|
@@ -21555,15 +21975,15 @@ function getTypeCacheKeys$1G(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
21555
21975
|
function select$2r(luvio, params) {
|
|
21556
21976
|
return select$2s();
|
|
21557
21977
|
}
|
|
21558
|
-
function keyBuilder$
|
|
21978
|
+
function keyBuilder$2z(luvio, params) {
|
|
21559
21979
|
return keyPrefix + '::ActionOverrideRepresentation:(' + 'type:' + params.queryParams.type + ',' + 'objectApiName:' + params.urlParams.objectApiName + ')';
|
|
21560
21980
|
}
|
|
21561
21981
|
function getResponseCacheKeys$O(storeKeyMap, luvio, resourceParams, response) {
|
|
21562
|
-
getTypeCacheKeys$
|
|
21982
|
+
getTypeCacheKeys$1F(storeKeyMap, luvio, response, () => keyBuilder$2z(luvio, resourceParams));
|
|
21563
21983
|
}
|
|
21564
21984
|
function ingestSuccess$E(luvio, resourceParams, response, snapshotRefresh) {
|
|
21565
21985
|
const { body } = response;
|
|
21566
|
-
const key = keyBuilder$
|
|
21986
|
+
const key = keyBuilder$2z(luvio, resourceParams);
|
|
21567
21987
|
luvio.storeIngest(key, ingest$1C, body);
|
|
21568
21988
|
const snapshot = luvio.storeLookup({
|
|
21569
21989
|
recordId: key,
|
|
@@ -21579,7 +21999,7 @@ function ingestSuccess$E(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
21579
21999
|
return snapshot;
|
|
21580
22000
|
}
|
|
21581
22001
|
function ingestError$A(luvio, params, error, snapshotRefresh) {
|
|
21582
|
-
const key = keyBuilder$
|
|
22002
|
+
const key = keyBuilder$2z(luvio, params);
|
|
21583
22003
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
21584
22004
|
luvio.storeIngestError(key, errorSnapshot);
|
|
21585
22005
|
return errorSnapshot;
|
|
@@ -21605,9 +22025,9 @@ const getActionOverrides_ConfigPropertyMetadata = [
|
|
|
21605
22025
|
];
|
|
21606
22026
|
const getActionOverrides_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$J, getActionOverrides_ConfigPropertyMetadata);
|
|
21607
22027
|
const createResourceParams$N = /*#__PURE__*/ createResourceParams$k(getActionOverrides_ConfigPropertyMetadata);
|
|
21608
|
-
function keyBuilder$
|
|
22028
|
+
function keyBuilder$2y(luvio, config) {
|
|
21609
22029
|
const resourceParams = createResourceParams$N(config);
|
|
21610
|
-
return keyBuilder$
|
|
22030
|
+
return keyBuilder$2z(luvio, resourceParams);
|
|
21611
22031
|
}
|
|
21612
22032
|
function typeCheckConfig$T(untrustedConfig) {
|
|
21613
22033
|
const config = {};
|
|
@@ -21666,7 +22086,7 @@ function buildNetworkSnapshotCachePolicy$H(context, coercedAdapterRequestContext
|
|
|
21666
22086
|
function buildCachedSnapshotCachePolicy$G(context, storeLookup) {
|
|
21667
22087
|
const { luvio, config } = context;
|
|
21668
22088
|
const selector = {
|
|
21669
|
-
recordId: keyBuilder$
|
|
22089
|
+
recordId: keyBuilder$2y(luvio, config),
|
|
21670
22090
|
node: adapterFragment$z(luvio, config),
|
|
21671
22091
|
variables: {},
|
|
21672
22092
|
};
|
|
@@ -21686,155 +22106,11 @@ const getActionOverridesAdapterFactory = (luvio) => function UiApi__getActionOve
|
|
|
21686
22106
|
buildCachedSnapshotCachePolicy$G, buildNetworkSnapshotCachePolicy$H);
|
|
21687
22107
|
};
|
|
21688
22108
|
|
|
21689
|
-
const TTL$t = 900000;
|
|
21690
|
-
const VERSION$20 = "993b0a7bce6056c4f57ed300ec153d9c";
|
|
21691
|
-
function validate$19(obj, path = 'QuickActionDefaultsRepresentation') {
|
|
21692
|
-
const v_error = (() => {
|
|
21693
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
21694
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
21695
|
-
}
|
|
21696
|
-
const obj_actionApiName = obj.actionApiName;
|
|
21697
|
-
const path_actionApiName = path + '.actionApiName';
|
|
21698
|
-
if (typeof obj_actionApiName !== 'string') {
|
|
21699
|
-
return new TypeError('Expected "string" but received "' + typeof obj_actionApiName + '" (at "' + path_actionApiName + '")');
|
|
21700
|
-
}
|
|
21701
|
-
const obj_eTag = obj.eTag;
|
|
21702
|
-
const path_eTag = path + '.eTag';
|
|
21703
|
-
if (typeof obj_eTag !== 'string') {
|
|
21704
|
-
return new TypeError('Expected "string" but received "' + typeof obj_eTag + '" (at "' + path_eTag + '")');
|
|
21705
|
-
}
|
|
21706
|
-
const obj_fields = obj.fields;
|
|
21707
|
-
const path_fields = path + '.fields';
|
|
21708
|
-
if (typeof obj_fields !== 'object' || ArrayIsArray(obj_fields) || obj_fields === null) {
|
|
21709
|
-
return new TypeError('Expected "object" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
|
|
21710
|
-
}
|
|
21711
|
-
const obj_fields_keys = ObjectKeys(obj_fields);
|
|
21712
|
-
for (let i = 0; i < obj_fields_keys.length; i++) {
|
|
21713
|
-
const key = obj_fields_keys[i];
|
|
21714
|
-
const obj_fields_prop = obj_fields[key];
|
|
21715
|
-
const path_fields_prop = path_fields + '["' + key + '"]';
|
|
21716
|
-
if (typeof obj_fields_prop !== 'object') {
|
|
21717
|
-
return new TypeError('Expected "object" but received "' + typeof obj_fields_prop + '" (at "' + path_fields_prop + '")');
|
|
21718
|
-
}
|
|
21719
|
-
}
|
|
21720
|
-
const obj_objectApiName = obj.objectApiName;
|
|
21721
|
-
const path_objectApiName = path + '.objectApiName';
|
|
21722
|
-
if (typeof obj_objectApiName !== 'string') {
|
|
21723
|
-
return new TypeError('Expected "string" but received "' + typeof obj_objectApiName + '" (at "' + path_objectApiName + '")');
|
|
21724
|
-
}
|
|
21725
|
-
})();
|
|
21726
|
-
return v_error === undefined ? null : v_error;
|
|
21727
|
-
}
|
|
21728
|
-
const RepresentationType$E = 'QuickActionDefaultsRepresentation';
|
|
21729
|
-
function keyBuilder$2y(luvio, config) {
|
|
21730
|
-
return keyPrefix + '::' + RepresentationType$E + ':' + config.actionApiName;
|
|
21731
|
-
}
|
|
21732
|
-
function keyBuilderFromType$m(luvio, object) {
|
|
21733
|
-
const keyParams = {
|
|
21734
|
-
actionApiName: object.actionApiName
|
|
21735
|
-
};
|
|
21736
|
-
return keyBuilder$2y(luvio, keyParams);
|
|
21737
|
-
}
|
|
21738
|
-
function dynamicNormalize$4(ingestParams) {
|
|
21739
|
-
return function normalize_dynamic(input, existing, path, luvio, store, timestamp) {
|
|
21740
|
-
const input_fields = input.fields;
|
|
21741
|
-
const input_fields_id = path.fullPath + '__fields';
|
|
21742
|
-
const input_fields_keys = Object.keys(input_fields);
|
|
21743
|
-
const input_fields_length = input_fields_keys.length;
|
|
21744
|
-
for (let i = 0; i < input_fields_length; i++) {
|
|
21745
|
-
const key = input_fields_keys[i];
|
|
21746
|
-
const input_fields_prop = input_fields[key];
|
|
21747
|
-
const input_fields_prop_id = input_fields_id + '__' + key;
|
|
21748
|
-
input_fields[key] = ingestParams.fields(input_fields_prop, {
|
|
21749
|
-
fullPath: input_fields_prop_id,
|
|
21750
|
-
propertyName: key,
|
|
21751
|
-
parent: {
|
|
21752
|
-
data: input,
|
|
21753
|
-
key: path.fullPath,
|
|
21754
|
-
existing: existing,
|
|
21755
|
-
},
|
|
21756
|
-
ttl: path.ttl
|
|
21757
|
-
}, luvio, store, timestamp);
|
|
21758
|
-
}
|
|
21759
|
-
return input;
|
|
21760
|
-
};
|
|
21761
|
-
}
|
|
21762
|
-
const dynamicSelect$5 = function dynamicQuickActionDefaultsRepresentationSelect(params) {
|
|
21763
|
-
const fieldsPathSelection = params.fields === undefined ? {
|
|
21764
|
-
name: 'fields',
|
|
21765
|
-
kind: 'Link',
|
|
21766
|
-
map: true,
|
|
21767
|
-
fragment: select$2Q()
|
|
21768
|
-
} : params.fields;
|
|
21769
|
-
return {
|
|
21770
|
-
kind: 'Fragment',
|
|
21771
|
-
version: VERSION$20,
|
|
21772
|
-
private: [
|
|
21773
|
-
'eTag'
|
|
21774
|
-
],
|
|
21775
|
-
selections: [
|
|
21776
|
-
{
|
|
21777
|
-
name: 'actionApiName',
|
|
21778
|
-
kind: 'Scalar'
|
|
21779
|
-
},
|
|
21780
|
-
fieldsPathSelection,
|
|
21781
|
-
{
|
|
21782
|
-
name: 'objectApiName',
|
|
21783
|
-
kind: 'Scalar'
|
|
21784
|
-
}
|
|
21785
|
-
]
|
|
21786
|
-
};
|
|
21787
|
-
};
|
|
21788
|
-
function equals$K(existing, incoming) {
|
|
21789
|
-
const existing_actionApiName = existing.actionApiName;
|
|
21790
|
-
const incoming_actionApiName = incoming.actionApiName;
|
|
21791
|
-
if (!(existing_actionApiName === incoming_actionApiName)) {
|
|
21792
|
-
return false;
|
|
21793
|
-
}
|
|
21794
|
-
const existing_eTag = existing.eTag;
|
|
21795
|
-
const incoming_eTag = incoming.eTag;
|
|
21796
|
-
if (!(existing_eTag === incoming_eTag)) {
|
|
21797
|
-
return false;
|
|
21798
|
-
}
|
|
21799
|
-
const existing_objectApiName = existing.objectApiName;
|
|
21800
|
-
const incoming_objectApiName = incoming.objectApiName;
|
|
21801
|
-
if (!(existing_objectApiName === incoming_objectApiName)) {
|
|
21802
|
-
return false;
|
|
21803
|
-
}
|
|
21804
|
-
const existing_fields = existing.fields;
|
|
21805
|
-
const incoming_fields = incoming.fields;
|
|
21806
|
-
const equals_fields_props = equalsObject(existing_fields, incoming_fields, (existing_fields_prop, incoming_fields_prop) => {
|
|
21807
|
-
if (!(existing_fields_prop.__ref === incoming_fields_prop.__ref)) {
|
|
21808
|
-
return false;
|
|
21809
|
-
}
|
|
21810
|
-
});
|
|
21811
|
-
if (equals_fields_props === false) {
|
|
21812
|
-
return false;
|
|
21813
|
-
}
|
|
21814
|
-
return true;
|
|
21815
|
-
}
|
|
21816
|
-
function getTypeCacheKeys$1F(rootKeySet, luvio, input, fullPathFactory) {
|
|
21817
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
21818
|
-
const rootKey = keyBuilderFromType$m(luvio, input);
|
|
21819
|
-
rootKeySet.set(rootKey, {
|
|
21820
|
-
namespace: keyPrefix,
|
|
21821
|
-
representationName: RepresentationType$E,
|
|
21822
|
-
mergeable: false
|
|
21823
|
-
});
|
|
21824
|
-
const input_fields = input.fields;
|
|
21825
|
-
const input_fields_keys = ObjectKeys(input_fields);
|
|
21826
|
-
const input_fields_length = input_fields_keys.length;
|
|
21827
|
-
for (let i = 0; i < input_fields_length; i++) {
|
|
21828
|
-
const key = input_fields_keys[i];
|
|
21829
|
-
getTypeCacheKeys$1W(rootKeySet, luvio, input_fields[key], () => rootKey + "__fields" + "__" + key);
|
|
21830
|
-
}
|
|
21831
|
-
}
|
|
21832
|
-
|
|
21833
22109
|
const QUICK_ACTION_DEFAULTS_STORE_METADATA_PARAMS = {
|
|
21834
|
-
ttl: TTL$
|
|
22110
|
+
ttl: TTL$v,
|
|
21835
22111
|
namespace: keyPrefix,
|
|
21836
|
-
representationName: RepresentationType$
|
|
21837
|
-
version: VERSION$
|
|
22112
|
+
representationName: RepresentationType$J,
|
|
22113
|
+
version: VERSION$25,
|
|
21838
22114
|
};
|
|
21839
22115
|
function merge$1(existing, incoming) {
|
|
21840
22116
|
if (existing === undefined) {
|
|
@@ -21852,12 +22128,12 @@ function merge$1(existing, incoming) {
|
|
|
21852
22128
|
const dynamicIngest$4 = (ingestParams) => {
|
|
21853
22129
|
return function QuickActionDefaultsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
21854
22130
|
if (process.env.NODE_ENV !== 'production') {
|
|
21855
|
-
const validateError = validate$
|
|
22131
|
+
const validateError = validate$1e(input);
|
|
21856
22132
|
if (validateError !== null) {
|
|
21857
22133
|
throw validateError;
|
|
21858
22134
|
}
|
|
21859
22135
|
}
|
|
21860
|
-
const key = keyBuilderFromType$
|
|
22136
|
+
const key = keyBuilderFromType$p(luvio, input);
|
|
21861
22137
|
const existingRecord = store.readEntry(key);
|
|
21862
22138
|
let incomingRecord = dynamicNormalize$4(ingestParams)(input, store.readEntry(key), {
|
|
21863
22139
|
fullPath: key,
|
|
@@ -21865,7 +22141,7 @@ const dynamicIngest$4 = (ingestParams) => {
|
|
|
21865
22141
|
propertyName: path.propertyName,
|
|
21866
22142
|
}, luvio, store, timestamp);
|
|
21867
22143
|
incomingRecord = merge$1(existingRecord, incomingRecord);
|
|
21868
|
-
if (existingRecord === undefined || equals$
|
|
22144
|
+
if (existingRecord === undefined || equals$P(existingRecord, incomingRecord) === false) {
|
|
21869
22145
|
luvio.storePublish(key, incomingRecord);
|
|
21870
22146
|
}
|
|
21871
22147
|
luvio.publishStoreMetadata(key, QUICK_ACTION_DEFAULTS_STORE_METADATA_PARAMS);
|
|
@@ -21917,21 +22193,21 @@ function selectFields$6(luvio, params) {
|
|
|
21917
22193
|
}
|
|
21918
22194
|
|
|
21919
22195
|
function keyBuilder$2x(luvio, params) {
|
|
21920
|
-
return keyBuilder$
|
|
22196
|
+
return keyBuilder$2L(luvio, {
|
|
21921
22197
|
actionApiName: params.urlParams.actionApiName
|
|
21922
22198
|
});
|
|
21923
22199
|
}
|
|
21924
22200
|
function getResponseCacheKeys$N(storeKeyMap, luvio, resourceParams, response) {
|
|
21925
|
-
getTypeCacheKeys$
|
|
22201
|
+
getTypeCacheKeys$1K(storeKeyMap, luvio, response);
|
|
21926
22202
|
}
|
|
21927
22203
|
function ingestError$z(luvio, params, error, snapshotRefresh) {
|
|
21928
22204
|
const key = keyBuilder$2x(luvio, params);
|
|
21929
22205
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
21930
22206
|
const storeMetadataParams = {
|
|
21931
|
-
ttl: TTL$
|
|
22207
|
+
ttl: TTL$v,
|
|
21932
22208
|
namespace: keyPrefix,
|
|
21933
|
-
version: VERSION$
|
|
21934
|
-
representationName: RepresentationType$
|
|
22209
|
+
version: VERSION$25,
|
|
22210
|
+
representationName: RepresentationType$J
|
|
21935
22211
|
};
|
|
21936
22212
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
21937
22213
|
return errorSnapshot;
|
|
@@ -22074,7 +22350,7 @@ function keyBuilder$2v(luvio, params) {
|
|
|
22074
22350
|
return keyPrefix + '::ActionRepresentation:(' + 'actionTypes:' + params.queryParams.actionTypes + ',' + 'apiNames:' + params.queryParams.apiNames + ',' + 'formFactor:' + params.queryParams.formFactor + ',' + 'retrievalMode:' + params.queryParams.retrievalMode + ',' + 'sections:' + params.queryParams.sections + ',' + 'recordIds:' + params.urlParams.recordIds + ')';
|
|
22075
22351
|
}
|
|
22076
22352
|
function getResponseCacheKeys$M(storeKeyMap, luvio, resourceParams, response) {
|
|
22077
|
-
getTypeCacheKeys$
|
|
22353
|
+
getTypeCacheKeys$1H(storeKeyMap, luvio, response, () => keyBuilder$2v(luvio, resourceParams));
|
|
22078
22354
|
}
|
|
22079
22355
|
function ingestSuccess$D(luvio, resourceParams, response, snapshotRefresh) {
|
|
22080
22356
|
const { body } = response;
|
|
@@ -22097,10 +22373,10 @@ function ingestError$y(luvio, params, error, snapshotRefresh) {
|
|
|
22097
22373
|
const key = keyBuilder$2v(luvio, params);
|
|
22098
22374
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
22099
22375
|
const storeMetadataParams = {
|
|
22100
|
-
ttl: TTL$
|
|
22376
|
+
ttl: TTL$u,
|
|
22101
22377
|
namespace: keyPrefix,
|
|
22102
|
-
version: VERSION$
|
|
22103
|
-
representationName: RepresentationType$
|
|
22378
|
+
version: VERSION$22,
|
|
22379
|
+
representationName: RepresentationType$G
|
|
22104
22380
|
};
|
|
22105
22381
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
22106
22382
|
return errorSnapshot;
|
|
@@ -22226,7 +22502,7 @@ function keyBuilder$2t(luvio, params) {
|
|
|
22226
22502
|
return keyPrefix + '::ActionRepresentation:(' + 'actionTypes:' + params.queryParams.actionTypes + ',' + 'formFactor:' + params.queryParams.formFactor + ',' + 'sections:' + params.queryParams.sections + ',' + 'recordIds:' + params.urlParams.recordIds + ')';
|
|
22227
22503
|
}
|
|
22228
22504
|
function getResponseCacheKeys$L(storeKeyMap, luvio, resourceParams, response) {
|
|
22229
|
-
getTypeCacheKeys$
|
|
22505
|
+
getTypeCacheKeys$1H(storeKeyMap, luvio, response, () => keyBuilder$2t(luvio, resourceParams));
|
|
22230
22506
|
}
|
|
22231
22507
|
function ingestSuccess$C(luvio, resourceParams, response, snapshotRefresh) {
|
|
22232
22508
|
const { body } = response;
|
|
@@ -22249,10 +22525,10 @@ function ingestError$x(luvio, params, error, snapshotRefresh) {
|
|
|
22249
22525
|
const key = keyBuilder$2t(luvio, params);
|
|
22250
22526
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
22251
22527
|
const storeMetadataParams = {
|
|
22252
|
-
ttl: TTL$
|
|
22528
|
+
ttl: TTL$u,
|
|
22253
22529
|
namespace: keyPrefix,
|
|
22254
|
-
version: VERSION$
|
|
22255
|
-
representationName: RepresentationType$
|
|
22530
|
+
version: VERSION$22,
|
|
22531
|
+
representationName: RepresentationType$G
|
|
22256
22532
|
};
|
|
22257
22533
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
22258
22534
|
return errorSnapshot;
|
|
@@ -22438,7 +22714,7 @@ function keyBuilder$2r(luvio, params) {
|
|
|
22438
22714
|
return keyPrefix + '::ActionRepresentation:(' + 'recordIds:' + params.urlParams.recordIds + ',' + 'relatedListId:' + params.urlParams.relatedListId + ',' + (params.body.actionTypes === undefined ? 'actionTypes' : 'actionTypes:' + params.body.actionTypes) + '::' + (params.body.apiNames === undefined ? 'apiNames' : 'apiNames:' + params.body.apiNames) + '::' + (params.body.formFactor === undefined ? 'formFactor' : 'formFactor:' + params.body.formFactor) + '::' + (params.body.retrievalMode === undefined ? 'retrievalMode' : 'retrievalMode:' + params.body.retrievalMode) + '::' + (params.body.sections === undefined ? 'sections' : 'sections:' + params.body.sections) + ')';
|
|
22439
22715
|
}
|
|
22440
22716
|
function getResponseCacheKeys$K(storeKeyMap, luvio, resourceParams, response) {
|
|
22441
|
-
getTypeCacheKeys$
|
|
22717
|
+
getTypeCacheKeys$1H(storeKeyMap, luvio, response, () => keyBuilder$2r(luvio, resourceParams));
|
|
22442
22718
|
}
|
|
22443
22719
|
function ingestSuccess$B(luvio, resourceParams, response, snapshotRefresh) {
|
|
22444
22720
|
const { body } = response;
|
|
@@ -22461,10 +22737,10 @@ function ingestError$w(luvio, params, error, snapshotRefresh) {
|
|
|
22461
22737
|
const key = keyBuilder$2r(luvio, params);
|
|
22462
22738
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
22463
22739
|
const storeMetadataParams = {
|
|
22464
|
-
ttl: TTL$
|
|
22740
|
+
ttl: TTL$u,
|
|
22465
22741
|
namespace: keyPrefix,
|
|
22466
|
-
version: VERSION$
|
|
22467
|
-
representationName: RepresentationType$
|
|
22742
|
+
version: VERSION$22,
|
|
22743
|
+
representationName: RepresentationType$G
|
|
22468
22744
|
};
|
|
22469
22745
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
22470
22746
|
return errorSnapshot;
|
|
@@ -22911,7 +23187,7 @@ function keyBuilder$2n(luvio, params) {
|
|
|
22911
23187
|
return keyPrefix + '::ActionRepresentation:(' + 'actionTypes:' + params.queryParams.actionTypes + ',' + 'formFactor:' + params.queryParams.formFactor + ',' + 'sections:' + params.queryParams.sections + ',' + 'recordIds:' + params.urlParams.recordIds + ',' + 'relatedListRecordIds:' + params.urlParams.relatedListRecordIds + ')';
|
|
22912
23188
|
}
|
|
22913
23189
|
function getResponseCacheKeys$I(storeKeyMap, luvio, resourceParams, response) {
|
|
22914
|
-
getTypeCacheKeys$
|
|
23190
|
+
getTypeCacheKeys$1H(storeKeyMap, luvio, response, () => keyBuilder$2n(luvio, resourceParams));
|
|
22915
23191
|
}
|
|
22916
23192
|
function ingestSuccess$z(luvio, resourceParams, response, snapshotRefresh) {
|
|
22917
23193
|
const { body } = response;
|
|
@@ -22934,10 +23210,10 @@ function ingestError$u(luvio, params, error, snapshotRefresh) {
|
|
|
22934
23210
|
const key = keyBuilder$2n(luvio, params);
|
|
22935
23211
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
22936
23212
|
const storeMetadataParams = {
|
|
22937
|
-
ttl: TTL$
|
|
23213
|
+
ttl: TTL$u,
|
|
22938
23214
|
namespace: keyPrefix,
|
|
22939
|
-
version: VERSION$
|
|
22940
|
-
representationName: RepresentationType$
|
|
23215
|
+
version: VERSION$22,
|
|
23216
|
+
representationName: RepresentationType$G
|
|
22941
23217
|
};
|
|
22942
23218
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
22943
23219
|
return errorSnapshot;
|
|
@@ -49485,13 +49761,12 @@ function injectSelectionSet(selectionSetNode, queryTransformHelper, fragmentMap)
|
|
|
49485
49761
|
selectionSetNode === undefined) {
|
|
49486
49762
|
return;
|
|
49487
49763
|
}
|
|
49488
|
-
const
|
|
49489
|
-
|
|
49490
|
-
selections
|
|
49491
|
-
|
|
49492
|
-
|
|
49493
|
-
|
|
49494
|
-
mergedSelections.forEach(selection => {
|
|
49764
|
+
const minimumSelectionSet = {
|
|
49765
|
+
kind: 'SelectionSet',
|
|
49766
|
+
selections: queryTransformHelper.getMinimumSelections()
|
|
49767
|
+
};
|
|
49768
|
+
const mergedSelections = mergeSelectionSets(selectionSetNode, minimumSelectionSet);
|
|
49769
|
+
mergedSelections === null || mergedSelections === void 0 ? void 0 : mergedSelections.selections.forEach(selection => {
|
|
49495
49770
|
if (selection.kind === 'Field') {
|
|
49496
49771
|
const fieldType = queryTransformHelper.getFieldType(selection);
|
|
49497
49772
|
const fieldTransformHelper = fieldType === undefined ? undefined : getQueryTransformerForType(fieldType.typename);
|
|
@@ -49520,46 +49795,7 @@ function injectSelectionSet(selectionSetNode, queryTransformHelper, fragmentMap)
|
|
|
49520
49795
|
}
|
|
49521
49796
|
}
|
|
49522
49797
|
});
|
|
49523
|
-
Object.assign(selectionSetNode,
|
|
49524
|
-
selections: mergedSelections.length > 0 ? mergedSelections : undefined
|
|
49525
|
-
});
|
|
49526
|
-
}
|
|
49527
|
-
function mergeSelections(minimumSelections, querySelections) {
|
|
49528
|
-
const mergedSelections = [...querySelections];
|
|
49529
|
-
for (let i = 0; i < minimumSelections.length; i++) {
|
|
49530
|
-
const minimumSelection = minimumSelections[i];
|
|
49531
|
-
if (minimumSelection.kind === 'Field') {
|
|
49532
|
-
const existingNode = mergedSelections.find(selection => {
|
|
49533
|
-
return selection.kind === 'Field' && selection.name.value === minimumSelection.name.value && (selection.directives === undefined || selection.directives.length === 0);
|
|
49534
|
-
});
|
|
49535
|
-
if (existingNode !== undefined && existingNode.kind === 'Field') { // Maybe do better type narrowing above
|
|
49536
|
-
const existingNodeHasSubselections = existingNode.selectionSet !== undefined && existingNode.selectionSet.selections.length > 0;
|
|
49537
|
-
const minimumFieldNodeHasSubselections = minimumSelection.selectionSet !== undefined && minimumSelection.selectionSet.selections.length > 0;
|
|
49538
|
-
// TODO(correctness enhancement): this doesn't handle arugments. Add alias if arguments disagree?
|
|
49539
|
-
if (existingNodeHasSubselections && minimumFieldNodeHasSubselections) {
|
|
49540
|
-
const mergedChildSelections = mergeSelections(minimumSelection.selectionSet.selections, existingNode.selectionSet.selections);
|
|
49541
|
-
Object.assign(existingNode.selectionSet, {
|
|
49542
|
-
selections: mergedChildSelections
|
|
49543
|
-
});
|
|
49544
|
-
}
|
|
49545
|
-
}
|
|
49546
|
-
else {
|
|
49547
|
-
mergedSelections.push(minimumSelection);
|
|
49548
|
-
}
|
|
49549
|
-
}
|
|
49550
|
-
if (minimumSelection.kind === 'InlineFragment') {
|
|
49551
|
-
mergedSelections.push(minimumSelection);
|
|
49552
|
-
}
|
|
49553
|
-
if (minimumSelection.kind === 'FragmentSpread') {
|
|
49554
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
49555
|
-
console.error('named fragment minimum selections are not supported and will not be added to the query.');
|
|
49556
|
-
}
|
|
49557
|
-
}
|
|
49558
|
-
}
|
|
49559
|
-
return mergedSelections;
|
|
49560
|
-
}
|
|
49561
|
-
function getRequestedField(responseDataFieldName, requestedFields) {
|
|
49562
|
-
return requestedFields.find(fieldNode => (fieldNode.alias && fieldNode.alias.value === responseDataFieldName) || (!fieldNode.alias && fieldNode.name.value === responseDataFieldName));
|
|
49798
|
+
Object.assign(selectionSetNode, mergedSelections);
|
|
49563
49799
|
}
|
|
49564
49800
|
function getPageMetadata(paginationMetadata, paginationParams) {
|
|
49565
49801
|
const metadataProperties = {};
|
|
@@ -49605,67 +49841,6 @@ function getSerializedKeyForField(field, variables, fieldType) {
|
|
|
49605
49841
|
const argumentString = mutableArgumentNodes.length > 0 ? '__' + serializeFieldArguments(mutableArgumentNodes, variables) : '';
|
|
49606
49842
|
return field.name.value + argumentString; // It should be safe to always use the fieldName - If an alias is meaningful, there will be arguments on the key also.
|
|
49607
49843
|
}
|
|
49608
|
-
function mergeFragmentWithExistingSelections(fragmentFieldSelection, existingSelections) {
|
|
49609
|
-
// Check if there is an existing selection for this field we can merge with
|
|
49610
|
-
// If this isn't done, we will see issues such as W-12293630 & W-12236456 as examples
|
|
49611
|
-
const existingField = getRequestedField(fragmentFieldSelection.name.value, existingSelections);
|
|
49612
|
-
if (existingField === undefined) {
|
|
49613
|
-
existingSelections.push(fragmentFieldSelection);
|
|
49614
|
-
}
|
|
49615
|
-
else {
|
|
49616
|
-
if (existingField.selectionSet === undefined) {
|
|
49617
|
-
existingField.selectionSet === fragmentFieldSelection.selectionSet;
|
|
49618
|
-
}
|
|
49619
|
-
else if (fragmentFieldSelection.selectionSet !== undefined) {
|
|
49620
|
-
existingField.selectionSet.selections = mergeSelections(fragmentFieldSelection.selectionSet.selections, existingField.selectionSet.selections);
|
|
49621
|
-
}
|
|
49622
|
-
}
|
|
49623
|
-
}
|
|
49624
|
-
function calculateRequestedFieldsForType(typename, selectionSet, namedFragmentsMap, isFragmentApplicable) {
|
|
49625
|
-
const selections = [];
|
|
49626
|
-
selectionSet.selections.forEach(selection => {
|
|
49627
|
-
if (selection.kind === "Field") {
|
|
49628
|
-
selections.push(selection);
|
|
49629
|
-
}
|
|
49630
|
-
if (selection.kind === "InlineFragment" && isFragmentApplicable(selection, typename)) {
|
|
49631
|
-
// loops over the map to get the values.
|
|
49632
|
-
getRequestedFieldsForType(typename, selection.selectionSet, namedFragmentsMap, isFragmentApplicable)
|
|
49633
|
-
.forEach(fragmentFieldSelection => { mergeFragmentWithExistingSelections(fragmentFieldSelection, selections); });
|
|
49634
|
-
}
|
|
49635
|
-
if (selection.kind === "FragmentSpread") {
|
|
49636
|
-
const namedFragment = namedFragmentsMap[selection.name.value];
|
|
49637
|
-
if (namedFragment && isFragmentApplicable(namedFragment, typename)) {
|
|
49638
|
-
// loops over the map to get the values.
|
|
49639
|
-
getRequestedFieldsForType(typename, namedFragment.selectionSet, namedFragmentsMap, isFragmentApplicable)
|
|
49640
|
-
.forEach(fragmentFieldSelection => { mergeFragmentWithExistingSelections(fragmentFieldSelection, selections); });
|
|
49641
|
-
}
|
|
49642
|
-
}
|
|
49643
|
-
});
|
|
49644
|
-
// Needs to happen after the selections are merged.
|
|
49645
|
-
return selections.reduce((acc, fieldNode) => {
|
|
49646
|
-
const fieldName = fieldNode.alias ? fieldNode.alias.value : fieldNode.name.value;
|
|
49647
|
-
// TODO: W-13485835. Some fields are not being merged, and this logic reproduces the current behavior in which the first field with name is being used.
|
|
49648
|
-
if (!acc.has(fieldName)) {
|
|
49649
|
-
acc.set(fieldName, fieldNode);
|
|
49650
|
-
}
|
|
49651
|
-
return acc;
|
|
49652
|
-
}, new Map());
|
|
49653
|
-
}
|
|
49654
|
-
let selectionSetRequestedFieldsWeakMap = new WeakMap();
|
|
49655
|
-
function getRequestedFieldsForType(typename, selectionSet, namedFragmentsMap, isFragmentApplicable) {
|
|
49656
|
-
let cachedRequestedFieldsConfigurations = selectionSetRequestedFieldsWeakMap.get(selectionSet);
|
|
49657
|
-
if (cachedRequestedFieldsConfigurations === undefined) {
|
|
49658
|
-
cachedRequestedFieldsConfigurations = new Map();
|
|
49659
|
-
selectionSetRequestedFieldsWeakMap.set(selectionSet, cachedRequestedFieldsConfigurations);
|
|
49660
|
-
}
|
|
49661
|
-
const cachedRequestedFieldsForType = cachedRequestedFieldsConfigurations.get(typename);
|
|
49662
|
-
if (cachedRequestedFieldsForType !== undefined) {
|
|
49663
|
-
return cachedRequestedFieldsForType;
|
|
49664
|
-
}
|
|
49665
|
-
const selections = calculateRequestedFieldsForType(typename, selectionSet, namedFragmentsMap, isFragmentApplicable);
|
|
49666
|
-
cachedRequestedFieldsConfigurations.set(typename, selections);
|
|
49667
|
-
return selections;
|
|
49668
|
-
}
|
|
49669
49844
|
function getQueryTransformerForType(typename, fragmentMap) {
|
|
49670
49845
|
switch (typename) {
|
|
49671
49846
|
case "PercentAggregate": return {
|
|
@@ -50284,18 +50459,7 @@ function selectCalculateSink(sink, field, buildSelectionForNodeFn, source, reade
|
|
|
50284
50459
|
(_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
|
|
50285
50460
|
const builtSelection = buildSelectionForNodeFn(source, reader, field, sel, variables, fragments, parentRecordId);
|
|
50286
50461
|
if (builtSelection !== undefined) {
|
|
50287
|
-
|
|
50288
|
-
Object.keys(builtSelection).forEach((key, value) => {
|
|
50289
|
-
// We only assign a field selection in the fragment if it doesn't already exist in sink
|
|
50290
|
-
// The non-fragment selection already got the merged selections in getRequestedFieldsForType
|
|
50291
|
-
if (sink[key] === undefined) {
|
|
50292
|
-
sink[key] = builtSelection[key];
|
|
50293
|
-
}
|
|
50294
|
-
});
|
|
50295
|
-
}
|
|
50296
|
-
else {
|
|
50297
|
-
Object.assign(sink, builtSelection);
|
|
50298
|
-
}
|
|
50462
|
+
deepMerge(sink, builtSelection);
|
|
50299
50463
|
}
|
|
50300
50464
|
});
|
|
50301
50465
|
return sink;
|
|
@@ -57106,7 +57270,7 @@ withDefaultLuvio((luvio) => {
|
|
|
57106
57270
|
let getRecordNotifyChange, refresh, notifyRecordUpdateAvailable;
|
|
57107
57271
|
withDefaultLuvio((luvio) => {
|
|
57108
57272
|
getRecordNotifyChange = notifyChangeFactory(luvio);
|
|
57109
|
-
notifyRecordUpdateAvailable = notifyUpdateAvailableFactory$
|
|
57273
|
+
notifyRecordUpdateAvailable = notifyUpdateAvailableFactory$3(luvio);
|
|
57110
57274
|
refresh = bindWireRefresh(luvio);
|
|
57111
57275
|
});
|
|
57112
57276
|
|