@tailor-cms/ce-accordion-server 0.0.16 → 2.0.0
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/index.cjs +17 -158
- package/dist/index.d.cts +7 -24
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +11 -0
- package/package.json +23 -25
- package/dist/index.d.ts +0 -25
- package/dist/index.js +0 -126
package/dist/index.cjs
CHANGED
|
@@ -1,160 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/index.ts
|
|
20
|
-
var index_exports = {};
|
|
21
|
-
__export(index_exports, {
|
|
22
|
-
afterLoaded: () => afterLoaded,
|
|
23
|
-
afterRetrieve: () => afterRetrieve,
|
|
24
|
-
afterSave: () => afterSave,
|
|
25
|
-
beforeDisplay: () => beforeDisplay,
|
|
26
|
-
beforeSave: () => beforeSave,
|
|
27
|
-
default: () => index_default,
|
|
28
|
-
hookMap: () => hookMap,
|
|
29
|
-
initState: () => initState,
|
|
30
|
-
onUserInteraction: () => onUserInteraction,
|
|
31
|
-
type: () => type
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
32
4
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/rng.js
|
|
45
|
-
var import_crypto = require("crypto");
|
|
46
|
-
var rnds8Pool = new Uint8Array(256);
|
|
47
|
-
var poolPtr = rnds8Pool.length;
|
|
48
|
-
function rng() {
|
|
49
|
-
if (poolPtr > rnds8Pool.length - 16) {
|
|
50
|
-
(0, import_crypto.randomFillSync)(rnds8Pool);
|
|
51
|
-
poolPtr = 0;
|
|
52
|
-
}
|
|
53
|
-
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/native.js
|
|
57
|
-
var import_crypto2 = require("crypto");
|
|
58
|
-
var native_default = { randomUUID: import_crypto2.randomUUID };
|
|
59
|
-
|
|
60
|
-
// ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/v4.js
|
|
61
|
-
function v4(options, buf, offset) {
|
|
62
|
-
var _a;
|
|
63
|
-
if (native_default.randomUUID && !buf && !options) {
|
|
64
|
-
return native_default.randomUUID();
|
|
65
|
-
}
|
|
66
|
-
options = options || {};
|
|
67
|
-
const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
|
|
68
|
-
if (rnds.length < 16) {
|
|
69
|
-
throw new Error("Random bytes length must be >= 16");
|
|
70
|
-
}
|
|
71
|
-
rnds[6] = rnds[6] & 15 | 64;
|
|
72
|
-
rnds[8] = rnds[8] & 63 | 128;
|
|
73
|
-
if (buf) {
|
|
74
|
-
offset = offset || 0;
|
|
75
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
76
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
77
|
-
}
|
|
78
|
-
for (let i = 0; i < 16; ++i) {
|
|
79
|
-
buf[offset + i] = rnds[i];
|
|
80
|
-
}
|
|
81
|
-
return buf;
|
|
82
|
-
}
|
|
83
|
-
return unsafeStringify(rnds);
|
|
84
|
-
}
|
|
85
|
-
var v4_default = v4;
|
|
86
|
-
|
|
87
|
-
// ../manifest/dist/index.js
|
|
88
|
-
var id = v4_default();
|
|
89
|
-
var type = "ACCORDION";
|
|
90
|
-
var initState = () => ({
|
|
91
|
-
embeds: {},
|
|
92
|
-
items: {
|
|
93
|
-
[id]: {
|
|
94
|
-
id,
|
|
95
|
-
header: "Accordion Item Title",
|
|
96
|
-
body: {},
|
|
97
|
-
position: 1
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
// src/index.ts
|
|
103
|
-
var IS_CEK = process.env.CEK_RUNTIME;
|
|
104
|
-
var USER_STATE = {};
|
|
105
|
-
function beforeSave(element, services) {
|
|
106
|
-
return element;
|
|
107
|
-
}
|
|
108
|
-
function afterSave(element, services) {
|
|
109
|
-
return element;
|
|
110
|
-
}
|
|
111
|
-
function afterLoaded(element, services, runtime) {
|
|
112
|
-
return element;
|
|
113
|
-
}
|
|
114
|
-
function afterRetrieve(element, services, runtime) {
|
|
115
|
-
return element;
|
|
116
|
-
}
|
|
117
|
-
function beforeDisplay(element, context) {
|
|
118
|
-
return { ...context, ...USER_STATE };
|
|
119
|
-
}
|
|
120
|
-
function onUserInteraction(element, context, payload) {
|
|
121
|
-
if (IS_CEK) {
|
|
122
|
-
USER_STATE.interactionTimestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
123
|
-
context.contextTimestamp = USER_STATE.interactionTimestamp;
|
|
124
|
-
Object.assign(USER_STATE, payload);
|
|
125
|
-
}
|
|
126
|
-
return { updateDisplayState: true };
|
|
127
|
-
}
|
|
128
|
-
var hookMap = new Map(
|
|
129
|
-
Object.entries({
|
|
130
|
-
beforeSave,
|
|
131
|
-
afterSave,
|
|
132
|
-
afterLoaded,
|
|
133
|
-
afterRetrieve,
|
|
134
|
-
onUserInteraction,
|
|
135
|
-
beforeDisplay
|
|
136
|
-
})
|
|
137
|
-
);
|
|
138
|
-
var index_default = {
|
|
139
|
-
type,
|
|
140
|
-
hookMap,
|
|
141
|
-
initState,
|
|
142
|
-
beforeSave,
|
|
143
|
-
afterSave,
|
|
144
|
-
afterLoaded,
|
|
145
|
-
afterRetrieve,
|
|
146
|
-
onUserInteraction,
|
|
147
|
-
beforeDisplay
|
|
5
|
+
let _tailor_cms_ce_accordion_manifest = require("@tailor-cms/ce-accordion-manifest");
|
|
6
|
+
//#region src/index.ts
|
|
7
|
+
const hookMap = /* @__PURE__ */ new Map();
|
|
8
|
+
const serverModule = {
|
|
9
|
+
type: _tailor_cms_ce_accordion_manifest.type,
|
|
10
|
+
initState: _tailor_cms_ce_accordion_manifest.initState,
|
|
11
|
+
hookMap,
|
|
12
|
+
ai: _tailor_cms_ce_accordion_manifest.ai
|
|
148
13
|
};
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
beforeSave,
|
|
156
|
-
hookMap,
|
|
157
|
-
initState,
|
|
158
|
-
onUserInteraction,
|
|
159
|
-
type
|
|
160
|
-
});
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.ai = _tailor_cms_ce_accordion_manifest.ai;
|
|
16
|
+
exports.default = serverModule;
|
|
17
|
+
exports.hookMap = hookMap;
|
|
18
|
+
exports.initState = _tailor_cms_ce_accordion_manifest.initState;
|
|
19
|
+
exports.type = _tailor_cms_ce_accordion_manifest.type;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export { initState, type } from '@tailor-cms/ce-accordion-manifest';
|
|
4
|
-
import { HookServices, ServerRuntime } from '@tailor-cms/cek-common';
|
|
1
|
+
import { Element, ai, initState, type } from "@tailor-cms/ce-accordion-manifest";
|
|
2
|
+
import { HookMap, ServerModule } from "@tailor-cms/cek-common";
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
declare
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare function onUserInteraction(element: Element, context: any, payload: any): any;
|
|
12
|
-
declare const hookMap: Map<string, typeof beforeSave | typeof afterSave | typeof afterLoaded | typeof afterRetrieve | typeof onUserInteraction | typeof beforeDisplay>;
|
|
13
|
-
declare const _default: {
|
|
14
|
-
type: string;
|
|
15
|
-
hookMap: Map<string, typeof beforeSave | typeof afterSave | typeof afterLoaded | typeof afterRetrieve | typeof onUserInteraction | typeof beforeDisplay>;
|
|
16
|
-
initState: _tailor_cms_ce_accordion_manifest.DataInitializer;
|
|
17
|
-
beforeSave: typeof beforeSave;
|
|
18
|
-
afterSave: typeof afterSave;
|
|
19
|
-
afterLoaded: typeof afterLoaded;
|
|
20
|
-
afterRetrieve: typeof afterRetrieve;
|
|
21
|
-
onUserInteraction: typeof onUserInteraction;
|
|
22
|
-
beforeDisplay: typeof beforeDisplay;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { afterLoaded, afterRetrieve, afterSave, beforeDisplay, beforeSave, _default as default, hookMap, onUserInteraction };
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
declare const hookMap: HookMap<Element>;
|
|
6
|
+
declare const serverModule: ServerModule<Element>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ai, serverModule as default, hookMap, initState, type };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Element, ai, initState, type } from "@tailor-cms/ce-accordion-manifest";
|
|
2
|
+
import { HookMap, ServerModule } from "@tailor-cms/cek-common";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
declare const hookMap: HookMap<Element>;
|
|
6
|
+
declare const serverModule: ServerModule<Element>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ai, serverModule as default, hookMap, initState, type };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ai, initState, type } from "@tailor-cms/ce-accordion-manifest";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
const hookMap = /* @__PURE__ */ new Map();
|
|
4
|
+
const serverModule = {
|
|
5
|
+
type,
|
|
6
|
+
initState,
|
|
7
|
+
hookMap,
|
|
8
|
+
ai
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ai, serverModule as default, hookMap, initState, type };
|
package/package.json
CHANGED
|
@@ -3,49 +3,47 @@
|
|
|
3
3
|
"description": "Tailor CMS accordion element",
|
|
4
4
|
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "0.0
|
|
6
|
+
"version": "2.0.0",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"import": "./dist/index.
|
|
9
|
+
"import": "./dist/index.mjs",
|
|
10
10
|
"require": "./dist/index.cjs"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"main": "./dist/index.cjs",
|
|
14
|
-
"types": "./dist/index.d.
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@tailor-cms/cek-common": "2.0.1",
|
|
20
|
+
"@tailor-cms/ce-accordion-manifest": "2.0.0"
|
|
21
|
+
},
|
|
18
22
|
"devDependencies": {
|
|
19
|
-
"@tailor-cms/
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"typescript": "^5.7.3",
|
|
23
|
-
"@tailor-cms/ce-accordion-manifest": "0.0.16"
|
|
23
|
+
"@tailor-cms/eslint-config": "2.0.1",
|
|
24
|
+
"tsdown": "^0.21.10",
|
|
25
|
+
"typescript": "^6.0.3"
|
|
24
26
|
},
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"src/index.ts"
|
|
28
|
-
],
|
|
29
|
-
"target": [
|
|
30
|
-
"node14",
|
|
31
|
-
"es2022"
|
|
32
|
-
],
|
|
27
|
+
"tsdown": {
|
|
28
|
+
"target": "node24",
|
|
33
29
|
"format": [
|
|
34
30
|
"cjs",
|
|
35
31
|
"esm"
|
|
36
|
-
]
|
|
37
|
-
"bundle": true,
|
|
38
|
-
"minify": false,
|
|
39
|
-
"clean": false,
|
|
40
|
-
"dts": true
|
|
32
|
+
]
|
|
41
33
|
},
|
|
42
34
|
"publishConfig": {
|
|
43
35
|
"access": "public"
|
|
44
36
|
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=24"
|
|
39
|
+
},
|
|
45
40
|
"scripts": {
|
|
46
|
-
"dev": "
|
|
47
|
-
"build": "
|
|
48
|
-
"lint": "eslint
|
|
49
|
-
"lint:fix": "pnpm lint --fix"
|
|
41
|
+
"dev": "tsdown --watch src --watch ../manifest/dist",
|
|
42
|
+
"build": "pnpm nuke:dist && tsdown",
|
|
43
|
+
"lint": "eslint .",
|
|
44
|
+
"lint:fix": "pnpm lint --fix",
|
|
45
|
+
"nuke": "pnpm dlx del-cli dist node_modules",
|
|
46
|
+
"nuke:dist": "pnpm dlx del-cli dist",
|
|
47
|
+
"prepublish": "pnpm build"
|
|
50
48
|
}
|
|
51
49
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as _tailor_cms_ce_accordion_manifest from '@tailor-cms/ce-accordion-manifest';
|
|
2
|
-
import { Element } from '@tailor-cms/ce-accordion-manifest';
|
|
3
|
-
export { initState, type } from '@tailor-cms/ce-accordion-manifest';
|
|
4
|
-
import { HookServices, ServerRuntime } from '@tailor-cms/cek-common';
|
|
5
|
-
|
|
6
|
-
declare function beforeSave(element: Element, services: HookServices): Element;
|
|
7
|
-
declare function afterSave(element: Element, services: HookServices): Element;
|
|
8
|
-
declare function afterLoaded(element: Element, services: HookServices, runtime: ServerRuntime): Element;
|
|
9
|
-
declare function afterRetrieve(element: Element, services: HookServices, runtime: ServerRuntime): Element;
|
|
10
|
-
declare function beforeDisplay(element: Element, context: any): any;
|
|
11
|
-
declare function onUserInteraction(element: Element, context: any, payload: any): any;
|
|
12
|
-
declare const hookMap: Map<string, typeof beforeSave | typeof afterSave | typeof afterLoaded | typeof afterRetrieve | typeof onUserInteraction | typeof beforeDisplay>;
|
|
13
|
-
declare const _default: {
|
|
14
|
-
type: string;
|
|
15
|
-
hookMap: Map<string, typeof beforeSave | typeof afterSave | typeof afterLoaded | typeof afterRetrieve | typeof onUserInteraction | typeof beforeDisplay>;
|
|
16
|
-
initState: _tailor_cms_ce_accordion_manifest.DataInitializer;
|
|
17
|
-
beforeSave: typeof beforeSave;
|
|
18
|
-
afterSave: typeof afterSave;
|
|
19
|
-
afterLoaded: typeof afterLoaded;
|
|
20
|
-
afterRetrieve: typeof afterRetrieve;
|
|
21
|
-
onUserInteraction: typeof onUserInteraction;
|
|
22
|
-
beforeDisplay: typeof beforeDisplay;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { afterLoaded, afterRetrieve, afterSave, beforeDisplay, beforeSave, _default as default, hookMap, onUserInteraction };
|
package/dist/index.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/stringify.js
|
|
2
|
-
var byteToHex = [];
|
|
3
|
-
for (let i = 0; i < 256; ++i) {
|
|
4
|
-
byteToHex.push((i + 256).toString(16).slice(1));
|
|
5
|
-
}
|
|
6
|
-
function unsafeStringify(arr, offset = 0) {
|
|
7
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/rng.js
|
|
11
|
-
import { randomFillSync } from "crypto";
|
|
12
|
-
var rnds8Pool = new Uint8Array(256);
|
|
13
|
-
var poolPtr = rnds8Pool.length;
|
|
14
|
-
function rng() {
|
|
15
|
-
if (poolPtr > rnds8Pool.length - 16) {
|
|
16
|
-
randomFillSync(rnds8Pool);
|
|
17
|
-
poolPtr = 0;
|
|
18
|
-
}
|
|
19
|
-
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/native.js
|
|
23
|
-
import { randomUUID } from "crypto";
|
|
24
|
-
var native_default = { randomUUID };
|
|
25
|
-
|
|
26
|
-
// ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/v4.js
|
|
27
|
-
function v4(options, buf, offset) {
|
|
28
|
-
var _a;
|
|
29
|
-
if (native_default.randomUUID && !buf && !options) {
|
|
30
|
-
return native_default.randomUUID();
|
|
31
|
-
}
|
|
32
|
-
options = options || {};
|
|
33
|
-
const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
|
|
34
|
-
if (rnds.length < 16) {
|
|
35
|
-
throw new Error("Random bytes length must be >= 16");
|
|
36
|
-
}
|
|
37
|
-
rnds[6] = rnds[6] & 15 | 64;
|
|
38
|
-
rnds[8] = rnds[8] & 63 | 128;
|
|
39
|
-
if (buf) {
|
|
40
|
-
offset = offset || 0;
|
|
41
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
42
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
43
|
-
}
|
|
44
|
-
for (let i = 0; i < 16; ++i) {
|
|
45
|
-
buf[offset + i] = rnds[i];
|
|
46
|
-
}
|
|
47
|
-
return buf;
|
|
48
|
-
}
|
|
49
|
-
return unsafeStringify(rnds);
|
|
50
|
-
}
|
|
51
|
-
var v4_default = v4;
|
|
52
|
-
|
|
53
|
-
// ../manifest/dist/index.js
|
|
54
|
-
var id = v4_default();
|
|
55
|
-
var type = "ACCORDION";
|
|
56
|
-
var initState = () => ({
|
|
57
|
-
embeds: {},
|
|
58
|
-
items: {
|
|
59
|
-
[id]: {
|
|
60
|
-
id,
|
|
61
|
-
header: "Accordion Item Title",
|
|
62
|
-
body: {},
|
|
63
|
-
position: 1
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// src/index.ts
|
|
69
|
-
var IS_CEK = process.env.CEK_RUNTIME;
|
|
70
|
-
var USER_STATE = {};
|
|
71
|
-
function beforeSave(element, services) {
|
|
72
|
-
return element;
|
|
73
|
-
}
|
|
74
|
-
function afterSave(element, services) {
|
|
75
|
-
return element;
|
|
76
|
-
}
|
|
77
|
-
function afterLoaded(element, services, runtime) {
|
|
78
|
-
return element;
|
|
79
|
-
}
|
|
80
|
-
function afterRetrieve(element, services, runtime) {
|
|
81
|
-
return element;
|
|
82
|
-
}
|
|
83
|
-
function beforeDisplay(element, context) {
|
|
84
|
-
return { ...context, ...USER_STATE };
|
|
85
|
-
}
|
|
86
|
-
function onUserInteraction(element, context, payload) {
|
|
87
|
-
if (IS_CEK) {
|
|
88
|
-
USER_STATE.interactionTimestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
89
|
-
context.contextTimestamp = USER_STATE.interactionTimestamp;
|
|
90
|
-
Object.assign(USER_STATE, payload);
|
|
91
|
-
}
|
|
92
|
-
return { updateDisplayState: true };
|
|
93
|
-
}
|
|
94
|
-
var hookMap = new Map(
|
|
95
|
-
Object.entries({
|
|
96
|
-
beforeSave,
|
|
97
|
-
afterSave,
|
|
98
|
-
afterLoaded,
|
|
99
|
-
afterRetrieve,
|
|
100
|
-
onUserInteraction,
|
|
101
|
-
beforeDisplay
|
|
102
|
-
})
|
|
103
|
-
);
|
|
104
|
-
var index_default = {
|
|
105
|
-
type,
|
|
106
|
-
hookMap,
|
|
107
|
-
initState,
|
|
108
|
-
beforeSave,
|
|
109
|
-
afterSave,
|
|
110
|
-
afterLoaded,
|
|
111
|
-
afterRetrieve,
|
|
112
|
-
onUserInteraction,
|
|
113
|
-
beforeDisplay
|
|
114
|
-
};
|
|
115
|
-
export {
|
|
116
|
-
afterLoaded,
|
|
117
|
-
afterRetrieve,
|
|
118
|
-
afterSave,
|
|
119
|
-
beforeDisplay,
|
|
120
|
-
beforeSave,
|
|
121
|
-
index_default as default,
|
|
122
|
-
hookMap,
|
|
123
|
-
initState,
|
|
124
|
-
onUserInteraction,
|
|
125
|
-
type
|
|
126
|
-
};
|