@evlop/commons 1.0.257 → 1.0.259
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/src/edl/parser.js
CHANGED
@@ -67,7 +67,7 @@ function removeUnnecessaryWhitespace(htmlString) {
|
|
67
67
|
.trim(); // Trim leading and trailing whitespaces
|
68
68
|
}
|
69
69
|
const scriptTagRegex = /<(Script)([^>]*?)>(.*?)<\/\1>/gs;
|
70
|
-
const variableDeclarationRegex = /(const|var|let)\s+(\$[a-zA-Z0-9_]+)/g;
|
70
|
+
const variableDeclarationRegex = /(const|var|let|function)\s+(\$[a-zA-Z0-9_]+)/g;
|
71
71
|
function extractScriptsAndVariables(inputString) {
|
72
72
|
// Initialize an empty object to store the scripts by their unique IDs
|
73
73
|
const scriptsById = {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../src/edl/parser.ts"],"names":[],"mappings":";;AAAA,mCAAgE;AAChE,2BAAkD;AAElD,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAEnI,oCAAoC;AACpC,MAAM,eAAe,GAAG,gCAAgC,CAAC;AAEzD,oCAAoC;AACpC,MAAM,eAAe,GAAG,qKAAqK,CAAC;AAE9L,oCAAoC;AACpC,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAE9C,4BAA4B;AAC5B,MAAM,cAAc,GAAG,mIAAmI,CAAC;AAE3J,uFAAuF;AACvF,MAAM,wBAAwB,GAAG,oLAAoL,CAAA;AAErN,MAAM,gBAAgB,GAAG;IAEvB,+CAA+C,EAAE,CAAC,cAAsB,EAAE,EAAE;QAC1E,MAAM,KAAK,GAAG,EAAE,CAAC;QAEjB,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;QAC1C,IAAI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AAW,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC;YAExH,sGAAsG;YACtG,IAAG,UAAU,CAAC,GAAG,KAAK,QAAQ,EAAC;gBAC7B,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;gBACrD,OAAO,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;gBAE3C,MAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;gBACxC,MAAM,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC;gBAExD,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,iBAAiB,CAAC,SAAS,IAAI,wBAAwB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACpI;YAED,8EAA8E;YAC9E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvB,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACjD,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aACtC;iBAAM;gBACL,oFAAoF;gBACpF,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAC7B;YAED,0EAA0E;YAC1E,IAAI,CAAC,aAAa,EAAE;gBAClB,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAC3B;SACF;IAEH,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACpB,CAAC;AAGD,kBAAe,QAAQ,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,KAAK;yBAA2C,GAAG;;CAwLxD,CAAC;AAIF,eAAe,KAAK,CAAC"}
|
@@ -16,6 +16,7 @@ const REST_QUERY_PAGE_FAILED = "REST_QUERY_PAGE_FAILED";
|
|
16
16
|
const PAGE_BLOCKS_UPDATED = "PAGE_BLOCKS_UPDATED";
|
17
17
|
const PAGE_DATA_UPDATED = "PAGE_DATA_UPDATED";
|
18
18
|
const PAGE_CREATED = "PAGE_CREATED";
|
19
|
+
const PAGES_UPDATED = "PAGES_UPDATED";
|
19
20
|
const initialState = initialState_1.default;
|
20
21
|
const pages = function (state = initialState, action) {
|
21
22
|
switch (action.type) {
|
@@ -66,6 +67,29 @@ const pages = function (state = initialState, action) {
|
|
66
67
|
isLoading: state.isLoading - 1,
|
67
68
|
};
|
68
69
|
}
|
70
|
+
case PAGES_UPDATED: {
|
71
|
+
const { collection: existingCollection = {}, records: existingRecords = {} } = state;
|
72
|
+
const pagesById = lodash_1.keyBy(existingRecords?.data, 'id');
|
73
|
+
lodash_1.forEach(action.pages, (page) => {
|
74
|
+
if (pagesById[page.id]) {
|
75
|
+
pagesById[page.id] = lodash_1.assign({}, pagesById[page.id], page);
|
76
|
+
}
|
77
|
+
else {
|
78
|
+
pagesById[page.id] = page;
|
79
|
+
}
|
80
|
+
});
|
81
|
+
return {
|
82
|
+
...state,
|
83
|
+
collection: {
|
84
|
+
...existingCollection,
|
85
|
+
...pagesById,
|
86
|
+
},
|
87
|
+
records: {
|
88
|
+
...existingRecords,
|
89
|
+
data: lodash_1.values(pagesById),
|
90
|
+
},
|
91
|
+
};
|
92
|
+
}
|
69
93
|
case REST_DELETE_PAGE_SUCCESS: {
|
70
94
|
const { [action.identifier]: oldRecordState = {}, collection = {} } = state;
|
71
95
|
const { data: oldData = [] } = oldRecordState;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":";;;;;AAAA,
|
1
|
+
{"version":3,"file":"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