@dooboostore/dom-render 1.0.110 → 1.0.112
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/README.MD +1 -2
- package/dist/cjs/DomRenderProxy.js +89 -48
- package/dist/cjs/DomRenderProxy.js.map +2 -2
- package/dist/cjs/components/ComponentBase.js +47 -1
- package/dist/cjs/components/ComponentBase.js.map +2 -2
- package/dist/cjs/components/a/A.js +22 -0
- package/dist/cjs/components/a/A.js.map +2 -2
- package/dist/cjs/components/appender/Appender.js +21 -4
- package/dist/cjs/components/appender/Appender.js.map +2 -2
- package/dist/cjs/components/details/Details.js +5 -0
- package/dist/cjs/components/details/Details.js.map +2 -2
- package/dist/cjs/components/forOf/ForOf.js +2 -2
- package/dist/cjs/components/forOf/ForOf.js.map +1 -1
- package/dist/cjs/components/if/If.js +1 -1
- package/dist/cjs/components/if/If.js.map +2 -2
- package/dist/cjs/components/index.js +3 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/router/RouterOutlet.js +41 -10
- package/dist/cjs/components/router/RouterOutlet.js.map +2 -2
- package/dist/cjs/components/select/Select.js +39 -1
- package/dist/cjs/components/select/Select.js.map +2 -2
- package/dist/cjs/components/this/This.js +33 -5
- package/dist/cjs/components/this/This.js.map +2 -2
- package/dist/cjs/decorators/DomRenderNoProxy.js +3 -9
- package/dist/cjs/decorators/DomRenderNoProxy.js.map +2 -2
- package/dist/cjs/events/EventManager.js +103 -37
- package/dist/cjs/events/EventManager.js.map +2 -2
- package/dist/cjs/lifecycle/OnChangeAttrRender.js.map +1 -1
- package/dist/cjs/lifecycle/OnChildRawSetRendered.js +26 -0
- package/dist/cjs/lifecycle/OnChildRawSetRendered.js.map +7 -0
- package/dist/cjs/lifecycle/OnRawSetRendered.js.map +2 -2
- package/dist/cjs/operators/Appender.js +8 -1
- package/dist/cjs/operators/Appender.js.map +2 -2
- package/dist/cjs/operators/Dr.js +2 -2
- package/dist/cjs/operators/Dr.js.map +2 -2
- package/dist/cjs/operators/DrAppender.js +2 -2
- package/dist/cjs/operators/DrAppender.js.map +2 -2
- package/dist/cjs/operators/DrFor.js +2 -2
- package/dist/cjs/operators/DrFor.js.map +2 -2
- package/dist/cjs/operators/DrForOf.js +34 -6
- package/dist/cjs/operators/DrForOf.js.map +2 -2
- package/dist/cjs/operators/DrForm.js +6 -6
- package/dist/cjs/operators/DrForm.js.map +2 -2
- package/dist/cjs/operators/DrInnerHTML.js +2 -2
- package/dist/cjs/operators/DrInnerHTML.js.map +2 -2
- package/dist/cjs/operators/DrRepeat.js +2 -2
- package/dist/cjs/operators/DrRepeat.js.map +2 -2
- package/dist/cjs/operators/DrStripElement.js +2 -2
- package/dist/cjs/operators/DrStripElement.js.map +2 -2
- package/dist/cjs/operators/DrTargetElement.js +14 -5
- package/dist/cjs/operators/DrTargetElement.js.map +2 -2
- package/dist/cjs/operators/DrTargetElementIsElement.js +2 -2
- package/dist/cjs/operators/DrTargetElementIsElement.js.map +2 -2
- package/dist/cjs/operators/DrThis.js +2 -2
- package/dist/cjs/operators/DrThis.js.map +2 -2
- package/dist/cjs/operators/DrThisProperty.js +2 -1
- package/dist/cjs/operators/DrThisProperty.js.map +2 -2
- package/dist/cjs/rawsets/RawSet.js +87 -160
- package/dist/cjs/rawsets/RawSet.js.map +2 -2
- package/dist/cjs/routers/HashRouter.js +3 -0
- package/dist/cjs/routers/HashRouter.js.map +2 -2
- package/dist/cjs/routers/PathRouter.js +3 -0
- package/dist/cjs/routers/PathRouter.js.map +2 -2
- package/dist/cjs/routers/Router.js +25 -21
- package/dist/cjs/routers/Router.js.map +2 -2
- package/dist/esm/DomRenderProxy.js +89 -48
- package/dist/esm/DomRenderProxy.js.map +2 -2
- package/dist/esm/components/ComponentBase.js +47 -1
- package/dist/esm/components/ComponentBase.js.map +2 -2
- package/dist/esm/components/a/A.js +22 -0
- package/dist/esm/components/a/A.js.map +2 -2
- package/dist/esm/components/appender/Appender.js +22 -5
- package/dist/esm/components/appender/Appender.js.map +2 -2
- package/dist/esm/components/details/Details.js +5 -0
- package/dist/esm/components/details/Details.js.map +2 -2
- package/dist/esm/components/forOf/ForOf.js +2 -2
- package/dist/esm/components/forOf/ForOf.js.map +1 -1
- package/dist/esm/components/if/If.js +1 -1
- package/dist/esm/components/if/If.js.map +2 -2
- package/dist/esm/components/index.js +3 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/router/RouterOutlet.js +41 -10
- package/dist/esm/components/router/RouterOutlet.js.map +2 -2
- package/dist/esm/components/select/Select.js +39 -1
- package/dist/esm/components/select/Select.js.map +2 -2
- package/dist/esm/components/this/This.js +33 -5
- package/dist/esm/components/this/This.js.map +2 -2
- package/dist/esm/decorators/DomRenderNoProxy.js +3 -9
- package/dist/esm/decorators/DomRenderNoProxy.js.map +2 -2
- package/dist/esm/events/EventManager.js +103 -37
- package/dist/esm/events/EventManager.js.map +2 -2
- package/dist/esm/lifecycle/OnChangeAttrRender.js.map +1 -1
- package/dist/esm/lifecycle/OnChildRawSetRendered.js +7 -0
- package/dist/esm/lifecycle/OnChildRawSetRendered.js.map +7 -0
- package/dist/esm/lifecycle/OnRawSetRendered.js.map +2 -2
- package/dist/esm/operators/Appender.js +8 -1
- package/dist/esm/operators/Appender.js.map +2 -2
- package/dist/esm/operators/Dr.js +2 -2
- package/dist/esm/operators/Dr.js.map +2 -2
- package/dist/esm/operators/DrAppender.js +2 -2
- package/dist/esm/operators/DrAppender.js.map +2 -2
- package/dist/esm/operators/DrFor.js +2 -2
- package/dist/esm/operators/DrFor.js.map +2 -2
- package/dist/esm/operators/DrForOf.js +34 -6
- package/dist/esm/operators/DrForOf.js.map +2 -2
- package/dist/esm/operators/DrForm.js +6 -6
- package/dist/esm/operators/DrForm.js.map +2 -2
- package/dist/esm/operators/DrInnerHTML.js +2 -2
- package/dist/esm/operators/DrInnerHTML.js.map +2 -2
- package/dist/esm/operators/DrRepeat.js +2 -2
- package/dist/esm/operators/DrRepeat.js.map +2 -2
- package/dist/esm/operators/DrStripElement.js +2 -2
- package/dist/esm/operators/DrStripElement.js.map +2 -2
- package/dist/esm/operators/DrTargetElement.js +14 -5
- package/dist/esm/operators/DrTargetElement.js.map +2 -2
- package/dist/esm/operators/DrTargetElementIsElement.js +2 -2
- package/dist/esm/operators/DrTargetElementIsElement.js.map +2 -2
- package/dist/esm/operators/DrThis.js +2 -2
- package/dist/esm/operators/DrThis.js.map +2 -2
- package/dist/esm/operators/DrThisProperty.js +2 -1
- package/dist/esm/operators/DrThisProperty.js.map +2 -2
- package/dist/esm/rawsets/RawSet.js +87 -160
- package/dist/esm/rawsets/RawSet.js.map +2 -2
- package/dist/esm/routers/HashRouter.js +3 -0
- package/dist/esm/routers/HashRouter.js.map +2 -2
- package/dist/esm/routers/PathRouter.js +3 -0
- package/dist/esm/routers/PathRouter.js.map +2 -2
- package/dist/esm/routers/Router.js +25 -21
- package/dist/esm/routers/Router.js.map +2 -2
- package/dist/esm-bundle/dooboostore-dom-render.esm.js +830 -1533
- package/dist/esm-bundle/dooboostore-dom-render.esm.js.map +4 -4
- package/dist/types/DomRenderProxy.d.ts.map +1 -1
- package/dist/types/components/ComponentBase.d.ts +12 -1
- package/dist/types/components/ComponentBase.d.ts.map +1 -1
- package/dist/types/components/a/A.d.ts +6 -0
- package/dist/types/components/a/A.d.ts.map +1 -1
- package/dist/types/components/appender/Appender.d.ts +1 -0
- package/dist/types/components/appender/Appender.d.ts.map +1 -1
- package/dist/types/components/details/Details.d.ts +2 -0
- package/dist/types/components/details/Details.d.ts.map +1 -1
- package/dist/types/components/forOf/ForOf.d.ts +1 -1
- package/dist/types/components/forOf/ForOf.d.ts.map +1 -1
- package/dist/types/components/if/If.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/router/RouterOutlet.d.ts +6 -3
- package/dist/types/components/router/RouterOutlet.d.ts.map +1 -1
- package/dist/types/components/select/Select.d.ts +5 -3
- package/dist/types/components/select/Select.d.ts.map +1 -1
- package/dist/types/components/this/This.d.ts +5 -1
- package/dist/types/components/this/This.d.ts.map +1 -1
- package/dist/types/decorators/DomRenderNoProxy.d.ts.map +1 -1
- package/dist/types/events/EventManager.d.ts +1 -0
- package/dist/types/events/EventManager.d.ts.map +1 -1
- package/dist/types/lifecycle/OnChangeAttrRender.d.ts +1 -1
- package/dist/types/lifecycle/OnChangeAttrRender.d.ts.map +1 -1
- package/dist/types/lifecycle/OnChildRawSetRendered.d.ts +9 -0
- package/dist/types/lifecycle/OnChildRawSetRendered.d.ts.map +1 -0
- package/dist/types/lifecycle/OnRawSetRendered.d.ts +2 -0
- package/dist/types/lifecycle/OnRawSetRendered.d.ts.map +1 -1
- package/dist/types/operators/Appender.d.ts +1 -0
- package/dist/types/operators/Appender.d.ts.map +1 -1
- package/dist/types/operators/Dr.d.ts.map +1 -1
- package/dist/types/operators/DrAppender.d.ts.map +1 -1
- package/dist/types/operators/DrFor.d.ts.map +1 -1
- package/dist/types/operators/DrForOf.d.ts.map +1 -1
- package/dist/types/operators/DrForm.d.ts.map +1 -1
- package/dist/types/operators/DrInnerHTML.d.ts.map +1 -1
- package/dist/types/operators/DrRepeat.d.ts.map +1 -1
- package/dist/types/operators/DrStripElement.d.ts.map +1 -1
- package/dist/types/operators/DrTargetElement.d.ts.map +1 -1
- package/dist/types/operators/DrThisProperty.d.ts.map +1 -1
- package/dist/types/rawsets/RawSet.d.ts +4 -1
- package/dist/types/rawsets/RawSet.d.ts.map +1 -1
- package/dist/types/routers/HashRouter.d.ts +1 -0
- package/dist/types/routers/HashRouter.d.ts.map +1 -1
- package/dist/types/routers/PathRouter.d.ts +1 -0
- package/dist/types/routers/PathRouter.d.ts.map +1 -1
- package/dist/types/routers/Router.d.ts +3 -0
- package/dist/types/routers/Router.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-dom-render.umd.js +830 -1533
- package/dist/umd-bundle/dooboostore-dom-render.umd.js.map +4 -4
- package/package.json +4 -4
- package/src/DomRenderProxy.ts +169 -75
- package/src/DomRenderProxy.ts_cache_back +1031 -0
- package/src/components/ComponentBase.ts +61 -5
- package/src/components/a/A.ts +25 -0
- package/src/components/appender/Appender.ts +3 -3
- package/src/components/details/Details.ts +7 -0
- package/src/components/forOf/ForOf.ts +2 -2
- package/src/components/if/If.ts +3 -2
- package/src/components/index.ts +3 -0
- package/src/components/router/RouterOutlet.ts +60 -22
- package/src/components/select/Select.ts +69 -30
- package/src/components/this/This.ts +41 -6
- package/src/decorators/DomRenderNoProxy.ts +17 -14
- package/src/events/EventManager.ts +180 -77
- package/src/lifecycle/OnChangeAttrRender.ts +1 -1
- package/src/lifecycle/OnChildRawSetRendered.ts +13 -0
- package/src/lifecycle/OnRawSetRendered.ts +3 -1
- package/src/operators/Appender.ts +8 -1
- package/src/operators/Dr.ts +2 -1
- package/src/operators/DrAppender.ts +2 -1
- package/src/operators/DrFor.ts +2 -1
- package/src/operators/DrForOf.ts +36 -6
- package/src/operators/DrForm.ts +6 -5
- package/src/operators/DrInnerHTML.ts +2 -1
- package/src/operators/DrRepeat.ts +2 -1
- package/src/operators/DrStripElement.ts +2 -1
- package/src/operators/DrTargetElement.ts +17 -5
- package/src/operators/DrTargetElementIsElement.ts +2 -2
- package/src/operators/DrThis.ts +2 -2
- package/src/operators/DrThisProperty.ts +2 -1
- package/src/rawsets/RawSet.ts +161 -237
- package/src/routers/HashRouter.ts +4 -0
- package/src/routers/PathRouter.ts +5 -0
- package/src/routers/Router.ts +64 -47
- package/src/node_modules/.bin/acorn +0 -17
- package/src/node_modules/.bin/browserslist +0 -17
- package/src/node_modules/.bin/eslint +0 -17
- package/src/node_modules/.bin/sbf +0 -17
- package/src/node_modules/.bin/ts-node +0 -17
- package/src/node_modules/.bin/ts-node-cwd +0 -17
- package/src/node_modules/.bin/ts-node-dev +0 -17
- package/src/node_modules/.bin/ts-node-esm +0 -17
- package/src/node_modules/.bin/ts-node-script +0 -17
- package/src/node_modules/.bin/ts-node-transpile-only +0 -17
- package/src/node_modules/.bin/ts-script +0 -17
- package/src/node_modules/.bin/tsc +0 -17
- package/src/node_modules/.bin/tsnd +0 -17
- package/src/node_modules/.bin/tsserver +0 -17
- package/src/node_modules/.bin/webpack +0 -17
- package/src/node_modules/.bin/webpack-cli +0 -17
- package/src/node_modules/.bin/webpack-dev-server +0 -17
|
@@ -28,1093 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
mod
|
|
29
29
|
));
|
|
30
30
|
|
|
31
|
-
// ../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
32
|
-
var require_Reflect = __commonJS({
|
|
33
|
-
"../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js"() {
|
|
34
|
-
var Reflect2;
|
|
35
|
-
(function(Reflect3) {
|
|
36
|
-
(function(factory) {
|
|
37
|
-
var root = typeof globalThis === "object" ? globalThis : typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : sloppyModeThis();
|
|
38
|
-
var exporter = makeExporter(Reflect3);
|
|
39
|
-
if (typeof root.Reflect !== "undefined") {
|
|
40
|
-
exporter = makeExporter(root.Reflect, exporter);
|
|
41
|
-
}
|
|
42
|
-
factory(exporter, root);
|
|
43
|
-
if (typeof root.Reflect === "undefined") {
|
|
44
|
-
root.Reflect = Reflect3;
|
|
45
|
-
}
|
|
46
|
-
function makeExporter(target, previous) {
|
|
47
|
-
return function(key, value) {
|
|
48
|
-
Object.defineProperty(target, key, { configurable: true, writable: true, value });
|
|
49
|
-
if (previous)
|
|
50
|
-
previous(key, value);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function functionThis() {
|
|
54
|
-
try {
|
|
55
|
-
return Function("return this;")();
|
|
56
|
-
} catch (_) {
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function indirectEvalThis() {
|
|
60
|
-
try {
|
|
61
|
-
return (void 0, eval)("(function() { return this; })()");
|
|
62
|
-
} catch (_) {
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function sloppyModeThis() {
|
|
66
|
-
return functionThis() || indirectEvalThis();
|
|
67
|
-
}
|
|
68
|
-
})(function(exporter, root) {
|
|
69
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
70
|
-
var supportsSymbol = typeof Symbol === "function";
|
|
71
|
-
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
72
|
-
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
73
|
-
var supportsCreate = typeof Object.create === "function";
|
|
74
|
-
var supportsProto = { __proto__: [] } instanceof Array;
|
|
75
|
-
var downLevel = !supportsCreate && !supportsProto;
|
|
76
|
-
var HashMap = {
|
|
77
|
-
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
78
|
-
create: supportsCreate ? function() {
|
|
79
|
-
return MakeDictionary(/* @__PURE__ */ Object.create(null));
|
|
80
|
-
} : supportsProto ? function() {
|
|
81
|
-
return MakeDictionary({ __proto__: null });
|
|
82
|
-
} : function() {
|
|
83
|
-
return MakeDictionary({});
|
|
84
|
-
},
|
|
85
|
-
has: downLevel ? function(map2, key) {
|
|
86
|
-
return hasOwn.call(map2, key);
|
|
87
|
-
} : function(map2, key) {
|
|
88
|
-
return key in map2;
|
|
89
|
-
},
|
|
90
|
-
get: downLevel ? function(map2, key) {
|
|
91
|
-
return hasOwn.call(map2, key) ? map2[key] : void 0;
|
|
92
|
-
} : function(map2, key) {
|
|
93
|
-
return map2[key];
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
var functionPrototype = Object.getPrototypeOf(Function);
|
|
97
|
-
var _Map = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
|
|
98
|
-
var _Set = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
|
|
99
|
-
var _WeakMap = typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
|
|
100
|
-
var registrySymbol = supportsSymbol ? Symbol.for("@reflect-metadata:registry") : void 0;
|
|
101
|
-
var metadataRegistry = GetOrCreateMetadataRegistry();
|
|
102
|
-
var metadataProvider = CreateMetadataProvider(metadataRegistry);
|
|
103
|
-
function decorate(decorators, target, propertyKey, attributes) {
|
|
104
|
-
if (!IsUndefined(propertyKey)) {
|
|
105
|
-
if (!IsArray(decorators))
|
|
106
|
-
throw new TypeError();
|
|
107
|
-
if (!IsObject(target))
|
|
108
|
-
throw new TypeError();
|
|
109
|
-
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
|
|
110
|
-
throw new TypeError();
|
|
111
|
-
if (IsNull(attributes))
|
|
112
|
-
attributes = void 0;
|
|
113
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
114
|
-
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
115
|
-
} else {
|
|
116
|
-
if (!IsArray(decorators))
|
|
117
|
-
throw new TypeError();
|
|
118
|
-
if (!IsConstructor(target))
|
|
119
|
-
throw new TypeError();
|
|
120
|
-
return DecorateConstructor(decorators, target);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
exporter("decorate", decorate);
|
|
124
|
-
function metadata(metadataKey, metadataValue) {
|
|
125
|
-
function decorator(target, propertyKey) {
|
|
126
|
-
if (!IsObject(target))
|
|
127
|
-
throw new TypeError();
|
|
128
|
-
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
|
|
129
|
-
throw new TypeError();
|
|
130
|
-
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
131
|
-
}
|
|
132
|
-
return decorator;
|
|
133
|
-
}
|
|
134
|
-
exporter("metadata", metadata);
|
|
135
|
-
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
136
|
-
if (!IsObject(target))
|
|
137
|
-
throw new TypeError();
|
|
138
|
-
if (!IsUndefined(propertyKey))
|
|
139
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
140
|
-
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
141
|
-
}
|
|
142
|
-
exporter("defineMetadata", defineMetadata);
|
|
143
|
-
function hasMetadata(metadataKey, target, propertyKey) {
|
|
144
|
-
if (!IsObject(target))
|
|
145
|
-
throw new TypeError();
|
|
146
|
-
if (!IsUndefined(propertyKey))
|
|
147
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
148
|
-
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
149
|
-
}
|
|
150
|
-
exporter("hasMetadata", hasMetadata);
|
|
151
|
-
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
152
|
-
if (!IsObject(target))
|
|
153
|
-
throw new TypeError();
|
|
154
|
-
if (!IsUndefined(propertyKey))
|
|
155
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
156
|
-
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
157
|
-
}
|
|
158
|
-
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
159
|
-
function getMetadata(metadataKey, target, propertyKey) {
|
|
160
|
-
if (!IsObject(target))
|
|
161
|
-
throw new TypeError();
|
|
162
|
-
if (!IsUndefined(propertyKey))
|
|
163
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
164
|
-
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
165
|
-
}
|
|
166
|
-
exporter("getMetadata", getMetadata);
|
|
167
|
-
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
168
|
-
if (!IsObject(target))
|
|
169
|
-
throw new TypeError();
|
|
170
|
-
if (!IsUndefined(propertyKey))
|
|
171
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
172
|
-
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
173
|
-
}
|
|
174
|
-
exporter("getOwnMetadata", getOwnMetadata);
|
|
175
|
-
function getMetadataKeys(target, propertyKey) {
|
|
176
|
-
if (!IsObject(target))
|
|
177
|
-
throw new TypeError();
|
|
178
|
-
if (!IsUndefined(propertyKey))
|
|
179
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
180
|
-
return OrdinaryMetadataKeys(target, propertyKey);
|
|
181
|
-
}
|
|
182
|
-
exporter("getMetadataKeys", getMetadataKeys);
|
|
183
|
-
function getOwnMetadataKeys(target, propertyKey) {
|
|
184
|
-
if (!IsObject(target))
|
|
185
|
-
throw new TypeError();
|
|
186
|
-
if (!IsUndefined(propertyKey))
|
|
187
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
188
|
-
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
189
|
-
}
|
|
190
|
-
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
191
|
-
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
192
|
-
if (!IsObject(target))
|
|
193
|
-
throw new TypeError();
|
|
194
|
-
if (!IsUndefined(propertyKey))
|
|
195
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
196
|
-
if (!IsObject(target))
|
|
197
|
-
throw new TypeError();
|
|
198
|
-
if (!IsUndefined(propertyKey))
|
|
199
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
200
|
-
var provider = GetMetadataProvider(
|
|
201
|
-
target,
|
|
202
|
-
propertyKey,
|
|
203
|
-
/*Create*/
|
|
204
|
-
false
|
|
205
|
-
);
|
|
206
|
-
if (IsUndefined(provider))
|
|
207
|
-
return false;
|
|
208
|
-
return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
|
|
209
|
-
}
|
|
210
|
-
exporter("deleteMetadata", deleteMetadata);
|
|
211
|
-
function DecorateConstructor(decorators, target) {
|
|
212
|
-
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
213
|
-
var decorator = decorators[i];
|
|
214
|
-
var decorated = decorator(target);
|
|
215
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
216
|
-
if (!IsConstructor(decorated))
|
|
217
|
-
throw new TypeError();
|
|
218
|
-
target = decorated;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
return target;
|
|
222
|
-
}
|
|
223
|
-
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
224
|
-
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
225
|
-
var decorator = decorators[i];
|
|
226
|
-
var decorated = decorator(target, propertyKey, descriptor);
|
|
227
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
228
|
-
if (!IsObject(decorated))
|
|
229
|
-
throw new TypeError();
|
|
230
|
-
descriptor = decorated;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
return descriptor;
|
|
234
|
-
}
|
|
235
|
-
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
236
|
-
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
237
|
-
if (hasOwn2)
|
|
238
|
-
return true;
|
|
239
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
240
|
-
if (!IsNull(parent))
|
|
241
|
-
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
242
|
-
return false;
|
|
243
|
-
}
|
|
244
|
-
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
245
|
-
var provider = GetMetadataProvider(
|
|
246
|
-
O,
|
|
247
|
-
P,
|
|
248
|
-
/*Create*/
|
|
249
|
-
false
|
|
250
|
-
);
|
|
251
|
-
if (IsUndefined(provider))
|
|
252
|
-
return false;
|
|
253
|
-
return ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P));
|
|
254
|
-
}
|
|
255
|
-
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
256
|
-
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
257
|
-
if (hasOwn2)
|
|
258
|
-
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
259
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
260
|
-
if (!IsNull(parent))
|
|
261
|
-
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
262
|
-
return void 0;
|
|
263
|
-
}
|
|
264
|
-
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
265
|
-
var provider = GetMetadataProvider(
|
|
266
|
-
O,
|
|
267
|
-
P,
|
|
268
|
-
/*Create*/
|
|
269
|
-
false
|
|
270
|
-
);
|
|
271
|
-
if (IsUndefined(provider))
|
|
272
|
-
return;
|
|
273
|
-
return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
274
|
-
}
|
|
275
|
-
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
276
|
-
var provider = GetMetadataProvider(
|
|
277
|
-
O,
|
|
278
|
-
P,
|
|
279
|
-
/*Create*/
|
|
280
|
-
true
|
|
281
|
-
);
|
|
282
|
-
provider.OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P);
|
|
283
|
-
}
|
|
284
|
-
function OrdinaryMetadataKeys(O, P) {
|
|
285
|
-
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
286
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
287
|
-
if (parent === null)
|
|
288
|
-
return ownKeys;
|
|
289
|
-
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
290
|
-
if (parentKeys.length <= 0)
|
|
291
|
-
return ownKeys;
|
|
292
|
-
if (ownKeys.length <= 0)
|
|
293
|
-
return parentKeys;
|
|
294
|
-
var set = new _Set();
|
|
295
|
-
var keys = [];
|
|
296
|
-
for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
|
|
297
|
-
var key = ownKeys_1[_i];
|
|
298
|
-
var hasKey = set.has(key);
|
|
299
|
-
if (!hasKey) {
|
|
300
|
-
set.add(key);
|
|
301
|
-
keys.push(key);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
for (var _a2 = 0, parentKeys_1 = parentKeys; _a2 < parentKeys_1.length; _a2++) {
|
|
305
|
-
var key = parentKeys_1[_a2];
|
|
306
|
-
var hasKey = set.has(key);
|
|
307
|
-
if (!hasKey) {
|
|
308
|
-
set.add(key);
|
|
309
|
-
keys.push(key);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
return keys;
|
|
313
|
-
}
|
|
314
|
-
function OrdinaryOwnMetadataKeys(O, P) {
|
|
315
|
-
var provider = GetMetadataProvider(
|
|
316
|
-
O,
|
|
317
|
-
P,
|
|
318
|
-
/*create*/
|
|
319
|
-
false
|
|
320
|
-
);
|
|
321
|
-
if (!provider) {
|
|
322
|
-
return [];
|
|
323
|
-
}
|
|
324
|
-
return provider.OrdinaryOwnMetadataKeys(O, P);
|
|
325
|
-
}
|
|
326
|
-
function Type(x) {
|
|
327
|
-
if (x === null)
|
|
328
|
-
return 1;
|
|
329
|
-
switch (typeof x) {
|
|
330
|
-
case "undefined":
|
|
331
|
-
return 0;
|
|
332
|
-
case "boolean":
|
|
333
|
-
return 2;
|
|
334
|
-
case "string":
|
|
335
|
-
return 3;
|
|
336
|
-
case "symbol":
|
|
337
|
-
return 4;
|
|
338
|
-
case "number":
|
|
339
|
-
return 5;
|
|
340
|
-
case "object":
|
|
341
|
-
return x === null ? 1 : 6;
|
|
342
|
-
default:
|
|
343
|
-
return 6;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
function IsUndefined(x) {
|
|
347
|
-
return x === void 0;
|
|
348
|
-
}
|
|
349
|
-
function IsNull(x) {
|
|
350
|
-
return x === null;
|
|
351
|
-
}
|
|
352
|
-
function IsSymbol(x) {
|
|
353
|
-
return typeof x === "symbol";
|
|
354
|
-
}
|
|
355
|
-
function IsObject(x) {
|
|
356
|
-
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
357
|
-
}
|
|
358
|
-
function ToPrimitive(input, PreferredType) {
|
|
359
|
-
switch (Type(input)) {
|
|
360
|
-
case 0:
|
|
361
|
-
return input;
|
|
362
|
-
case 1:
|
|
363
|
-
return input;
|
|
364
|
-
case 2:
|
|
365
|
-
return input;
|
|
366
|
-
case 3:
|
|
367
|
-
return input;
|
|
368
|
-
case 4:
|
|
369
|
-
return input;
|
|
370
|
-
case 5:
|
|
371
|
-
return input;
|
|
372
|
-
}
|
|
373
|
-
var hint = PreferredType === 3 ? "string" : PreferredType === 5 ? "number" : "default";
|
|
374
|
-
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
375
|
-
if (exoticToPrim !== void 0) {
|
|
376
|
-
var result = exoticToPrim.call(input, hint);
|
|
377
|
-
if (IsObject(result))
|
|
378
|
-
throw new TypeError();
|
|
379
|
-
return result;
|
|
380
|
-
}
|
|
381
|
-
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
382
|
-
}
|
|
383
|
-
function OrdinaryToPrimitive(O, hint) {
|
|
384
|
-
if (hint === "string") {
|
|
385
|
-
var toString_1 = O.toString;
|
|
386
|
-
if (IsCallable(toString_1)) {
|
|
387
|
-
var result = toString_1.call(O);
|
|
388
|
-
if (!IsObject(result))
|
|
389
|
-
return result;
|
|
390
|
-
}
|
|
391
|
-
var valueOf = O.valueOf;
|
|
392
|
-
if (IsCallable(valueOf)) {
|
|
393
|
-
var result = valueOf.call(O);
|
|
394
|
-
if (!IsObject(result))
|
|
395
|
-
return result;
|
|
396
|
-
}
|
|
397
|
-
} else {
|
|
398
|
-
var valueOf = O.valueOf;
|
|
399
|
-
if (IsCallable(valueOf)) {
|
|
400
|
-
var result = valueOf.call(O);
|
|
401
|
-
if (!IsObject(result))
|
|
402
|
-
return result;
|
|
403
|
-
}
|
|
404
|
-
var toString_2 = O.toString;
|
|
405
|
-
if (IsCallable(toString_2)) {
|
|
406
|
-
var result = toString_2.call(O);
|
|
407
|
-
if (!IsObject(result))
|
|
408
|
-
return result;
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
throw new TypeError();
|
|
412
|
-
}
|
|
413
|
-
function ToBoolean(argument) {
|
|
414
|
-
return !!argument;
|
|
415
|
-
}
|
|
416
|
-
function ToString(argument) {
|
|
417
|
-
return "" + argument;
|
|
418
|
-
}
|
|
419
|
-
function ToPropertyKey(argument) {
|
|
420
|
-
var key = ToPrimitive(
|
|
421
|
-
argument,
|
|
422
|
-
3
|
|
423
|
-
/* String */
|
|
424
|
-
);
|
|
425
|
-
if (IsSymbol(key))
|
|
426
|
-
return key;
|
|
427
|
-
return ToString(key);
|
|
428
|
-
}
|
|
429
|
-
function IsArray(argument) {
|
|
430
|
-
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
431
|
-
}
|
|
432
|
-
function IsCallable(argument) {
|
|
433
|
-
return typeof argument === "function";
|
|
434
|
-
}
|
|
435
|
-
function IsConstructor(argument) {
|
|
436
|
-
return typeof argument === "function";
|
|
437
|
-
}
|
|
438
|
-
function IsPropertyKey(argument) {
|
|
439
|
-
switch (Type(argument)) {
|
|
440
|
-
case 3:
|
|
441
|
-
return true;
|
|
442
|
-
case 4:
|
|
443
|
-
return true;
|
|
444
|
-
default:
|
|
445
|
-
return false;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
function SameValueZero(x, y) {
|
|
449
|
-
return x === y || x !== x && y !== y;
|
|
450
|
-
}
|
|
451
|
-
function GetMethod(V, P) {
|
|
452
|
-
var func = V[P];
|
|
453
|
-
if (func === void 0 || func === null)
|
|
454
|
-
return void 0;
|
|
455
|
-
if (!IsCallable(func))
|
|
456
|
-
throw new TypeError();
|
|
457
|
-
return func;
|
|
458
|
-
}
|
|
459
|
-
function GetIterator(obj) {
|
|
460
|
-
var method = GetMethod(obj, iteratorSymbol);
|
|
461
|
-
if (!IsCallable(method))
|
|
462
|
-
throw new TypeError();
|
|
463
|
-
var iterator = method.call(obj);
|
|
464
|
-
if (!IsObject(iterator))
|
|
465
|
-
throw new TypeError();
|
|
466
|
-
return iterator;
|
|
467
|
-
}
|
|
468
|
-
function IteratorValue(iterResult) {
|
|
469
|
-
return iterResult.value;
|
|
470
|
-
}
|
|
471
|
-
function IteratorStep(iterator) {
|
|
472
|
-
var result = iterator.next();
|
|
473
|
-
return result.done ? false : result;
|
|
474
|
-
}
|
|
475
|
-
function IteratorClose(iterator) {
|
|
476
|
-
var f = iterator["return"];
|
|
477
|
-
if (f)
|
|
478
|
-
f.call(iterator);
|
|
479
|
-
}
|
|
480
|
-
function OrdinaryGetPrototypeOf(O) {
|
|
481
|
-
var proto = Object.getPrototypeOf(O);
|
|
482
|
-
if (typeof O !== "function" || O === functionPrototype)
|
|
483
|
-
return proto;
|
|
484
|
-
if (proto !== functionPrototype)
|
|
485
|
-
return proto;
|
|
486
|
-
var prototype = O.prototype;
|
|
487
|
-
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
488
|
-
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
489
|
-
return proto;
|
|
490
|
-
var constructor = prototypeProto.constructor;
|
|
491
|
-
if (typeof constructor !== "function")
|
|
492
|
-
return proto;
|
|
493
|
-
if (constructor === O)
|
|
494
|
-
return proto;
|
|
495
|
-
return constructor;
|
|
496
|
-
}
|
|
497
|
-
function CreateMetadataRegistry() {
|
|
498
|
-
var fallback;
|
|
499
|
-
if (!IsUndefined(registrySymbol) && typeof root.Reflect !== "undefined" && !(registrySymbol in root.Reflect) && typeof root.Reflect.defineMetadata === "function") {
|
|
500
|
-
fallback = CreateFallbackProvider(root.Reflect);
|
|
501
|
-
}
|
|
502
|
-
var first;
|
|
503
|
-
var second;
|
|
504
|
-
var rest;
|
|
505
|
-
var targetProviderMap = new _WeakMap();
|
|
506
|
-
var registry = {
|
|
507
|
-
registerProvider,
|
|
508
|
-
getProvider,
|
|
509
|
-
setProvider
|
|
510
|
-
};
|
|
511
|
-
return registry;
|
|
512
|
-
function registerProvider(provider) {
|
|
513
|
-
if (!Object.isExtensible(registry)) {
|
|
514
|
-
throw new Error("Cannot add provider to a frozen registry.");
|
|
515
|
-
}
|
|
516
|
-
switch (true) {
|
|
517
|
-
case fallback === provider:
|
|
518
|
-
break;
|
|
519
|
-
case IsUndefined(first):
|
|
520
|
-
first = provider;
|
|
521
|
-
break;
|
|
522
|
-
case first === provider:
|
|
523
|
-
break;
|
|
524
|
-
case IsUndefined(second):
|
|
525
|
-
second = provider;
|
|
526
|
-
break;
|
|
527
|
-
case second === provider:
|
|
528
|
-
break;
|
|
529
|
-
default:
|
|
530
|
-
if (rest === void 0)
|
|
531
|
-
rest = new _Set();
|
|
532
|
-
rest.add(provider);
|
|
533
|
-
break;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
function getProviderNoCache(O, P) {
|
|
537
|
-
if (!IsUndefined(first)) {
|
|
538
|
-
if (first.isProviderFor(O, P))
|
|
539
|
-
return first;
|
|
540
|
-
if (!IsUndefined(second)) {
|
|
541
|
-
if (second.isProviderFor(O, P))
|
|
542
|
-
return first;
|
|
543
|
-
if (!IsUndefined(rest)) {
|
|
544
|
-
var iterator = GetIterator(rest);
|
|
545
|
-
while (true) {
|
|
546
|
-
var next = IteratorStep(iterator);
|
|
547
|
-
if (!next) {
|
|
548
|
-
return void 0;
|
|
549
|
-
}
|
|
550
|
-
var provider = IteratorValue(next);
|
|
551
|
-
if (provider.isProviderFor(O, P)) {
|
|
552
|
-
IteratorClose(iterator);
|
|
553
|
-
return provider;
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
if (!IsUndefined(fallback) && fallback.isProviderFor(O, P)) {
|
|
560
|
-
return fallback;
|
|
561
|
-
}
|
|
562
|
-
return void 0;
|
|
563
|
-
}
|
|
564
|
-
function getProvider(O, P) {
|
|
565
|
-
var providerMap = targetProviderMap.get(O);
|
|
566
|
-
var provider;
|
|
567
|
-
if (!IsUndefined(providerMap)) {
|
|
568
|
-
provider = providerMap.get(P);
|
|
569
|
-
}
|
|
570
|
-
if (!IsUndefined(provider)) {
|
|
571
|
-
return provider;
|
|
572
|
-
}
|
|
573
|
-
provider = getProviderNoCache(O, P);
|
|
574
|
-
if (!IsUndefined(provider)) {
|
|
575
|
-
if (IsUndefined(providerMap)) {
|
|
576
|
-
providerMap = new _Map();
|
|
577
|
-
targetProviderMap.set(O, providerMap);
|
|
578
|
-
}
|
|
579
|
-
providerMap.set(P, provider);
|
|
580
|
-
}
|
|
581
|
-
return provider;
|
|
582
|
-
}
|
|
583
|
-
function hasProvider(provider) {
|
|
584
|
-
if (IsUndefined(provider))
|
|
585
|
-
throw new TypeError();
|
|
586
|
-
return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider);
|
|
587
|
-
}
|
|
588
|
-
function setProvider(O, P, provider) {
|
|
589
|
-
if (!hasProvider(provider)) {
|
|
590
|
-
throw new Error("Metadata provider not registered.");
|
|
591
|
-
}
|
|
592
|
-
var existingProvider = getProvider(O, P);
|
|
593
|
-
if (existingProvider !== provider) {
|
|
594
|
-
if (!IsUndefined(existingProvider)) {
|
|
595
|
-
return false;
|
|
596
|
-
}
|
|
597
|
-
var providerMap = targetProviderMap.get(O);
|
|
598
|
-
if (IsUndefined(providerMap)) {
|
|
599
|
-
providerMap = new _Map();
|
|
600
|
-
targetProviderMap.set(O, providerMap);
|
|
601
|
-
}
|
|
602
|
-
providerMap.set(P, provider);
|
|
603
|
-
}
|
|
604
|
-
return true;
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
function GetOrCreateMetadataRegistry() {
|
|
608
|
-
var metadataRegistry2;
|
|
609
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
610
|
-
metadataRegistry2 = root.Reflect[registrySymbol];
|
|
611
|
-
}
|
|
612
|
-
if (IsUndefined(metadataRegistry2)) {
|
|
613
|
-
metadataRegistry2 = CreateMetadataRegistry();
|
|
614
|
-
}
|
|
615
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
616
|
-
Object.defineProperty(root.Reflect, registrySymbol, {
|
|
617
|
-
enumerable: false,
|
|
618
|
-
configurable: false,
|
|
619
|
-
writable: false,
|
|
620
|
-
value: metadataRegistry2
|
|
621
|
-
});
|
|
622
|
-
}
|
|
623
|
-
return metadataRegistry2;
|
|
624
|
-
}
|
|
625
|
-
function CreateMetadataProvider(registry) {
|
|
626
|
-
var metadata2 = new _WeakMap();
|
|
627
|
-
var provider = {
|
|
628
|
-
isProviderFor: function(O, P) {
|
|
629
|
-
var targetMetadata = metadata2.get(O);
|
|
630
|
-
if (IsUndefined(targetMetadata))
|
|
631
|
-
return false;
|
|
632
|
-
return targetMetadata.has(P);
|
|
633
|
-
},
|
|
634
|
-
OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata2,
|
|
635
|
-
OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata2,
|
|
636
|
-
OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata2,
|
|
637
|
-
OrdinaryOwnMetadataKeys: OrdinaryOwnMetadataKeys2,
|
|
638
|
-
OrdinaryDeleteMetadata
|
|
639
|
-
};
|
|
640
|
-
metadataRegistry.registerProvider(provider);
|
|
641
|
-
return provider;
|
|
642
|
-
function GetOrCreateMetadataMap(O, P, Create) {
|
|
643
|
-
var targetMetadata = metadata2.get(O);
|
|
644
|
-
var createdTargetMetadata = false;
|
|
645
|
-
if (IsUndefined(targetMetadata)) {
|
|
646
|
-
if (!Create)
|
|
647
|
-
return void 0;
|
|
648
|
-
targetMetadata = new _Map();
|
|
649
|
-
metadata2.set(O, targetMetadata);
|
|
650
|
-
createdTargetMetadata = true;
|
|
651
|
-
}
|
|
652
|
-
var metadataMap = targetMetadata.get(P);
|
|
653
|
-
if (IsUndefined(metadataMap)) {
|
|
654
|
-
if (!Create)
|
|
655
|
-
return void 0;
|
|
656
|
-
metadataMap = new _Map();
|
|
657
|
-
targetMetadata.set(P, metadataMap);
|
|
658
|
-
if (!registry.setProvider(O, P, provider)) {
|
|
659
|
-
targetMetadata.delete(P);
|
|
660
|
-
if (createdTargetMetadata) {
|
|
661
|
-
metadata2.delete(O);
|
|
662
|
-
}
|
|
663
|
-
throw new Error("Wrong provider for target.");
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
return metadataMap;
|
|
667
|
-
}
|
|
668
|
-
function OrdinaryHasOwnMetadata2(MetadataKey, O, P) {
|
|
669
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
670
|
-
O,
|
|
671
|
-
P,
|
|
672
|
-
/*Create*/
|
|
673
|
-
false
|
|
674
|
-
);
|
|
675
|
-
if (IsUndefined(metadataMap))
|
|
676
|
-
return false;
|
|
677
|
-
return ToBoolean(metadataMap.has(MetadataKey));
|
|
678
|
-
}
|
|
679
|
-
function OrdinaryGetOwnMetadata2(MetadataKey, O, P) {
|
|
680
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
681
|
-
O,
|
|
682
|
-
P,
|
|
683
|
-
/*Create*/
|
|
684
|
-
false
|
|
685
|
-
);
|
|
686
|
-
if (IsUndefined(metadataMap))
|
|
687
|
-
return void 0;
|
|
688
|
-
return metadataMap.get(MetadataKey);
|
|
689
|
-
}
|
|
690
|
-
function OrdinaryDefineOwnMetadata2(MetadataKey, MetadataValue, O, P) {
|
|
691
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
692
|
-
O,
|
|
693
|
-
P,
|
|
694
|
-
/*Create*/
|
|
695
|
-
true
|
|
696
|
-
);
|
|
697
|
-
metadataMap.set(MetadataKey, MetadataValue);
|
|
698
|
-
}
|
|
699
|
-
function OrdinaryOwnMetadataKeys2(O, P) {
|
|
700
|
-
var keys = [];
|
|
701
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
702
|
-
O,
|
|
703
|
-
P,
|
|
704
|
-
/*Create*/
|
|
705
|
-
false
|
|
706
|
-
);
|
|
707
|
-
if (IsUndefined(metadataMap))
|
|
708
|
-
return keys;
|
|
709
|
-
var keysObj = metadataMap.keys();
|
|
710
|
-
var iterator = GetIterator(keysObj);
|
|
711
|
-
var k = 0;
|
|
712
|
-
while (true) {
|
|
713
|
-
var next = IteratorStep(iterator);
|
|
714
|
-
if (!next) {
|
|
715
|
-
keys.length = k;
|
|
716
|
-
return keys;
|
|
717
|
-
}
|
|
718
|
-
var nextValue = IteratorValue(next);
|
|
719
|
-
try {
|
|
720
|
-
keys[k] = nextValue;
|
|
721
|
-
} catch (e) {
|
|
722
|
-
try {
|
|
723
|
-
IteratorClose(iterator);
|
|
724
|
-
} finally {
|
|
725
|
-
throw e;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
k++;
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
function OrdinaryDeleteMetadata(MetadataKey, O, P) {
|
|
732
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
733
|
-
O,
|
|
734
|
-
P,
|
|
735
|
-
/*Create*/
|
|
736
|
-
false
|
|
737
|
-
);
|
|
738
|
-
if (IsUndefined(metadataMap))
|
|
739
|
-
return false;
|
|
740
|
-
if (!metadataMap.delete(MetadataKey))
|
|
741
|
-
return false;
|
|
742
|
-
if (metadataMap.size === 0) {
|
|
743
|
-
var targetMetadata = metadata2.get(O);
|
|
744
|
-
if (!IsUndefined(targetMetadata)) {
|
|
745
|
-
targetMetadata.delete(P);
|
|
746
|
-
if (targetMetadata.size === 0) {
|
|
747
|
-
metadata2.delete(targetMetadata);
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
return true;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
function CreateFallbackProvider(reflect) {
|
|
755
|
-
var defineMetadata2 = reflect.defineMetadata, hasOwnMetadata2 = reflect.hasOwnMetadata, getOwnMetadata2 = reflect.getOwnMetadata, getOwnMetadataKeys2 = reflect.getOwnMetadataKeys, deleteMetadata2 = reflect.deleteMetadata;
|
|
756
|
-
var metadataOwner = new _WeakMap();
|
|
757
|
-
var provider = {
|
|
758
|
-
isProviderFor: function(O, P) {
|
|
759
|
-
var metadataPropertySet = metadataOwner.get(O);
|
|
760
|
-
if (!IsUndefined(metadataPropertySet) && metadataPropertySet.has(P)) {
|
|
761
|
-
return true;
|
|
762
|
-
}
|
|
763
|
-
if (getOwnMetadataKeys2(O, P).length) {
|
|
764
|
-
if (IsUndefined(metadataPropertySet)) {
|
|
765
|
-
metadataPropertySet = new _Set();
|
|
766
|
-
metadataOwner.set(O, metadataPropertySet);
|
|
767
|
-
}
|
|
768
|
-
metadataPropertySet.add(P);
|
|
769
|
-
return true;
|
|
770
|
-
}
|
|
771
|
-
return false;
|
|
772
|
-
},
|
|
773
|
-
OrdinaryDefineOwnMetadata: defineMetadata2,
|
|
774
|
-
OrdinaryHasOwnMetadata: hasOwnMetadata2,
|
|
775
|
-
OrdinaryGetOwnMetadata: getOwnMetadata2,
|
|
776
|
-
OrdinaryOwnMetadataKeys: getOwnMetadataKeys2,
|
|
777
|
-
OrdinaryDeleteMetadata: deleteMetadata2
|
|
778
|
-
};
|
|
779
|
-
return provider;
|
|
780
|
-
}
|
|
781
|
-
function GetMetadataProvider(O, P, Create) {
|
|
782
|
-
var registeredProvider = metadataRegistry.getProvider(O, P);
|
|
783
|
-
if (!IsUndefined(registeredProvider)) {
|
|
784
|
-
return registeredProvider;
|
|
785
|
-
}
|
|
786
|
-
if (Create) {
|
|
787
|
-
if (metadataRegistry.setProvider(O, P, metadataProvider)) {
|
|
788
|
-
return metadataProvider;
|
|
789
|
-
}
|
|
790
|
-
throw new Error("Illegal state.");
|
|
791
|
-
}
|
|
792
|
-
return void 0;
|
|
793
|
-
}
|
|
794
|
-
function CreateMapPolyfill() {
|
|
795
|
-
var cacheSentinel = {};
|
|
796
|
-
var arraySentinel = [];
|
|
797
|
-
var MapIterator = (
|
|
798
|
-
/** @class */
|
|
799
|
-
function() {
|
|
800
|
-
function MapIterator2(keys, values, selector) {
|
|
801
|
-
this._index = 0;
|
|
802
|
-
this._keys = keys;
|
|
803
|
-
this._values = values;
|
|
804
|
-
this._selector = selector;
|
|
805
|
-
}
|
|
806
|
-
MapIterator2.prototype["@@iterator"] = function() {
|
|
807
|
-
return this;
|
|
808
|
-
};
|
|
809
|
-
MapIterator2.prototype[iteratorSymbol] = function() {
|
|
810
|
-
return this;
|
|
811
|
-
};
|
|
812
|
-
MapIterator2.prototype.next = function() {
|
|
813
|
-
var index = this._index;
|
|
814
|
-
if (index >= 0 && index < this._keys.length) {
|
|
815
|
-
var result = this._selector(this._keys[index], this._values[index]);
|
|
816
|
-
if (index + 1 >= this._keys.length) {
|
|
817
|
-
this._index = -1;
|
|
818
|
-
this._keys = arraySentinel;
|
|
819
|
-
this._values = arraySentinel;
|
|
820
|
-
} else {
|
|
821
|
-
this._index++;
|
|
822
|
-
}
|
|
823
|
-
return { value: result, done: false };
|
|
824
|
-
}
|
|
825
|
-
return { value: void 0, done: true };
|
|
826
|
-
};
|
|
827
|
-
MapIterator2.prototype.throw = function(error) {
|
|
828
|
-
if (this._index >= 0) {
|
|
829
|
-
this._index = -1;
|
|
830
|
-
this._keys = arraySentinel;
|
|
831
|
-
this._values = arraySentinel;
|
|
832
|
-
}
|
|
833
|
-
throw error;
|
|
834
|
-
};
|
|
835
|
-
MapIterator2.prototype.return = function(value) {
|
|
836
|
-
if (this._index >= 0) {
|
|
837
|
-
this._index = -1;
|
|
838
|
-
this._keys = arraySentinel;
|
|
839
|
-
this._values = arraySentinel;
|
|
840
|
-
}
|
|
841
|
-
return { value, done: true };
|
|
842
|
-
};
|
|
843
|
-
return MapIterator2;
|
|
844
|
-
}()
|
|
845
|
-
);
|
|
846
|
-
var Map2 = (
|
|
847
|
-
/** @class */
|
|
848
|
-
function() {
|
|
849
|
-
function Map3() {
|
|
850
|
-
this._keys = [];
|
|
851
|
-
this._values = [];
|
|
852
|
-
this._cacheKey = cacheSentinel;
|
|
853
|
-
this._cacheIndex = -2;
|
|
854
|
-
}
|
|
855
|
-
Object.defineProperty(Map3.prototype, "size", {
|
|
856
|
-
get: function() {
|
|
857
|
-
return this._keys.length;
|
|
858
|
-
},
|
|
859
|
-
enumerable: true,
|
|
860
|
-
configurable: true
|
|
861
|
-
});
|
|
862
|
-
Map3.prototype.has = function(key) {
|
|
863
|
-
return this._find(
|
|
864
|
-
key,
|
|
865
|
-
/*insert*/
|
|
866
|
-
false
|
|
867
|
-
) >= 0;
|
|
868
|
-
};
|
|
869
|
-
Map3.prototype.get = function(key) {
|
|
870
|
-
var index = this._find(
|
|
871
|
-
key,
|
|
872
|
-
/*insert*/
|
|
873
|
-
false
|
|
874
|
-
);
|
|
875
|
-
return index >= 0 ? this._values[index] : void 0;
|
|
876
|
-
};
|
|
877
|
-
Map3.prototype.set = function(key, value) {
|
|
878
|
-
var index = this._find(
|
|
879
|
-
key,
|
|
880
|
-
/*insert*/
|
|
881
|
-
true
|
|
882
|
-
);
|
|
883
|
-
this._values[index] = value;
|
|
884
|
-
return this;
|
|
885
|
-
};
|
|
886
|
-
Map3.prototype.delete = function(key) {
|
|
887
|
-
var index = this._find(
|
|
888
|
-
key,
|
|
889
|
-
/*insert*/
|
|
890
|
-
false
|
|
891
|
-
);
|
|
892
|
-
if (index >= 0) {
|
|
893
|
-
var size = this._keys.length;
|
|
894
|
-
for (var i = index + 1; i < size; i++) {
|
|
895
|
-
this._keys[i - 1] = this._keys[i];
|
|
896
|
-
this._values[i - 1] = this._values[i];
|
|
897
|
-
}
|
|
898
|
-
this._keys.length--;
|
|
899
|
-
this._values.length--;
|
|
900
|
-
if (SameValueZero(key, this._cacheKey)) {
|
|
901
|
-
this._cacheKey = cacheSentinel;
|
|
902
|
-
this._cacheIndex = -2;
|
|
903
|
-
}
|
|
904
|
-
return true;
|
|
905
|
-
}
|
|
906
|
-
return false;
|
|
907
|
-
};
|
|
908
|
-
Map3.prototype.clear = function() {
|
|
909
|
-
this._keys.length = 0;
|
|
910
|
-
this._values.length = 0;
|
|
911
|
-
this._cacheKey = cacheSentinel;
|
|
912
|
-
this._cacheIndex = -2;
|
|
913
|
-
};
|
|
914
|
-
Map3.prototype.keys = function() {
|
|
915
|
-
return new MapIterator(this._keys, this._values, getKey);
|
|
916
|
-
};
|
|
917
|
-
Map3.prototype.values = function() {
|
|
918
|
-
return new MapIterator(this._keys, this._values, getValue);
|
|
919
|
-
};
|
|
920
|
-
Map3.prototype.entries = function() {
|
|
921
|
-
return new MapIterator(this._keys, this._values, getEntry);
|
|
922
|
-
};
|
|
923
|
-
Map3.prototype["@@iterator"] = function() {
|
|
924
|
-
return this.entries();
|
|
925
|
-
};
|
|
926
|
-
Map3.prototype[iteratorSymbol] = function() {
|
|
927
|
-
return this.entries();
|
|
928
|
-
};
|
|
929
|
-
Map3.prototype._find = function(key, insert) {
|
|
930
|
-
if (!SameValueZero(this._cacheKey, key)) {
|
|
931
|
-
this._cacheIndex = -1;
|
|
932
|
-
for (var i = 0; i < this._keys.length; i++) {
|
|
933
|
-
if (SameValueZero(this._keys[i], key)) {
|
|
934
|
-
this._cacheIndex = i;
|
|
935
|
-
break;
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
if (this._cacheIndex < 0 && insert) {
|
|
940
|
-
this._cacheIndex = this._keys.length;
|
|
941
|
-
this._keys.push(key);
|
|
942
|
-
this._values.push(void 0);
|
|
943
|
-
}
|
|
944
|
-
return this._cacheIndex;
|
|
945
|
-
};
|
|
946
|
-
return Map3;
|
|
947
|
-
}()
|
|
948
|
-
);
|
|
949
|
-
return Map2;
|
|
950
|
-
function getKey(key, _) {
|
|
951
|
-
return key;
|
|
952
|
-
}
|
|
953
|
-
function getValue(_, value) {
|
|
954
|
-
return value;
|
|
955
|
-
}
|
|
956
|
-
function getEntry(key, value) {
|
|
957
|
-
return [key, value];
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
function CreateSetPolyfill() {
|
|
961
|
-
var Set2 = (
|
|
962
|
-
/** @class */
|
|
963
|
-
function() {
|
|
964
|
-
function Set3() {
|
|
965
|
-
this._map = new _Map();
|
|
966
|
-
}
|
|
967
|
-
Object.defineProperty(Set3.prototype, "size", {
|
|
968
|
-
get: function() {
|
|
969
|
-
return this._map.size;
|
|
970
|
-
},
|
|
971
|
-
enumerable: true,
|
|
972
|
-
configurable: true
|
|
973
|
-
});
|
|
974
|
-
Set3.prototype.has = function(value) {
|
|
975
|
-
return this._map.has(value);
|
|
976
|
-
};
|
|
977
|
-
Set3.prototype.add = function(value) {
|
|
978
|
-
return this._map.set(value, value), this;
|
|
979
|
-
};
|
|
980
|
-
Set3.prototype.delete = function(value) {
|
|
981
|
-
return this._map.delete(value);
|
|
982
|
-
};
|
|
983
|
-
Set3.prototype.clear = function() {
|
|
984
|
-
this._map.clear();
|
|
985
|
-
};
|
|
986
|
-
Set3.prototype.keys = function() {
|
|
987
|
-
return this._map.keys();
|
|
988
|
-
};
|
|
989
|
-
Set3.prototype.values = function() {
|
|
990
|
-
return this._map.keys();
|
|
991
|
-
};
|
|
992
|
-
Set3.prototype.entries = function() {
|
|
993
|
-
return this._map.entries();
|
|
994
|
-
};
|
|
995
|
-
Set3.prototype["@@iterator"] = function() {
|
|
996
|
-
return this.keys();
|
|
997
|
-
};
|
|
998
|
-
Set3.prototype[iteratorSymbol] = function() {
|
|
999
|
-
return this.keys();
|
|
1000
|
-
};
|
|
1001
|
-
return Set3;
|
|
1002
|
-
}()
|
|
1003
|
-
);
|
|
1004
|
-
return Set2;
|
|
1005
|
-
}
|
|
1006
|
-
function CreateWeakMapPolyfill() {
|
|
1007
|
-
var UUID_SIZE = 16;
|
|
1008
|
-
var keys = HashMap.create();
|
|
1009
|
-
var rootKey = CreateUniqueKey();
|
|
1010
|
-
return (
|
|
1011
|
-
/** @class */
|
|
1012
|
-
function() {
|
|
1013
|
-
function WeakMap2() {
|
|
1014
|
-
this._key = CreateUniqueKey();
|
|
1015
|
-
}
|
|
1016
|
-
WeakMap2.prototype.has = function(target) {
|
|
1017
|
-
var table = GetOrCreateWeakMapTable(
|
|
1018
|
-
target,
|
|
1019
|
-
/*create*/
|
|
1020
|
-
false
|
|
1021
|
-
);
|
|
1022
|
-
return table !== void 0 ? HashMap.has(table, this._key) : false;
|
|
1023
|
-
};
|
|
1024
|
-
WeakMap2.prototype.get = function(target) {
|
|
1025
|
-
var table = GetOrCreateWeakMapTable(
|
|
1026
|
-
target,
|
|
1027
|
-
/*create*/
|
|
1028
|
-
false
|
|
1029
|
-
);
|
|
1030
|
-
return table !== void 0 ? HashMap.get(table, this._key) : void 0;
|
|
1031
|
-
};
|
|
1032
|
-
WeakMap2.prototype.set = function(target, value) {
|
|
1033
|
-
var table = GetOrCreateWeakMapTable(
|
|
1034
|
-
target,
|
|
1035
|
-
/*create*/
|
|
1036
|
-
true
|
|
1037
|
-
);
|
|
1038
|
-
table[this._key] = value;
|
|
1039
|
-
return this;
|
|
1040
|
-
};
|
|
1041
|
-
WeakMap2.prototype.delete = function(target) {
|
|
1042
|
-
var table = GetOrCreateWeakMapTable(
|
|
1043
|
-
target,
|
|
1044
|
-
/*create*/
|
|
1045
|
-
false
|
|
1046
|
-
);
|
|
1047
|
-
return table !== void 0 ? delete table[this._key] : false;
|
|
1048
|
-
};
|
|
1049
|
-
WeakMap2.prototype.clear = function() {
|
|
1050
|
-
this._key = CreateUniqueKey();
|
|
1051
|
-
};
|
|
1052
|
-
return WeakMap2;
|
|
1053
|
-
}()
|
|
1054
|
-
);
|
|
1055
|
-
function CreateUniqueKey() {
|
|
1056
|
-
var key;
|
|
1057
|
-
do
|
|
1058
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
1059
|
-
while (HashMap.has(keys, key));
|
|
1060
|
-
keys[key] = true;
|
|
1061
|
-
return key;
|
|
1062
|
-
}
|
|
1063
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
1064
|
-
if (!hasOwn.call(target, rootKey)) {
|
|
1065
|
-
if (!create)
|
|
1066
|
-
return void 0;
|
|
1067
|
-
Object.defineProperty(target, rootKey, { value: HashMap.create() });
|
|
1068
|
-
}
|
|
1069
|
-
return target[rootKey];
|
|
1070
|
-
}
|
|
1071
|
-
function FillRandomBytes(buffer, size) {
|
|
1072
|
-
for (var i = 0; i < size; ++i)
|
|
1073
|
-
buffer[i] = Math.random() * 255 | 0;
|
|
1074
|
-
return buffer;
|
|
1075
|
-
}
|
|
1076
|
-
function GenRandomBytes(size) {
|
|
1077
|
-
if (typeof Uint8Array === "function") {
|
|
1078
|
-
var array = new Uint8Array(size);
|
|
1079
|
-
if (typeof crypto !== "undefined") {
|
|
1080
|
-
crypto.getRandomValues(array);
|
|
1081
|
-
} else if (typeof msCrypto !== "undefined") {
|
|
1082
|
-
msCrypto.getRandomValues(array);
|
|
1083
|
-
} else {
|
|
1084
|
-
FillRandomBytes(array, size);
|
|
1085
|
-
}
|
|
1086
|
-
return array;
|
|
1087
|
-
}
|
|
1088
|
-
return FillRandomBytes(new Array(size), size);
|
|
1089
|
-
}
|
|
1090
|
-
function CreateUUID() {
|
|
1091
|
-
var data = GenRandomBytes(UUID_SIZE);
|
|
1092
|
-
data[6] = data[6] & 79 | 64;
|
|
1093
|
-
data[8] = data[8] & 191 | 128;
|
|
1094
|
-
var result = "";
|
|
1095
|
-
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
1096
|
-
var byte = data[offset];
|
|
1097
|
-
if (offset === 4 || offset === 6 || offset === 8)
|
|
1098
|
-
result += "-";
|
|
1099
|
-
if (byte < 16)
|
|
1100
|
-
result += "0";
|
|
1101
|
-
result += byte.toString(16).toLowerCase();
|
|
1102
|
-
}
|
|
1103
|
-
return result;
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
function MakeDictionary(obj) {
|
|
1107
|
-
obj.__ = void 0;
|
|
1108
|
-
delete obj.__;
|
|
1109
|
-
return obj;
|
|
1110
|
-
}
|
|
1111
|
-
});
|
|
1112
|
-
})(Reflect2 || (Reflect2 = {}));
|
|
1113
|
-
}
|
|
1114
|
-
});
|
|
1115
|
-
|
|
1116
31
|
// ../../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
1117
|
-
var
|
|
32
|
+
var require_Reflect = __commonJS({
|
|
1118
33
|
"../../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js"() {
|
|
1119
34
|
var Reflect2;
|
|
1120
35
|
(function(Reflect3) {
|
|
@@ -3708,6 +2623,14 @@ var ValidUtils;
|
|
|
3708
2623
|
const isConstructorLike = (fn) => {
|
|
3709
2624
|
return typeof fn === "function" && typeof fn.prototype !== "undefined";
|
|
3710
2625
|
};
|
|
2626
|
+
ValidUtils22.isUrl = (str) => {
|
|
2627
|
+
try {
|
|
2628
|
+
new URL(str);
|
|
2629
|
+
return true;
|
|
2630
|
+
} catch (_) {
|
|
2631
|
+
return false;
|
|
2632
|
+
}
|
|
2633
|
+
};
|
|
3711
2634
|
ValidUtils22.isFrozen = (obj) => {
|
|
3712
2635
|
return Object.isFrozen(obj);
|
|
3713
2636
|
};
|
|
@@ -5138,57 +4061,70 @@ var ObjectUtils;
|
|
|
5138
4061
|
if (Path2.isFunctionScript(path) || Path2.isArrowFunctionScript(path)) {
|
|
5139
4062
|
return path;
|
|
5140
4063
|
}
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
4064
|
+
const nullishCoalescingPlaceholder = "__NULLISH_COALESCING__";
|
|
4065
|
+
const hasNullishCoalescing = path.includes("??");
|
|
4066
|
+
let tempPath = path;
|
|
4067
|
+
if (hasNullishCoalescing) {
|
|
4068
|
+
tempPath = tempPath.replace(/\?\?/g, nullishCoalescingPlaceholder);
|
|
4069
|
+
}
|
|
4070
|
+
const ternaryMatch = tempPath.match(/\?\s+[^:]*:/);
|
|
4071
|
+
if (ternaryMatch) {
|
|
4072
|
+
const questionMarkIndex = tempPath.indexOf("?");
|
|
4073
|
+
const colonIndex = tempPath.indexOf(":", questionMarkIndex);
|
|
4074
|
+
if (questionMarkIndex !== -1 && colonIndex !== -1) {
|
|
4075
|
+
const charAfterQuestion = tempPath.charAt(questionMarkIndex + 1);
|
|
4076
|
+
if (charAfterQuestion === " " || charAfterQuestion === " " || charAfterQuestion === "\n") {
|
|
4077
|
+
const condition = tempPath.substring(0, questionMarkIndex).trim();
|
|
4078
|
+
const trueBranch = tempPath.substring(questionMarkIndex + 1, colonIndex).trim();
|
|
4079
|
+
const falseBranch = tempPath.substring(colonIndex + 1).trim();
|
|
4080
|
+
const processedCondition = Path2.toOptionalChainPath(condition);
|
|
4081
|
+
const processedTrueBranch = Path2.toOptionalChainPath(trueBranch);
|
|
4082
|
+
const processedFalseBranch = Path2.toOptionalChainPath(falseBranch);
|
|
4083
|
+
const finalResult = `${processedCondition} ? ${processedTrueBranch} : ${processedFalseBranch}`;
|
|
4084
|
+
return hasNullishCoalescing ? finalResult.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : finalResult;
|
|
5149
4085
|
}
|
|
5150
|
-
|
|
5151
|
-
});
|
|
5152
|
-
return result.join("");
|
|
4086
|
+
}
|
|
5153
4087
|
}
|
|
5154
|
-
if (
|
|
4088
|
+
if (tempPath.includes("(")) {
|
|
5155
4089
|
const functionCallMatches = [];
|
|
5156
|
-
let
|
|
4090
|
+
let workingPath = tempPath;
|
|
5157
4091
|
let counter = 0;
|
|
5158
4092
|
const functionCallRegex = /(\w+)\(([^()]*(?:\([^()]*\)[^()]*)*)\)/g;
|
|
5159
4093
|
let match;
|
|
5160
|
-
while ((match = functionCallRegex.exec(
|
|
4094
|
+
while ((match = functionCallRegex.exec(tempPath)) !== null) {
|
|
5161
4095
|
const fullMatch = match[0];
|
|
5162
4096
|
const funcName = match[1];
|
|
5163
4097
|
const funcArgs = match[2];
|
|
5164
4098
|
const placeholder = `__FUNC_CALL_${counter}__`;
|
|
5165
|
-
|
|
4099
|
+
let processedArgs = funcArgs ? Path2.toOptionalChainPath(funcArgs) : "";
|
|
4100
|
+
processedArgs = processedArgs.replace(/\?\.\s*$/, "");
|
|
5166
4101
|
const processedFuncCall = `${funcName}?.(${processedArgs})`;
|
|
5167
4102
|
functionCallMatches.push({
|
|
5168
4103
|
original: fullMatch,
|
|
5169
4104
|
processed: processedFuncCall,
|
|
5170
4105
|
placeholder
|
|
5171
4106
|
});
|
|
5172
|
-
|
|
4107
|
+
workingPath = workingPath.replace(fullMatch, placeholder);
|
|
5173
4108
|
counter++;
|
|
5174
4109
|
}
|
|
5175
|
-
const tokens2 =
|
|
4110
|
+
const tokens2 = workingPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
|
|
5176
4111
|
let processedPath = "";
|
|
5177
4112
|
if (tokens2 && tokens2.length > 1) {
|
|
5178
4113
|
processedPath = tokens2.join("?.");
|
|
5179
4114
|
} else {
|
|
5180
|
-
processedPath =
|
|
4115
|
+
processedPath = workingPath;
|
|
5181
4116
|
}
|
|
5182
4117
|
for (const funcMatch of functionCallMatches) {
|
|
5183
4118
|
processedPath = processedPath.replace(funcMatch.placeholder, funcMatch.processed);
|
|
5184
4119
|
}
|
|
5185
|
-
return processedPath;
|
|
4120
|
+
return hasNullishCoalescing ? processedPath.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : processedPath;
|
|
5186
4121
|
}
|
|
5187
|
-
const tokens =
|
|
4122
|
+
const tokens = tempPath.match(/[^?.[\]]+|\[[^\]]*\]/g);
|
|
5188
4123
|
if (!tokens) {
|
|
5189
|
-
return path;
|
|
4124
|
+
return hasNullishCoalescing ? path : path;
|
|
5190
4125
|
}
|
|
5191
|
-
|
|
4126
|
+
const result = tokens.join("?.");
|
|
4127
|
+
return hasNullishCoalescing ? result.replace(new RegExp(nullishCoalescingPlaceholder, "g"), "??") : result;
|
|
5192
4128
|
};
|
|
5193
4129
|
Path2.removeOptionalChainOperator = (path) => {
|
|
5194
4130
|
if (!path) {
|
|
@@ -5501,9 +4437,19 @@ var ConvertUtils;
|
|
|
5501
4437
|
ConvertUtils22.jsonToMap = (jsonStr) => {
|
|
5502
4438
|
return new Map(JSON.parse(jsonStr));
|
|
5503
4439
|
};
|
|
4440
|
+
ConvertUtils22.toUrl = (data) => {
|
|
4441
|
+
try {
|
|
4442
|
+
return new URL(data);
|
|
4443
|
+
} catch (e) {
|
|
4444
|
+
throw new Error(`Invalid URL string: ${data}`);
|
|
4445
|
+
}
|
|
4446
|
+
};
|
|
5504
4447
|
ConvertUtils22.decodeURIString = (data) => {
|
|
5505
4448
|
return decodeURIComponent(data);
|
|
5506
4449
|
};
|
|
4450
|
+
ConvertUtils22.encodeURIString = (data) => {
|
|
4451
|
+
return encodeURIComponent(data);
|
|
4452
|
+
};
|
|
5507
4453
|
ConvertUtils22.objToStrMap = (obj) => {
|
|
5508
4454
|
const strMap = /* @__PURE__ */ new Map();
|
|
5509
4455
|
for (const k of Object.keys(obj)) {
|
|
@@ -5871,6 +4817,29 @@ var ConvertUtils;
|
|
|
5871
4817
|
ConvertUtils22.stringJsonToKeyPairs = (stringJson) => {
|
|
5872
4818
|
return Array.from(stringJson.matchAll(/(\w+):\s*([^,}]+)/g)).map((match) => ({ key: match[1], value: match[2] }));
|
|
5873
4819
|
};
|
|
4820
|
+
ConvertUtils22.stringToBase64 = (str) => {
|
|
4821
|
+
return btoa(str);
|
|
4822
|
+
};
|
|
4823
|
+
ConvertUtils22.uint8ArrayToBase64 = (bytes) => {
|
|
4824
|
+
let binary = "";
|
|
4825
|
+
const len = bytes.byteLength;
|
|
4826
|
+
for (let i = 0; i < len; i++) {
|
|
4827
|
+
binary += String.fromCharCode(bytes[i]);
|
|
4828
|
+
}
|
|
4829
|
+
return btoa(binary);
|
|
4830
|
+
};
|
|
4831
|
+
ConvertUtils22.base64ToString = (base64) => {
|
|
4832
|
+
return atob(base64);
|
|
4833
|
+
};
|
|
4834
|
+
ConvertUtils22.base64ToUint8Array = (base64) => {
|
|
4835
|
+
const binaryString = atob(base64);
|
|
4836
|
+
const len = binaryString.length;
|
|
4837
|
+
const bytes = new Uint8Array(len);
|
|
4838
|
+
for (let i = 0; i < len; i++) {
|
|
4839
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
4840
|
+
}
|
|
4841
|
+
return bytes;
|
|
4842
|
+
};
|
|
5874
4843
|
})(ConvertUtils || (ConvertUtils = {}));
|
|
5875
4844
|
|
|
5876
4845
|
// ../core/dist/esm/date/DateUtils.js
|
|
@@ -7816,6 +6785,29 @@ var Promises;
|
|
|
7816
6785
|
await Promise.all(executing);
|
|
7817
6786
|
return results;
|
|
7818
6787
|
};
|
|
6788
|
+
Promises2.retry = async (factory, config) => {
|
|
6789
|
+
const initialDelay = config.delay?.initialDelay ?? 0;
|
|
6790
|
+
const retryDelay = config.delay?.retryDelay ?? 0;
|
|
6791
|
+
if (initialDelay > 0) {
|
|
6792
|
+
await (0, Promises2.sleep)(initialDelay);
|
|
6793
|
+
}
|
|
6794
|
+
let lastError;
|
|
6795
|
+
for (let attempt = 0; attempt <= config.retry; attempt++) {
|
|
6796
|
+
try {
|
|
6797
|
+
return await factory(attempt, lastError);
|
|
6798
|
+
} catch (error) {
|
|
6799
|
+
lastError = error;
|
|
6800
|
+
if (attempt === config.retry) {
|
|
6801
|
+
break;
|
|
6802
|
+
}
|
|
6803
|
+
config.onRetry?.(error, attempt + 1);
|
|
6804
|
+
if (retryDelay > 0) {
|
|
6805
|
+
await (0, Promises2.sleep)(retryDelay);
|
|
6806
|
+
}
|
|
6807
|
+
}
|
|
6808
|
+
}
|
|
6809
|
+
throw lastError;
|
|
6810
|
+
};
|
|
7819
6811
|
let Result;
|
|
7820
6812
|
((Result2) => {
|
|
7821
6813
|
async function awaitWrap(promise) {
|
|
@@ -8110,7 +7102,7 @@ var Logger = class {
|
|
|
8110
7102
|
// }
|
|
8111
7103
|
};
|
|
8112
7104
|
|
|
8113
|
-
// ../core/dist/esm/message/Subscriber
|
|
7105
|
+
// ../core/dist/esm/message/Subscriber.js
|
|
8114
7106
|
var Subscriber = class {
|
|
8115
7107
|
constructor(destination) {
|
|
8116
7108
|
this.destination = destination;
|
|
@@ -9439,7 +8431,7 @@ var StoreRunnableLoader = class extends RunnableLoader {
|
|
|
9439
8431
|
// ../core/dist/esm/schedule/Schedule.js
|
|
9440
8432
|
var Schedule;
|
|
9441
8433
|
((Schedule2) => {
|
|
9442
|
-
Schedule2.
|
|
8434
|
+
Schedule2.SYMBOL = Symbol("Schedule");
|
|
9443
8435
|
})(Schedule || (Schedule = {}));
|
|
9444
8436
|
var ScheduleBase = class {
|
|
9445
8437
|
constructor() {
|
|
@@ -9466,27 +8458,28 @@ var ScheduleBase = class {
|
|
|
9466
8458
|
get isReady() {
|
|
9467
8459
|
return !(this._state === "RUNNING");
|
|
9468
8460
|
}
|
|
9469
|
-
addStart(
|
|
8461
|
+
addStart(input, date = /* @__PURE__ */ new Date()) {
|
|
9470
8462
|
this._history ?? (this._history = []);
|
|
9471
|
-
this._history.push({ state: "RUNNING", date,
|
|
8463
|
+
this._history.push({ state: "RUNNING", date, input });
|
|
9472
8464
|
}
|
|
9473
|
-
addError(
|
|
8465
|
+
addError(input, date = /* @__PURE__ */ new Date()) {
|
|
9474
8466
|
this._history ?? (this._history = []);
|
|
9475
|
-
this._history.push({ state: "ERROR", date,
|
|
8467
|
+
this._history.push({ state: "ERROR", date, input });
|
|
9476
8468
|
}
|
|
9477
|
-
addSuccess(
|
|
8469
|
+
addSuccess(input, result = void 0, date = /* @__PURE__ */ new Date()) {
|
|
9478
8470
|
this._history ?? (this._history = []);
|
|
9479
|
-
this._history.push({ state: "SUCCESS", date,
|
|
8471
|
+
this._history.push({ state: "SUCCESS", date, input, result });
|
|
9480
8472
|
}
|
|
9481
8473
|
async run(data) {
|
|
9482
8474
|
this._state = "RUNNING";
|
|
9483
8475
|
this.addStart();
|
|
9484
8476
|
const startDate = /* @__PURE__ */ new Date();
|
|
8477
|
+
let result;
|
|
9485
8478
|
try {
|
|
9486
8479
|
console.log("Running schedule", this.name, startDate);
|
|
9487
|
-
await this.execute(data);
|
|
8480
|
+
result = await this.execute(data);
|
|
9488
8481
|
this._successCount++;
|
|
9489
|
-
this.addSuccess();
|
|
8482
|
+
this.addSuccess(data, result);
|
|
9490
8483
|
} catch (e) {
|
|
9491
8484
|
this.addError(e);
|
|
9492
8485
|
this._errorCount++;
|
|
@@ -9498,6 +8491,7 @@ var ScheduleBase = class {
|
|
|
9498
8491
|
console.log("Done schedule", this.name, endDate, endDate.getTime() - startDate.getTime());
|
|
9499
8492
|
}
|
|
9500
8493
|
this._state = "DONE-AND-WAITING";
|
|
8494
|
+
return result;
|
|
9501
8495
|
}
|
|
9502
8496
|
};
|
|
9503
8497
|
|
|
@@ -9588,7 +8582,7 @@ var StorageUtils = class _StorageUtils {
|
|
|
9588
8582
|
|
|
9589
8583
|
// ../core/dist/esm/string/StringUtils.js
|
|
9590
8584
|
var StringUtils;
|
|
9591
|
-
(
|
|
8585
|
+
((StringUtils2) => {
|
|
9592
8586
|
StringUtils2.deleteEnter = (data) => {
|
|
9593
8587
|
return data.replace(/\r?\n/g, "");
|
|
9594
8588
|
};
|
|
@@ -9631,8 +8625,7 @@ var StringUtils;
|
|
|
9631
8625
|
return s;
|
|
9632
8626
|
};
|
|
9633
8627
|
StringUtils2.unescape = (html) => {
|
|
9634
|
-
if (!html)
|
|
9635
|
-
return "";
|
|
8628
|
+
if (!html) return "";
|
|
9636
8629
|
const htmlEntity = {
|
|
9637
8630
|
quot: '"',
|
|
9638
8631
|
amp: "&",
|
|
@@ -9682,8 +8675,7 @@ var StringUtils;
|
|
|
9682
8675
|
return formatString.replace(/\${([^{}]*)}/g, (matched, piece) => String(object[piece] ?? matched));
|
|
9683
8676
|
};
|
|
9684
8677
|
StringUtils2.ellipsis = (text, length) => {
|
|
9685
|
-
if (text.length > length)
|
|
9686
|
-
return `${text.slice(0, length)}...`;
|
|
8678
|
+
if (text.length > length) return `${text.slice(0, length)}...`;
|
|
9687
8679
|
return text;
|
|
9688
8680
|
};
|
|
9689
8681
|
StringUtils2.appendPostposition = (text, { vowel, consonant }) => {
|
|
@@ -9796,7 +8788,7 @@ __export(bundle_entry_exports2, {
|
|
|
9796
8788
|
ValidUtils: () => ValidUtils2,
|
|
9797
8789
|
WindowUtils: () => WindowUtils
|
|
9798
8790
|
});
|
|
9799
|
-
var import_reflect_metadata = __toESM(
|
|
8791
|
+
var import_reflect_metadata = __toESM(require_Reflect(), 1);
|
|
9800
8792
|
|
|
9801
8793
|
// ../core/dist/esm/message/AutoCloseSubscription.js
|
|
9802
8794
|
var AutoCloseSubscription = class {
|
|
@@ -10102,13 +9094,14 @@ var DownloadUtils;
|
|
|
10102
9094
|
((DownloadUtils2) => {
|
|
10103
9095
|
DownloadUtils2.download = (window2, url, filename = "download") => {
|
|
10104
9096
|
const a = window2.document.createElement("a");
|
|
10105
|
-
|
|
9097
|
+
const targetUrl = typeof url === "string" ? url : URL.createObjectURL(url);
|
|
9098
|
+
a.href = targetUrl;
|
|
10106
9099
|
a.download = filename;
|
|
10107
9100
|
a.style.display = "none";
|
|
10108
9101
|
window2.document.body.appendChild(a);
|
|
10109
9102
|
a.click();
|
|
10110
9103
|
window2.document.body.removeChild(a);
|
|
10111
|
-
URL.revokeObjectURL(
|
|
9104
|
+
URL.revokeObjectURL(targetUrl);
|
|
10112
9105
|
};
|
|
10113
9106
|
DownloadUtils2.csvDownload = (window2, datas, config) => {
|
|
10114
9107
|
const csv = datas.map((row) => {
|
|
@@ -10345,38 +9338,43 @@ var EventUtils;
|
|
|
10345
9338
|
})(EventUtils || (EventUtils = {}));
|
|
10346
9339
|
|
|
10347
9340
|
// ../core-web/dist/esm/location/LocationUtils.js
|
|
10348
|
-
var LocationUtils
|
|
10349
|
-
|
|
9341
|
+
var LocationUtils;
|
|
9342
|
+
((LocationUtils2) => {
|
|
9343
|
+
LocationUtils2.hash = (window2) => {
|
|
10350
9344
|
return window2.location.hash.replace("#", "");
|
|
10351
|
-
}
|
|
10352
|
-
|
|
9345
|
+
};
|
|
9346
|
+
LocationUtils2.hashPath = (window2) => {
|
|
10353
9347
|
return window2.location.hash.replace("#", "").split("?")[0];
|
|
10354
|
-
}
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
9348
|
+
};
|
|
9349
|
+
LocationUtils2.hashSearch = (window2) => {
|
|
9350
|
+
const string = window2.location.hash.replace("#", "").split("?")[1];
|
|
9351
|
+
return string ? `?${string}` : "";
|
|
9352
|
+
};
|
|
9353
|
+
LocationUtils2.hashQueryParams = (window2) => {
|
|
10359
9354
|
const s = window2.location.hash.replace("#", "").split("?")[1] || "";
|
|
10360
|
-
return
|
|
10361
|
-
}
|
|
10362
|
-
|
|
9355
|
+
return LocationUtils2.queryStringToMap(s);
|
|
9356
|
+
};
|
|
9357
|
+
LocationUtils2.path = (window2) => {
|
|
10363
9358
|
return window2.location.pathname;
|
|
10364
|
-
}
|
|
10365
|
-
|
|
10366
|
-
return
|
|
10367
|
-
}
|
|
10368
|
-
|
|
9359
|
+
};
|
|
9360
|
+
LocationUtils2.search = (window2) => {
|
|
9361
|
+
return window2.location.search || "";
|
|
9362
|
+
};
|
|
9363
|
+
LocationUtils2.pathQueryParamsObject = (window2) => {
|
|
9364
|
+
return LocationUtils2.queryStringToObject(window2.location.search.substring(1));
|
|
9365
|
+
};
|
|
9366
|
+
LocationUtils2.hashQueryParamsObject = (window2) => {
|
|
10369
9367
|
const s = window2.location.hash.split("?").pop() ?? "";
|
|
10370
9368
|
if (s.startsWith("#")) {
|
|
10371
9369
|
return {};
|
|
10372
9370
|
} else {
|
|
10373
|
-
return
|
|
9371
|
+
return LocationUtils2.queryStringToObject(s);
|
|
10374
9372
|
}
|
|
10375
|
-
}
|
|
10376
|
-
|
|
10377
|
-
return
|
|
10378
|
-
}
|
|
10379
|
-
|
|
9373
|
+
};
|
|
9374
|
+
LocationUtils2.pathQueryParams = (window2) => {
|
|
9375
|
+
return LocationUtils2.queryStringToMap(window2.location.search.substring(1));
|
|
9376
|
+
};
|
|
9377
|
+
LocationUtils2.queryStringToMap = (s) => {
|
|
10380
9378
|
const params = /* @__PURE__ */ new Map();
|
|
10381
9379
|
const vars = s.split("&") || [];
|
|
10382
9380
|
vars.forEach((it) => {
|
|
@@ -10386,8 +9384,8 @@ var LocationUtils = class {
|
|
|
10386
9384
|
}
|
|
10387
9385
|
});
|
|
10388
9386
|
return params;
|
|
10389
|
-
}
|
|
10390
|
-
|
|
9387
|
+
};
|
|
9388
|
+
LocationUtils2.queryStringToObject = (s) => {
|
|
10391
9389
|
const params = {};
|
|
10392
9390
|
const vars = s.split("&") || [];
|
|
10393
9391
|
vars.forEach((it) => {
|
|
@@ -10397,8 +9395,8 @@ var LocationUtils = class {
|
|
|
10397
9395
|
}
|
|
10398
9396
|
});
|
|
10399
9397
|
return params;
|
|
10400
|
-
}
|
|
10401
|
-
};
|
|
9398
|
+
};
|
|
9399
|
+
})(LocationUtils || (LocationUtils = {}));
|
|
10402
9400
|
|
|
10403
9401
|
// ../core-web/dist/esm/node/NodeUtils.js
|
|
10404
9402
|
var NodeUtils;
|
|
@@ -10421,7 +9419,7 @@ var NodeUtils;
|
|
|
10421
9419
|
NodeUtils2.replaceNode = (targetNode, newNode) => {
|
|
10422
9420
|
return targetNode.parentNode?.replaceChild(newNode, targetNode);
|
|
10423
9421
|
};
|
|
10424
|
-
NodeUtils2.
|
|
9422
|
+
NodeUtils2.insertAfter = (targetNode, newNode) => {
|
|
10425
9423
|
return targetNode.parentNode?.insertBefore(newNode, targetNode.nextSibling);
|
|
10426
9424
|
};
|
|
10427
9425
|
NodeUtils2.cloneNode = (element, deep) => {
|
|
@@ -11018,11 +10016,11 @@ var _EventManager = class _EventManager {
|
|
|
11018
10016
|
findAttrElements(fragment, config) {
|
|
11019
10017
|
const elements = /* @__PURE__ */ new Set();
|
|
11020
10018
|
const addAttributes = config?.applyEvents?.map((it) => it.attrName) ?? [];
|
|
11021
|
-
addAttributes.concat([..._EventManager.attrNames]).
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
}
|
|
10019
|
+
const attrs = addAttributes.concat([..._EventManager.attrNames]).filter(Boolean);
|
|
10020
|
+
if (attrs.length) {
|
|
10021
|
+
const selector = attrs.map((a) => `[${a}]`).join(",");
|
|
10022
|
+
fragment?.querySelectorAll(selector).forEach((it) => elements.add(it));
|
|
10023
|
+
}
|
|
11026
10024
|
return elements;
|
|
11027
10025
|
}
|
|
11028
10026
|
applyEvent(obj, childNodes, config) {
|
|
@@ -11034,7 +10032,7 @@ var _EventManager = class _EventManager {
|
|
|
11034
10032
|
this.procAttr(childNodes, _EventManager.valueAttrName, (it, attribute2) => {
|
|
11035
10033
|
const script = attribute2;
|
|
11036
10034
|
if (script) {
|
|
11037
|
-
const data =
|
|
10035
|
+
const data = ObjectUtils.Script.evaluateReturn(script, obj);
|
|
11038
10036
|
if (it.value !== data) {
|
|
11039
10037
|
it.value = data;
|
|
11040
10038
|
}
|
|
@@ -11043,7 +10041,7 @@ var _EventManager = class _EventManager {
|
|
|
11043
10041
|
this.procAttr(childNodes, _EventManager.checkedAttrName, (it, attribute2) => {
|
|
11044
10042
|
const script = attribute2;
|
|
11045
10043
|
if (script) {
|
|
11046
|
-
const data =
|
|
10044
|
+
const data = ObjectUtils.Script.evaluateReturn(script, obj);
|
|
11047
10045
|
if (it.checked !== data) {
|
|
11048
10046
|
it.checked = data;
|
|
11049
10047
|
}
|
|
@@ -11052,7 +10050,7 @@ var _EventManager = class _EventManager {
|
|
|
11052
10050
|
this.procAttr(childNodes, _EventManager.selectedAttrName, (it, attribute2) => {
|
|
11053
10051
|
const script = attribute2;
|
|
11054
10052
|
if (script) {
|
|
11055
|
-
const data =
|
|
10053
|
+
const data = ObjectUtils.Script.evaluateReturn(script, obj);
|
|
11056
10054
|
if (it.selected !== data) {
|
|
11057
10055
|
it.selected = data;
|
|
11058
10056
|
}
|
|
@@ -11061,7 +10059,7 @@ var _EventManager = class _EventManager {
|
|
|
11061
10059
|
this.procAttr(childNodes, _EventManager.readonlyAttrName, (it, attribute2) => {
|
|
11062
10060
|
const script = attribute2;
|
|
11063
10061
|
if (script) {
|
|
11064
|
-
const data =
|
|
10062
|
+
const data = ObjectUtils.Script.evaluateReturn(script, obj);
|
|
11065
10063
|
if (it.readOnly !== data) {
|
|
11066
10064
|
it.readOnly = data;
|
|
11067
10065
|
}
|
|
@@ -11070,7 +10068,7 @@ var _EventManager = class _EventManager {
|
|
|
11070
10068
|
this.procAttr(childNodes, _EventManager.disabledAttrName, (it, attribute2) => {
|
|
11071
10069
|
const script = attribute2;
|
|
11072
10070
|
if (script) {
|
|
11073
|
-
const data =
|
|
10071
|
+
const data = ObjectUtils.Script.evaluateReturn(script, obj);
|
|
11074
10072
|
if (it.disabled !== data) {
|
|
11075
10073
|
it.disabled = data;
|
|
11076
10074
|
}
|
|
@@ -11079,7 +10077,7 @@ var _EventManager = class _EventManager {
|
|
|
11079
10077
|
this.procAttr(childNodes, _EventManager.hiddenAttrName, (it, attribute2) => {
|
|
11080
10078
|
const script = attribute2;
|
|
11081
10079
|
if (script) {
|
|
11082
|
-
const data =
|
|
10080
|
+
const data = ObjectUtils.Script.evaluateReturn(script, obj);
|
|
11083
10081
|
if (it.hidden !== data) {
|
|
11084
10082
|
it.hidden = data;
|
|
11085
10083
|
}
|
|
@@ -11088,7 +10086,7 @@ var _EventManager = class _EventManager {
|
|
|
11088
10086
|
this.procAttr(childNodes, _EventManager.requiredAttrName, (it, attribute2) => {
|
|
11089
10087
|
const script = attribute2;
|
|
11090
10088
|
if (script) {
|
|
11091
|
-
const data =
|
|
10089
|
+
const data = ObjectUtils.Script.evaluateReturn(script, obj);
|
|
11092
10090
|
if (it.required !== data) {
|
|
11093
10091
|
it.required = data;
|
|
11094
10092
|
}
|
|
@@ -11097,7 +10095,7 @@ var _EventManager = class _EventManager {
|
|
|
11097
10095
|
this.procAttr(childNodes, _EventManager.openAttrName, (it, attribute2) => {
|
|
11098
10096
|
const script = attribute2;
|
|
11099
10097
|
if (script) {
|
|
11100
|
-
const data =
|
|
10098
|
+
const data = ObjectUtils.Script.evaluateReturn(script, obj);
|
|
11101
10099
|
if (it.open !== data) {
|
|
11102
10100
|
it.open = data;
|
|
11103
10101
|
}
|
|
@@ -11108,17 +10106,27 @@ var _EventManager = class _EventManager {
|
|
|
11108
10106
|
map2.forEach((v, k) => {
|
|
11109
10107
|
const variablePaths = v.variablePaths;
|
|
11110
10108
|
let targetScript = v.originalAttrValue;
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
10109
|
+
let script;
|
|
10110
|
+
if (v.isStringTemplate) {
|
|
10111
|
+
variablePaths.forEach((it2) => {
|
|
10112
|
+
let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
|
|
10113
|
+
targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
|
|
10114
|
+
});
|
|
10115
|
+
script = "`" + targetScript + "`";
|
|
10116
|
+
} else {
|
|
10117
|
+
variablePaths.forEach((it2) => {
|
|
10118
|
+
let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
|
|
10119
|
+
targetScript = targetScript.replaceAll(it2.origin, `${r}`);
|
|
10120
|
+
});
|
|
10121
|
+
script = targetScript;
|
|
10122
|
+
}
|
|
10123
|
+
const data = ObjectUtils.Script.evaluate(`const $element = this.element; return ${script}`, Object.assign(obj, {
|
|
11116
10124
|
__render: Object.freeze({
|
|
11117
10125
|
element: it,
|
|
11118
10126
|
attribute: ElementUtils.getAttributeToObject(it)
|
|
11119
10127
|
})
|
|
11120
10128
|
}));
|
|
11121
|
-
if (data === null) {
|
|
10129
|
+
if (data === null || data === void 0) {
|
|
11122
10130
|
it.removeAttribute(k);
|
|
11123
10131
|
} else {
|
|
11124
10132
|
it.setAttribute(k, data);
|
|
@@ -11137,19 +10145,19 @@ var _EventManager = class _EventManager {
|
|
|
11137
10145
|
const mapScript = it.getAttribute(`${linkInfo.name}:map`);
|
|
11138
10146
|
let bindObj = obj;
|
|
11139
10147
|
if (ownerVariablePathName) {
|
|
11140
|
-
bindObj =
|
|
10148
|
+
bindObj = ObjectUtils.Script.evaluateReturn(ownerVariablePathName, obj);
|
|
11141
10149
|
}
|
|
11142
10150
|
const getValue = this.getValue(obj, varName, bindObj);
|
|
11143
10151
|
if (typeof getValue === "function" && getValue) {
|
|
11144
10152
|
let setValue = it[linkInfo.property];
|
|
11145
10153
|
if (mapScript) {
|
|
11146
|
-
setValue =
|
|
10154
|
+
setValue = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range2.range, value: setValue, scripts: _EventManager.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
|
|
11147
10155
|
}
|
|
11148
10156
|
getValue(setValue);
|
|
11149
10157
|
} else if (getValue) {
|
|
11150
10158
|
let setValue = getValue;
|
|
11151
10159
|
if (mapScript) {
|
|
11152
|
-
setValue =
|
|
10160
|
+
setValue = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${mapScript}`, Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range2.range, value: setValue, scripts: _EventManager.setBindProperty(config?.scripts, obj), ...config?.eventVariables }) }));
|
|
11153
10161
|
}
|
|
11154
10162
|
if (setValue === null) {
|
|
11155
10163
|
it.removeAttribute(linkInfo.property);
|
|
@@ -11172,10 +10180,10 @@ var _EventManager = class _EventManager {
|
|
|
11172
10180
|
const filterScript = element.getAttribute(`${attr}:filter`);
|
|
11173
10181
|
let filter = true;
|
|
11174
10182
|
if (filterScript) {
|
|
11175
|
-
filter =
|
|
10183
|
+
filter = ObjectUtils.Script.evaluate(`${this.getBindScript(config)} return ${filterScript}`, context) ?? false;
|
|
11176
10184
|
}
|
|
11177
10185
|
if (filter) {
|
|
11178
|
-
|
|
10186
|
+
ObjectUtils.Script.evaluate(`${this.getBindScript(config)} ${script}`, context);
|
|
11179
10187
|
}
|
|
11180
10188
|
};
|
|
11181
10189
|
element.addEventListener(eventName, handler);
|
|
@@ -11187,7 +10195,7 @@ var _EventManager = class _EventManager {
|
|
|
11187
10195
|
script = "return " + script;
|
|
11188
10196
|
}
|
|
11189
10197
|
if (script) {
|
|
11190
|
-
|
|
10198
|
+
ObjectUtils.Script.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
|
|
11191
10199
|
__render: Object.freeze({
|
|
11192
10200
|
element: it,
|
|
11193
10201
|
attribute: ElementUtils.getAttributeToObject(it),
|
|
@@ -11213,7 +10221,7 @@ var _EventManager = class _EventManager {
|
|
|
11213
10221
|
script = "return " + script;
|
|
11214
10222
|
}
|
|
11215
10223
|
if (script) {
|
|
11216
|
-
|
|
10224
|
+
ObjectUtils.Script.evaluate(`${this.getBindScript(config)}; ${script} `, Object.assign(obj, {
|
|
11217
10225
|
__render: Object.freeze({
|
|
11218
10226
|
element: it,
|
|
11219
10227
|
attribute: ElementUtils.getAttributeToObject(it),
|
|
@@ -11230,21 +10238,29 @@ var _EventManager = class _EventManager {
|
|
|
11230
10238
|
script = "return " + script;
|
|
11231
10239
|
}
|
|
11232
10240
|
if (_EventManager.isUsingThisVar(script, varName) || varName === void 0) {
|
|
11233
|
-
const data =
|
|
10241
|
+
const data = ObjectUtils.Script.evaluate(`const $element = this.__render.element; ${script} `, Object.assign(obj, {
|
|
11234
10242
|
__render: Object.freeze({
|
|
11235
10243
|
element: it,
|
|
11236
10244
|
attribute: ElementUtils.getAttributeToObject(it)
|
|
11237
10245
|
})
|
|
11238
10246
|
}));
|
|
11239
10247
|
if (typeof data === "string") {
|
|
11240
|
-
|
|
10248
|
+
data.split(";").forEach((sit) => {
|
|
10249
|
+
const [key, value] = sit.split(":").map((s) => s.trim());
|
|
10250
|
+
if (key && value) {
|
|
10251
|
+
it.style[key] = value;
|
|
10252
|
+
}
|
|
10253
|
+
});
|
|
11241
10254
|
} else if (Array.isArray(data)) {
|
|
11242
|
-
|
|
10255
|
+
data.forEach((sit) => {
|
|
10256
|
+
const [key, value] = sit.split(":").map((s) => s.trim());
|
|
10257
|
+
if (key && value) {
|
|
10258
|
+
it.style[key] = value;
|
|
10259
|
+
}
|
|
10260
|
+
});
|
|
11243
10261
|
} else {
|
|
11244
10262
|
for (const [key, value] of Object.entries(data)) {
|
|
11245
|
-
|
|
11246
|
-
it.style[key] = String(value);
|
|
11247
|
-
}
|
|
10263
|
+
it.style[key] = value === null ? null : String(value);
|
|
11248
10264
|
}
|
|
11249
10265
|
}
|
|
11250
10266
|
}
|
|
@@ -11255,29 +10271,77 @@ var _EventManager = class _EventManager {
|
|
|
11255
10271
|
script = "return " + script;
|
|
11256
10272
|
}
|
|
11257
10273
|
if (_EventManager.isUsingThisVar(script, varName) || varName === void 0) {
|
|
11258
|
-
const data =
|
|
10274
|
+
const data = ObjectUtils.Script.evaluate(`const $element = this.element; ${script} `, Object.assign(obj, {
|
|
11259
10275
|
__render: Object.freeze({
|
|
11260
10276
|
element: it,
|
|
11261
10277
|
attribute: ElementUtils.getAttributeToObject(it)
|
|
11262
10278
|
})
|
|
11263
10279
|
}));
|
|
11264
10280
|
if (typeof data === "string") {
|
|
11265
|
-
|
|
10281
|
+
data.split(" ").forEach((cit) => it.classList.add(cit.trim()));
|
|
11266
10282
|
} else if (Array.isArray(data)) {
|
|
11267
|
-
|
|
10283
|
+
data.forEach((cit) => it.classList.add(cit.trim()));
|
|
11268
10284
|
} else {
|
|
11269
10285
|
for (const [key, value] of Object.entries(data)) {
|
|
11270
10286
|
if (it instanceof HTMLElement) {
|
|
11271
10287
|
if (value) {
|
|
11272
|
-
it.classList.add(key);
|
|
10288
|
+
it.classList.add(key.trim());
|
|
11273
10289
|
} else {
|
|
11274
|
-
it.classList.remove(key);
|
|
10290
|
+
it.classList.remove(key.trim());
|
|
11275
10291
|
}
|
|
11276
10292
|
}
|
|
11277
10293
|
}
|
|
11278
10294
|
}
|
|
11279
10295
|
}
|
|
11280
10296
|
});
|
|
10297
|
+
this.procAttr(elements, _EventManager.valueAttrName, (it, attribute2) => {
|
|
10298
|
+
if (_EventManager.isUsingThisVar(attribute2, varName) || varName === void 0) {
|
|
10299
|
+
const data = ObjectUtils.Script.evaluateReturn(attribute2, obj);
|
|
10300
|
+
if (it.value !== data) it.value = data;
|
|
10301
|
+
}
|
|
10302
|
+
});
|
|
10303
|
+
this.procAttr(elements, _EventManager.checkedAttrName, (it, attribute2) => {
|
|
10304
|
+
if (_EventManager.isUsingThisVar(attribute2, varName) || varName === void 0) {
|
|
10305
|
+
const data = ObjectUtils.Script.evaluateReturn(attribute2, obj);
|
|
10306
|
+
if (it.checked !== data) it.checked = data;
|
|
10307
|
+
}
|
|
10308
|
+
});
|
|
10309
|
+
this.procAttr(elements, _EventManager.selectedAttrName, (it, attribute2) => {
|
|
10310
|
+
if (_EventManager.isUsingThisVar(attribute2, varName) || varName === void 0) {
|
|
10311
|
+
const data = ObjectUtils.Script.evaluateReturn(attribute2, obj);
|
|
10312
|
+
if (it.selected !== data) it.selected = data;
|
|
10313
|
+
}
|
|
10314
|
+
});
|
|
10315
|
+
this.procAttr(elements, _EventManager.readonlyAttrName, (it, attribute2) => {
|
|
10316
|
+
if (_EventManager.isUsingThisVar(attribute2, varName) || varName === void 0) {
|
|
10317
|
+
const data = ObjectUtils.Script.evaluateReturn(attribute2, obj);
|
|
10318
|
+
if (it.readOnly !== data) it.readOnly = data;
|
|
10319
|
+
}
|
|
10320
|
+
});
|
|
10321
|
+
this.procAttr(elements, _EventManager.disabledAttrName, (it, attribute2) => {
|
|
10322
|
+
if (_EventManager.isUsingThisVar(attribute2, varName) || varName === void 0) {
|
|
10323
|
+
const data = ObjectUtils.Script.evaluateReturn(attribute2, obj);
|
|
10324
|
+
if (it.disabled !== data) it.disabled = data;
|
|
10325
|
+
}
|
|
10326
|
+
});
|
|
10327
|
+
this.procAttr(elements, _EventManager.hiddenAttrName, (it, attribute2) => {
|
|
10328
|
+
if (_EventManager.isUsingThisVar(attribute2, varName) || varName === void 0) {
|
|
10329
|
+
const data = ObjectUtils.Script.evaluateReturn(attribute2, obj);
|
|
10330
|
+
if (it.hidden !== data) it.hidden = data;
|
|
10331
|
+
}
|
|
10332
|
+
});
|
|
10333
|
+
this.procAttr(elements, _EventManager.requiredAttrName, (it, attribute2) => {
|
|
10334
|
+
if (_EventManager.isUsingThisVar(attribute2, varName) || varName === void 0) {
|
|
10335
|
+
const data = ObjectUtils.Script.evaluateReturn(attribute2, obj);
|
|
10336
|
+
if (it.required !== data) it.required = data;
|
|
10337
|
+
}
|
|
10338
|
+
});
|
|
10339
|
+
this.procAttr(elements, _EventManager.openAttrName, (it, attribute2) => {
|
|
10340
|
+
if (_EventManager.isUsingThisVar(attribute2, varName) || varName === void 0) {
|
|
10341
|
+
const data = ObjectUtils.Script.evaluateReturn(attribute2, obj);
|
|
10342
|
+
if (it.open !== data) it.open = data;
|
|
10343
|
+
}
|
|
10344
|
+
});
|
|
11281
10345
|
}
|
|
11282
10346
|
procAttr(elements = /* @__PURE__ */ new Set(), attrName, callBack) {
|
|
11283
10347
|
const sets = /* @__PURE__ */ new Set();
|
|
@@ -11495,7 +10559,7 @@ var Dr = class extends OperatorExecuterAttrRequire {
|
|
|
11495
10559
|
const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
|
|
11496
10560
|
const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
|
|
11497
10561
|
const newTemp = this.source.config.window.document.createElement("temp");
|
|
11498
|
-
|
|
10562
|
+
ObjectUtils.Script.evaluate(`
|
|
11499
10563
|
${this.render.bindScript}
|
|
11500
10564
|
const n = $element.cloneNode(true);
|
|
11501
10565
|
var destIt = ${this.elementSource.attrs.drItOption};
|
|
@@ -11653,7 +10717,7 @@ var isOnDrThisBind = (obj) => {
|
|
|
11653
10717
|
var DrThis = class extends OperatorExecuterAttrRequire {
|
|
11654
10718
|
async executeAttrRequire(attr) {
|
|
11655
10719
|
const optionIf = this.elementSource.attrs.drDetectIfOption ?? this.elementSource.attrs.drIfOption;
|
|
11656
|
-
const ok =
|
|
10720
|
+
const ok = ObjectUtils.Script.evaluate(`
|
|
11657
10721
|
${this.render.bindScript}
|
|
11658
10722
|
try {
|
|
11659
10723
|
const ok = ${this.elementSource.attrs.drThis};
|
|
@@ -11989,9 +11053,9 @@ var DrForm = class extends OperatorExecuterAttrRequire {
|
|
|
11989
11053
|
}
|
|
11990
11054
|
async executeAttrRequire(attr) {
|
|
11991
11055
|
RawSet.drFormOtherMoveAttr(this.elementSource.element, "name", "temp-name", this.source.config);
|
|
11992
|
-
const data =
|
|
11056
|
+
const data = ObjectUtils.Script.evaluateReturn(`${attr}`, this.source.obj);
|
|
11993
11057
|
const childs = Array.from(this.elementSource.element.querySelectorAll("[name]"));
|
|
11994
|
-
const fromName =
|
|
11058
|
+
const fromName = ObjectUtils.Script.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj);
|
|
11995
11059
|
const thisName = fromName ?? this.elementSource.element.getAttribute("name");
|
|
11996
11060
|
if (childs.length <= 0 && thisName) {
|
|
11997
11061
|
childs.push(this.elementSource.element);
|
|
@@ -12004,10 +11068,10 @@ var DrForm = class extends OperatorExecuterAttrRequire {
|
|
|
12004
11068
|
const eventName = it.getAttribute(`${RawSet.DR_FORM_NAME}:event`) ?? "change";
|
|
12005
11069
|
const validatorName = it.getAttribute(`${RawSet.DR_FORM_NAME}:validator`);
|
|
12006
11070
|
const attrEventName = EventManager.attrPrefix + "event-" + eventName;
|
|
12007
|
-
let varpath =
|
|
11071
|
+
let varpath = ObjectUtils.Script.evaluateReturn(this.elementSource.element.getAttribute(`${RawSet.DR_FORM_NAME}:name`) ?? "", this.source.obj) ?? it.getAttribute("name");
|
|
12008
11072
|
if (varpath != null) {
|
|
12009
11073
|
if (validatorName) {
|
|
12010
|
-
|
|
11074
|
+
ObjectUtils.Script.evaluate(
|
|
12011
11075
|
`
|
|
12012
11076
|
${this.render.bindScript}
|
|
12013
11077
|
const validator = typeof ${validatorName} ==='function' ? new ${validatorName}() : ${validatorName};
|
|
@@ -12025,7 +11089,7 @@ var DrForm = class extends OperatorExecuterAttrRequire {
|
|
|
12025
11089
|
);
|
|
12026
11090
|
}
|
|
12027
11091
|
varpath = `${attr}['${varpath}']`;
|
|
12028
|
-
const data2 =
|
|
11092
|
+
const data2 = ObjectUtils.Script.evaluateReturn(`${varpath}`, this.source.obj);
|
|
12029
11093
|
if (data2 instanceof ValidatorArray) {
|
|
12030
11094
|
it.setAttribute(attrEventName, `${varpath}.setArrayValue($target, $target.value, $event); ${it.getAttribute(attrEventName) ?? ""};`);
|
|
12031
11095
|
data2.addValidator(it.value, it);
|
|
@@ -12086,7 +11150,7 @@ var DrInnerHTML = class extends OperatorExecuterAttrRequire {
|
|
|
12086
11150
|
}
|
|
12087
11151
|
async executeAttrRequire(attr) {
|
|
12088
11152
|
const newTemp = this.source.config.window.document.createElement("temp");
|
|
12089
|
-
|
|
11153
|
+
ObjectUtils.Script.evaluate(`
|
|
12090
11154
|
${this.render.bindScript}
|
|
12091
11155
|
const n = $element.cloneNode(true);
|
|
12092
11156
|
${this.elementSource.attrs.drBeforeOption ?? ""}
|
|
@@ -12125,7 +11189,7 @@ var DrFor = class extends OperatorExecuterAttrRequire {
|
|
|
12125
11189
|
const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
|
|
12126
11190
|
const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
|
|
12127
11191
|
const newTemp = this.source.config.window.document.createElement("temp");
|
|
12128
|
-
|
|
11192
|
+
ObjectUtils.Script.evaluate(`
|
|
12129
11193
|
${this.render.bindScript}
|
|
12130
11194
|
${this.elementSource.attrs.drBeforeOption ?? ""}
|
|
12131
11195
|
for(${attr}) {
|
|
@@ -12174,6 +11238,10 @@ var DrForOf = class extends OperatorExecuterAttrRequire {
|
|
|
12174
11238
|
const variableName = this.elementSource.element.getAttribute(RawSet.DR_VARIABLE_NAME_OPTIONNAME);
|
|
12175
11239
|
const itemVariableName = this.elementSource.element.getAttribute(RawSet.DR_ITEM_VARIABLE_NAME_OPTIONNAME);
|
|
12176
11240
|
const itemIndexVariableName = this.elementSource.element.getAttribute(RawSet.DR_ITEM_INDEX_VARIABLE_NAME_OPTIONNAME);
|
|
11241
|
+
const hasVariableName = this.elementSource.element.hasAttribute(RawSet.DR_VARIABLE_NAME_OPTIONNAME);
|
|
11242
|
+
const hasItemVariableName = this.elementSource.element.hasAttribute(RawSet.DR_ITEM_VARIABLE_NAME_OPTIONNAME);
|
|
11243
|
+
const hasItemIndexVariableName = this.elementSource.element.hasAttribute(RawSet.DR_ITEM_INDEX_VARIABLE_NAME_OPTIONNAME);
|
|
11244
|
+
const t0 = performance.now();
|
|
12177
11245
|
ObjectUtils.Script.evaluate(`
|
|
12178
11246
|
${this.render.bindScript}
|
|
12179
11247
|
${this.elementSource.attrs.drBeforeOption ?? ""}
|
|
@@ -12181,6 +11249,7 @@ var DrForOf = class extends OperatorExecuterAttrRequire {
|
|
|
12181
11249
|
const forOf = ${ObjectUtils.Path.toOptionalChainPath(attr)};
|
|
12182
11250
|
const forOfStr = \`${attr}\`.trim();
|
|
12183
11251
|
// console.log('forOf---',forOf);
|
|
11252
|
+
// debugger;
|
|
12184
11253
|
if (forOf) {
|
|
12185
11254
|
for(const it of forOf) {
|
|
12186
11255
|
i++;
|
|
@@ -12199,16 +11268,39 @@ var DrForOf = class extends OperatorExecuterAttrRequire {
|
|
|
12199
11268
|
const n = this.__render.element.cloneNode(true);
|
|
12200
11269
|
Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drForOf' && k !== 'drNextOption' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));
|
|
12201
11270
|
n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIt\\#/g, destIt).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIndex\\#/g, i)))
|
|
12202
|
-
if ('${variableName}') {
|
|
11271
|
+
if (${hasVariableName} && '${variableName}') {
|
|
12203
11272
|
n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${variableName}#', forOfStr)));
|
|
12204
11273
|
}
|
|
12205
|
-
if ('${itemVariableName}') {
|
|
11274
|
+
if (${hasItemVariableName} && '${itemVariableName}') {
|
|
12206
11275
|
n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${itemVariableName}#', destIt)));
|
|
12207
11276
|
}
|
|
12208
|
-
if ('${itemIndexVariableName}') {
|
|
11277
|
+
if (${hasItemIndexVariableName} && '${itemIndexVariableName}') {
|
|
12209
11278
|
n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replaceAll('#${itemIndexVariableName}#', i)));
|
|
12210
11279
|
}
|
|
12211
11280
|
|
|
11281
|
+
const hasDrOptionAttr = n.hasAttribute('${RawSet.DR_ATTR_OPTIONNAME}');
|
|
11282
|
+
if (hasDrOptionAttr) {
|
|
11283
|
+
const drOptionAttr = n.getAttribute('${RawSet.DR_ATTR_OPTIONNAME}');
|
|
11284
|
+
const drOptionAttrResult = $scriptUtils.evaluateReturn(drOptionAttr, this);
|
|
11285
|
+
Array.from(Object.entries(drOptionAttrResult??{})).forEach(([k,v])=>{
|
|
11286
|
+
if (v === null) {
|
|
11287
|
+
n.removeAttribute(k);
|
|
11288
|
+
} else {
|
|
11289
|
+
n.setAttribute(k,v);
|
|
11290
|
+
}
|
|
11291
|
+
})
|
|
11292
|
+
|
|
11293
|
+
}
|
|
11294
|
+
const hasDrOptionIf = n.hasAttribute('${RawSet.DR_IF_OPTIONNAME}');
|
|
11295
|
+
if (hasDrOptionIf) {
|
|
11296
|
+
const drOptionIf = n.getAttribute('${RawSet.DR_IF_OPTIONNAME}');
|
|
11297
|
+
const e = $scriptUtils.evaluateReturn(drOptionIf, this);
|
|
11298
|
+
if(!e) {
|
|
11299
|
+
continue;
|
|
11300
|
+
}
|
|
11301
|
+
|
|
11302
|
+
}
|
|
11303
|
+
|
|
12212
11304
|
const drOptionAttr = n.getAttribute('${RawSet.DR_DETECT_ATTR_OPTIONNAME}');
|
|
12213
11305
|
if (drOptionAttr) {
|
|
12214
11306
|
const drOptionAttrResult = $scriptUtils.evaluateReturn(drOptionAttr, this);
|
|
@@ -12231,13 +11323,13 @@ var DrForOf = class extends OperatorExecuterAttrRequire {
|
|
|
12231
11323
|
}
|
|
12232
11324
|
|
|
12233
11325
|
n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, i);
|
|
12234
|
-
if ('${variableName}') {
|
|
11326
|
+
if (${hasVariableName} && '${variableName}') {
|
|
12235
11327
|
n.innerHTML = n.innerHTML.replaceAll('#${variableName}#', forOfStr);
|
|
12236
11328
|
}
|
|
12237
|
-
if ('${itemVariableName}') {
|
|
11329
|
+
if (${hasItemVariableName} && '${itemVariableName}') {
|
|
12238
11330
|
n.innerHTML = n.innerHTML.replaceAll('#${itemVariableName}#', destIt);
|
|
12239
11331
|
}
|
|
12240
|
-
if ('${itemIndexVariableName}') {
|
|
11332
|
+
if (${hasItemIndexVariableName} && '${itemIndexVariableName}') {
|
|
12241
11333
|
n.innerHTML = n.innerHTML.replaceAll('#${itemIndexVariableName}#', i);
|
|
12242
11334
|
}
|
|
12243
11335
|
|
|
@@ -12291,7 +11383,7 @@ var DrAppender = class extends OperatorExecuterAttrRequire {
|
|
|
12291
11383
|
const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
|
|
12292
11384
|
const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
|
|
12293
11385
|
const newTemp = this.source.config.window.document.createElement("temp");
|
|
12294
|
-
|
|
11386
|
+
ObjectUtils.Script.evaluate(`
|
|
12295
11387
|
try{
|
|
12296
11388
|
${this.render.bindScript}
|
|
12297
11389
|
${this.elementSource.attrs.drBeforeOption ?? ""}
|
|
@@ -12349,7 +11441,7 @@ var DrRepeat = class extends OperatorExecuterAttrRequire {
|
|
|
12349
11441
|
const itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
|
|
12350
11442
|
const vars = RawSet.drVarEncoding(this.elementSource.element, this.elementSource.attrs.drVarOption ?? "");
|
|
12351
11443
|
const newTemp = this.source.config.window.document.createElement("temp");
|
|
12352
|
-
|
|
11444
|
+
ObjectUtils.Script.evaluate(`
|
|
12353
11445
|
${this.render.bindScript}
|
|
12354
11446
|
${this.elementSource.attrs.drBeforeOption ?? ""}
|
|
12355
11447
|
var i = 0;
|
|
@@ -12404,9 +11496,18 @@ var DrTargetElement = class extends OperatorExecuter {
|
|
|
12404
11496
|
super(rawSet, render, returnContainer, elementSource, source, afterCallBack, false);
|
|
12405
11497
|
}
|
|
12406
11498
|
async execute() {
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
)
|
|
11499
|
+
let targetElement = void 0;
|
|
11500
|
+
let isTargetElementElement = this.elementSource.element.tagName.toLowerCase() === RawSet.DR_TARGET_ELEMENT_ELEMENTNAME.toLowerCase();
|
|
11501
|
+
if (isTargetElementElement) {
|
|
11502
|
+
const targetElementTagName = this.elementSource.element.getAttribute(`${RawSet.DR_TARGET_ELEMENT_ELEMENTNAME}:is`)?.toLowerCase();
|
|
11503
|
+
targetElement = this.source.config?.targetElements?.find(
|
|
11504
|
+
(it) => it.name.toLowerCase() === targetElementTagName
|
|
11505
|
+
);
|
|
11506
|
+
} else {
|
|
11507
|
+
targetElement = this.source.config?.targetElements?.find(
|
|
11508
|
+
(it) => it.name.toLowerCase() === this.elementSource.element.tagName.toLowerCase()
|
|
11509
|
+
);
|
|
11510
|
+
}
|
|
12410
11511
|
if (targetElement) {
|
|
12411
11512
|
if (this.rawSet.point.start instanceof this.source.config.window.HTMLMetaElement && this.rawSet.point.end instanceof this.source.config.window.HTMLMetaElement) {
|
|
12412
11513
|
this.rawSet.point.start.setAttribute("this-path", `this.__domrender_components.${this.rawSet.uuid}`);
|
|
@@ -12426,7 +11527,7 @@ var DrTargetElement = class extends OperatorExecuter {
|
|
|
12426
11527
|
this.rawSet.detect = {
|
|
12427
11528
|
action: () => {
|
|
12428
11529
|
const script = `var $component = this.__render.component; var $element = this.__render.element; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; ${detectAction} `;
|
|
12429
|
-
|
|
11530
|
+
ObjectUtils.Script.evaluate(
|
|
12430
11531
|
script,
|
|
12431
11532
|
Object.assign(this.source.obj, {
|
|
12432
11533
|
__render: this.rawSet.dataSet.render
|
|
@@ -12507,7 +11608,7 @@ var DrStripElement = class extends OperatorExecuterAttrRequire {
|
|
|
12507
11608
|
}
|
|
12508
11609
|
async executeAttrRequire(attr) {
|
|
12509
11610
|
const newTemp = this.source.config.window.document.createElement("temp");
|
|
12510
|
-
|
|
11611
|
+
ObjectUtils.Script.evaluate(`
|
|
12511
11612
|
${this.render.bindScript}
|
|
12512
11613
|
${this.elementSource.attrs.drBeforeOption ?? ""}
|
|
12513
11614
|
const n = $element.cloneNode(true);
|
|
@@ -12569,7 +11670,7 @@ var DrThisProperty = class extends OperatorExecuterAttrRequire {
|
|
|
12569
11670
|
const newTemp = this.source.config.window.document.createElement("temp");
|
|
12570
11671
|
const dictioanry = ScriptUtils.evaluateReturn(attr, this.source.obj);
|
|
12571
11672
|
const dictionaryKey = this.elementSource.attrs.drKeyOption ?? "";
|
|
12572
|
-
|
|
11673
|
+
ObjectUtils.Script.evaluate(`
|
|
12573
11674
|
${this.render.bindScript}
|
|
12574
11675
|
${this.elementSource.attrs.drBeforeOption ?? ""}
|
|
12575
11676
|
var i = 0;
|
|
@@ -12691,7 +11792,7 @@ var DrTargetElementIsElement = class extends OperatorExecuter {
|
|
|
12691
11792
|
this.rawSet.detect = {
|
|
12692
11793
|
action: () => {
|
|
12693
11794
|
const script = `var $component = this.__render.component; var $element = this.__render.element; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; ${detectAction} `;
|
|
12694
|
-
|
|
11795
|
+
ObjectUtils.Script.evaluate(script, Object.assign(this.source.obj, {
|
|
12695
11796
|
__render: this.rawSet.dataSet.render
|
|
12696
11797
|
}));
|
|
12697
11798
|
}
|
|
@@ -12815,10 +11916,49 @@ var _RawSet = class _RawSet {
|
|
|
12815
11916
|
});
|
|
12816
11917
|
return usingTriggerVariables;
|
|
12817
11918
|
}
|
|
12818
|
-
// 중요 render 처리 부분
|
|
12819
|
-
// public async render(obj: any, config: DomRenderConfig): Promise<RawSet[]> {
|
|
12820
|
-
// }
|
|
12821
11919
|
async render(obj, config) {
|
|
11920
|
+
if (this.dataSet.fragment.childNodes.length === 1 && this.dataSet.fragment.childNodes[0].nodeType === Node.TEXT_NODE) {
|
|
11921
|
+
const textContent = this.dataSet.fragment.childNodes[0].textContent;
|
|
11922
|
+
if (textContent) {
|
|
11923
|
+
const runText = _RawSet.expressionGroups(textContent)[0][1];
|
|
11924
|
+
const __render = {
|
|
11925
|
+
rawSet: this,
|
|
11926
|
+
scripts: EventManager.setBindProperty(config?.scripts, obj),
|
|
11927
|
+
router: config?.router,
|
|
11928
|
+
range: Range2.range,
|
|
11929
|
+
element: this.dataSet.fragment.childNodes[0],
|
|
11930
|
+
attribute: {},
|
|
11931
|
+
rootObject: obj,
|
|
11932
|
+
scriptUtils: ObjectUtils.Script,
|
|
11933
|
+
nearThis: this.findNearThis(obj),
|
|
11934
|
+
parentThis: this.findParentThis(obj),
|
|
11935
|
+
bindScript: ` /** render **/
|
|
11936
|
+
const ${EventManager.SCRIPTS_VARNAME} = this.__render.scripts;
|
|
11937
|
+
const ${EventManager.RAWSET_VARNAME} = this.__render.rawSet;
|
|
11938
|
+
const ${EventManager.ELEMENT_VARNAME} = this.__render.element;
|
|
11939
|
+
const ${EventManager.ATTRIBUTE_VARNAME} = this.__render.attribute;
|
|
11940
|
+
const ${EventManager.RANGE_VARNAME} = this.__render.range;
|
|
11941
|
+
const ${EventManager.ROUTER_VARNAME} = this.__render.router;
|
|
11942
|
+
const ${EventManager.NEAR_THIS_VARNAME} = this.__render.nearThis;
|
|
11943
|
+
const ${EventManager.PARENT_THIS_VARNAME} = this.__render.parentThis;
|
|
11944
|
+
const ${EventManager.SCRIPT_UTILS_VARNAME} = this.__render.scriptUtils;
|
|
11945
|
+
const ${EventManager.ROOT_OBJECT_VARNAME} = this.__render.rootObject;
|
|
11946
|
+
`
|
|
11947
|
+
};
|
|
11948
|
+
try {
|
|
11949
|
+
const newValue = ObjectUtils.Script.evaluateReturn({
|
|
11950
|
+
bodyScript: __render.bindScript,
|
|
11951
|
+
returnScript: runText
|
|
11952
|
+
}, Object.assign(obj, { __render }));
|
|
11953
|
+
const newValueStr = String(newValue);
|
|
11954
|
+
if (this.lastRenderedValue === newValueStr) {
|
|
11955
|
+
return { raws: [], executedOperators: [] };
|
|
11956
|
+
}
|
|
11957
|
+
this.lastRenderedValue = newValueStr;
|
|
11958
|
+
} catch (e) {
|
|
11959
|
+
}
|
|
11960
|
+
}
|
|
11961
|
+
}
|
|
12822
11962
|
const genNode = config.window.document.importNode(this.dataSet.fragment, true);
|
|
12823
11963
|
const raws = [];
|
|
12824
11964
|
const onAttrInitCallBacks = [];
|
|
@@ -12861,18 +12001,15 @@ var _RawSet = class _RawSet {
|
|
|
12861
12001
|
const runText = _RawSet.expressionGroups(textContent)[0][1];
|
|
12862
12002
|
let newNode;
|
|
12863
12003
|
if (textContent?.startsWith("#")) {
|
|
12864
|
-
const r = ObjectUtils.Script.
|
|
12865
|
-
|
|
12004
|
+
const r = ObjectUtils.Script.evaluateReturn(
|
|
12005
|
+
{ bodyScript: __render.bindScript, returnScript: runText },
|
|
12866
12006
|
Object.assign(obj, { __render })
|
|
12867
12007
|
);
|
|
12868
12008
|
const template = config.window.document.createElement("template");
|
|
12869
12009
|
template.innerHTML = r;
|
|
12870
12010
|
newNode = template.content;
|
|
12871
12011
|
} else {
|
|
12872
|
-
const r = ObjectUtils.Script.
|
|
12873
|
-
`${__render.bindScript} return ${runText}`,
|
|
12874
|
-
Object.assign(obj, { __render })
|
|
12875
|
-
);
|
|
12012
|
+
const r = ObjectUtils.Script.evaluateReturn({ bodyScript: __render.bindScript, returnScript: runText }, Object.assign(obj, { __render }));
|
|
12876
12013
|
newNode = config.window.document.createTextNode(r);
|
|
12877
12014
|
}
|
|
12878
12015
|
cNode.parentNode?.replaceChild(newNode, cNode);
|
|
@@ -12911,140 +12048,23 @@ var _RawSet = class _RawSet {
|
|
|
12911
12048
|
};
|
|
12912
12049
|
drAttrs.push(drAttr);
|
|
12913
12050
|
const operators = [
|
|
12914
|
-
new DrPre(
|
|
12915
|
-
|
|
12916
|
-
__render,
|
|
12917
|
-
{ raws, fag },
|
|
12918
|
-
{ element, attrName: _RawSet.DR_PRE_NAME, attr: drAttr.drPre, attrs: drAttr },
|
|
12919
|
-
{ config, obj, operatorAround: config.operatorAround?.drPre },
|
|
12920
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
12921
|
-
),
|
|
12922
|
-
new Dr(
|
|
12923
|
-
this,
|
|
12924
|
-
__render,
|
|
12925
|
-
{ raws, fag },
|
|
12926
|
-
{ element, attrName: _RawSet.DR_NAME, attr: drAttr.dr, attrs: drAttr },
|
|
12927
|
-
{ config, obj, operatorAround: config.operatorAround?.dr },
|
|
12928
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
12929
|
-
),
|
|
12051
|
+
new DrPre(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_PRE_NAME, attr: drAttr.drPre, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drPre }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12052
|
+
new Dr(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_NAME, attr: drAttr.dr, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.dr }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12930
12053
|
// new Dr(this, __render, {raws, fag}, {element, attrName: EventManager.onRenderedInitAttrName, attr: drAttr.dr, attrs: drAttr}, {config, obj, operatorAround: config.operatorAround?.dr}, {onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks}),
|
|
12931
|
-
new DrIf(
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
),
|
|
12939
|
-
new
|
|
12940
|
-
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
12946
|
-
),
|
|
12947
|
-
new DrThis(
|
|
12948
|
-
this,
|
|
12949
|
-
__render,
|
|
12950
|
-
{ raws, fag },
|
|
12951
|
-
{ element, attrName: _RawSet.DR_THIS_NAME, attr: drAttr.drThis, attrs: drAttr },
|
|
12952
|
-
{ config, obj, operatorAround: config.operatorAround?.drThis },
|
|
12953
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
12954
|
-
),
|
|
12955
|
-
new DrForm(
|
|
12956
|
-
this,
|
|
12957
|
-
__render,
|
|
12958
|
-
{ raws, fag },
|
|
12959
|
-
{ element, attrName: _RawSet.DR_FOR_NAME, attr: drAttr.drForm, attrs: drAttr },
|
|
12960
|
-
{ config, obj, operatorAround: config.operatorAround?.drForm },
|
|
12961
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
12962
|
-
),
|
|
12963
|
-
new DrInnerText(
|
|
12964
|
-
this,
|
|
12965
|
-
__render,
|
|
12966
|
-
{ raws, fag },
|
|
12967
|
-
{ element, attrName: _RawSet.DR_INNERTEXT_NAME, attr: drAttr.drInnerText, attrs: drAttr },
|
|
12968
|
-
{ config, obj, operatorAround: config.operatorAround?.drInnerText },
|
|
12969
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
12970
|
-
),
|
|
12971
|
-
new DrInnerHTML(
|
|
12972
|
-
this,
|
|
12973
|
-
__render,
|
|
12974
|
-
{ raws, fag },
|
|
12975
|
-
{ element, attrName: _RawSet.DR_INNERHTML_NAME, attr: drAttr.drInnerHTML, attrs: drAttr },
|
|
12976
|
-
{ config, obj, operatorAround: config.operatorAround?.drInnerHTML },
|
|
12977
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
12978
|
-
),
|
|
12979
|
-
new DrFor(
|
|
12980
|
-
this,
|
|
12981
|
-
__render,
|
|
12982
|
-
{ raws, fag },
|
|
12983
|
-
{ element, attrName: _RawSet.DR_FOR_NAME, attr: drAttr.drFor, attrs: drAttr },
|
|
12984
|
-
{ config, obj, operatorAround: config.operatorAround?.drFor },
|
|
12985
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
12986
|
-
),
|
|
12987
|
-
new DrForOf(
|
|
12988
|
-
this,
|
|
12989
|
-
__render,
|
|
12990
|
-
{ raws, fag },
|
|
12991
|
-
{ element, attrName: _RawSet.DR_FOR_OF_NAME, attr: drAttr.drForOf, attrs: drAttr },
|
|
12992
|
-
{ config, obj, operatorAround: config.operatorAround?.drForOf },
|
|
12993
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
12994
|
-
),
|
|
12995
|
-
new DrThisProperty(
|
|
12996
|
-
this,
|
|
12997
|
-
__render,
|
|
12998
|
-
{ raws, fag },
|
|
12999
|
-
{ element, attrName: _RawSet.DR_THIS_PROPERTY_NAME, attr: drAttr.drThisProperty, attrs: drAttr },
|
|
13000
|
-
{ config, obj, operatorAround: config.operatorAround?.drThisProperty },
|
|
13001
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
13002
|
-
),
|
|
13003
|
-
new DrAppender(
|
|
13004
|
-
this,
|
|
13005
|
-
__render,
|
|
13006
|
-
{ raws, fag },
|
|
13007
|
-
{ element, attrName: _RawSet.DR_APPENDER_NAME, attr: drAttr.drAppender, attrs: drAttr },
|
|
13008
|
-
{ config, obj, operatorAround: config.operatorAround?.drAppender },
|
|
13009
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
13010
|
-
),
|
|
13011
|
-
new DrRepeat(
|
|
13012
|
-
this,
|
|
13013
|
-
__render,
|
|
13014
|
-
{ raws, fag },
|
|
13015
|
-
{ element, attrName: _RawSet.DR_REPEAT_NAME, attr: drAttr.drRepeat, attrs: drAttr },
|
|
13016
|
-
{ config, obj, operatorAround: config.operatorAround?.drRepeat },
|
|
13017
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
13018
|
-
),
|
|
13019
|
-
new DrTargetElementIsElement(
|
|
13020
|
-
this,
|
|
13021
|
-
__render,
|
|
13022
|
-
{ raws, fag },
|
|
13023
|
-
{
|
|
13024
|
-
element,
|
|
13025
|
-
attrName: _RawSet.DR_REPLACE_TARGET_ELEMENT_IS_NAME,
|
|
13026
|
-
attr: drAttr.drReplaceTargetElementIs,
|
|
13027
|
-
attrs: drAttr
|
|
13028
|
-
},
|
|
13029
|
-
{ config, obj },
|
|
13030
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
13031
|
-
),
|
|
13032
|
-
new DrTargetElement(
|
|
13033
|
-
this,
|
|
13034
|
-
__render,
|
|
13035
|
-
{ raws, fag },
|
|
13036
|
-
{ element, attrs: drAttr },
|
|
13037
|
-
{ config, obj },
|
|
13038
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
13039
|
-
),
|
|
13040
|
-
new DrTargetAttr(
|
|
13041
|
-
this,
|
|
13042
|
-
__render,
|
|
13043
|
-
{ raws, fag },
|
|
13044
|
-
{ element, attrs: drAttr },
|
|
13045
|
-
{ config, obj },
|
|
13046
|
-
{ onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }
|
|
13047
|
-
)
|
|
12054
|
+
new DrIf(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_IF_NAME, attr: drAttr.drIf, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drIf }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12055
|
+
new DrStripElement(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_STRIP_NAME, attr: drAttr.drStripElement, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drThis }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12056
|
+
new DrThis(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_THIS_NAME, attr: drAttr.drThis, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drThis }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12057
|
+
new DrForm(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_FOR_NAME, attr: drAttr.drForm, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drForm }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12058
|
+
new DrInnerText(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_INNERTEXT_NAME, attr: drAttr.drInnerText, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drInnerText }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12059
|
+
new DrInnerHTML(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_INNERHTML_NAME, attr: drAttr.drInnerHTML, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drInnerHTML }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12060
|
+
new DrFor(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_FOR_NAME, attr: drAttr.drFor, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drFor }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12061
|
+
new DrForOf(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_FOR_OF_NAME, attr: drAttr.drForOf, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drForOf }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12062
|
+
new DrThisProperty(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_THIS_PROPERTY_NAME, attr: drAttr.drThisProperty, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drThisProperty }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12063
|
+
new DrAppender(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_APPENDER_NAME, attr: drAttr.drAppender, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drAppender }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12064
|
+
new DrRepeat(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_REPEAT_NAME, attr: drAttr.drRepeat, attrs: drAttr }, { config, obj, operatorAround: config.operatorAround?.drRepeat }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12065
|
+
new DrTargetElementIsElement(this, __render, { raws, fag }, { element, attrName: _RawSet.DR_REPLACE_TARGET_ELEMENT_IS_NAME, attr: drAttr.drReplaceTargetElementIs, attrs: drAttr }, { config, obj }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12066
|
+
new DrTargetElement(this, __render, { raws, fag }, { element, attrs: drAttr }, { config, obj }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks }),
|
|
12067
|
+
new DrTargetAttr(this, __render, { raws, fag }, { element, attrs: drAttr }, { config, obj }, { onAttrInitCallBacks, onElementInitCallBacks, onThisComponentSetCallBacks })
|
|
13048
12068
|
];
|
|
13049
12069
|
for (const operator of operators) {
|
|
13050
12070
|
const state = await operator.start();
|
|
@@ -13107,6 +12127,7 @@ var _RawSet = class _RawSet {
|
|
|
13107
12127
|
}
|
|
13108
12128
|
});
|
|
13109
12129
|
}
|
|
12130
|
+
console.groupEnd();
|
|
13110
12131
|
return { raws, executedOperators };
|
|
13111
12132
|
}
|
|
13112
12133
|
// 중요 스타일 적용 부분
|
|
@@ -13225,7 +12246,7 @@ var _RawSet = class _RawSet {
|
|
|
13225
12246
|
}
|
|
13226
12247
|
if (element2.hasAttribute(EventManager.attrAttrName)) {
|
|
13227
12248
|
const script = element2.getAttribute(EventManager.attrAttrName) ?? "";
|
|
13228
|
-
const keyValuePairs = Array.from(script.matchAll(/(\w+)
|
|
12249
|
+
const keyValuePairs = Array.from(script.matchAll(/['"]?([\w-_]+)['"]?:\s*([^,}]+)/g)).map((match) => ({
|
|
13229
12250
|
key: match[1],
|
|
13230
12251
|
value: match[2]
|
|
13231
12252
|
}));
|
|
@@ -13235,20 +12256,22 @@ var _RawSet = class _RawSet {
|
|
|
13235
12256
|
}
|
|
13236
12257
|
const targetElementIs = element2.getAttribute(_RawSet.DR_REPLACE_TARGET_ELEMENT_IS_NAME);
|
|
13237
12258
|
const targetElementNames = config.targetElements?.map((it) => it.name.toLowerCase()) ?? [];
|
|
12259
|
+
targetElementNames.push(..._RawSet.DR_ELEMENTS);
|
|
13238
12260
|
const isElement = targetElementNames.includes(element2.tagName.toLowerCase()) || targetElementNames.includes(targetElementIs?.toLowerCase());
|
|
13239
12261
|
const targetAttrNames = (config.targetAttrs?.map((it) => it.name) ?? []).concat([..._RawSet.DR_ATTRIBUTES]);
|
|
13240
12262
|
const normalAttrs = /* @__PURE__ */ new Map();
|
|
13241
12263
|
const linkVariables = /* @__PURE__ */ new Map();
|
|
13242
12264
|
const linkNames = EventManager.linkAttrs.map((it) => it.name);
|
|
13243
12265
|
const isAttr = element2.getAttributeNames().filter((it) => !EventManager.noDetectAttr.includes(it)).filter((it) => {
|
|
13244
|
-
const value = element2.getAttribute(it);
|
|
12266
|
+
const value = element2.getAttribute(it)?.trim();
|
|
13245
12267
|
if (value && linkNames.includes(it)) {
|
|
13246
12268
|
linkVariables.set(it, value);
|
|
13247
12269
|
} else if (value && _RawSet.isExpression(value)) {
|
|
13248
12270
|
const variablePaths = _RawSet.expressionGroups(value).map((it2) => ({
|
|
13249
|
-
origin: it2[0],
|
|
13250
|
-
inner: it2[1]
|
|
12271
|
+
origin: it2[0].trim(),
|
|
12272
|
+
inner: it2[1].trim()
|
|
13251
12273
|
}));
|
|
12274
|
+
const isStringTemplate = variablePaths.length > 1 || variablePaths[0] && variablePaths[0].origin !== value;
|
|
13252
12275
|
let targetScript = value;
|
|
13253
12276
|
variablePaths.forEach((it2) => {
|
|
13254
12277
|
let r3 = it2.inner.replace(/#[^#]*#/g, "({})");
|
|
@@ -13261,7 +12284,7 @@ var _RawSet = class _RawSet {
|
|
|
13261
12284
|
} else {
|
|
13262
12285
|
element2.setAttribute(it, cval);
|
|
13263
12286
|
}
|
|
13264
|
-
normalAttrs.set(it, { originalAttrValue: value, variablePaths });
|
|
12287
|
+
normalAttrs.set(it, { originalAttrValue: value, variablePaths, isStringTemplate });
|
|
13265
12288
|
}
|
|
13266
12289
|
const isTargetAttr = targetAttrNames.includes(it.toLowerCase());
|
|
13267
12290
|
return isTargetAttr;
|
|
@@ -13332,7 +12355,8 @@ var _RawSet = class _RawSet {
|
|
|
13332
12355
|
lasterIndex = regexArr.index + it.content.length;
|
|
13333
12356
|
}
|
|
13334
12357
|
template.content.append(config.window.document.createTextNode(text.substring(lasterIndex, text.length)));
|
|
13335
|
-
currentNode2?.parentNode
|
|
12358
|
+
const p = currentNode2?.parentNode;
|
|
12359
|
+
p?.replaceChild(template.content, currentNode2);
|
|
13336
12360
|
} else if (currentNode2.nodeType === Node2.ELEMENT_NODE) {
|
|
13337
12361
|
const uuid = `${RandomUtils.alphabet(40)}`;
|
|
13338
12362
|
const element2 = currentNode2;
|
|
@@ -13341,6 +12365,7 @@ var _RawSet = class _RawSet {
|
|
|
13341
12365
|
const startEndPoint = _RawSet.createStartEndPoint({ node: element2, id: uuid, type: elementType }, config);
|
|
13342
12366
|
const targetElementIs = element2.getAttribute(_RawSet.DR_REPLACE_TARGET_ELEMENT_IS_NAME);
|
|
13343
12367
|
const targetElementNames = config.targetElements?.map((it) => it.name.toLowerCase()) ?? [];
|
|
12368
|
+
targetElementNames.push(..._RawSet.DR_ELEMENTS);
|
|
13344
12369
|
const isElement = targetElementNames.includes(element2.tagName.toLowerCase()) || targetElementNames.includes(targetElementIs?.toLowerCase());
|
|
13345
12370
|
const targetAttrNames = (config.targetAttrs?.map((it) => it.name) ?? []).concat(_RawSet.DR_ATTRIBUTES);
|
|
13346
12371
|
const isAttr = element2.getAttributeNames().filter((it) => targetAttrNames.includes(it.toLowerCase())).length > 0;
|
|
@@ -13703,9 +12728,11 @@ var _RawSet = class _RawSet {
|
|
|
13703
12728
|
if (templateReplacements.length > 0) {
|
|
13704
12729
|
targetElement.innerHTML = StringUtils.replaceSequentially(targetElement.innerHTML, templateReplacements);
|
|
13705
12730
|
}
|
|
12731
|
+
const componentName = targetElement.getAttribute(_RawSet.DR_VARIABLE_NAME_OPTIONNAME) ?? "component";
|
|
13706
12732
|
const optionThisName = targetElement.getAttribute(_RawSet.DR_THIS_NAME_OPTIONNAME);
|
|
13707
12733
|
targetElement.getAttributeNames().forEach((it) => targetElement.setAttribute(it, targetElement.getAttribute(it).replace(/#this#/g, drThis)));
|
|
13708
12734
|
const thisRandom = this.drThisEncoding(targetElement, drThis, { asIs: /@this@/g });
|
|
12735
|
+
targetElement.innerHTML = targetElement.innerHTML.replaceAll(`#${componentName}#`, drThis);
|
|
13709
12736
|
if (optionThisName) {
|
|
13710
12737
|
targetElement.innerHTML = targetElement.innerHTML.replaceAll(`@${optionThisName}@`, drThis);
|
|
13711
12738
|
}
|
|
@@ -13879,7 +12906,8 @@ var _RawSet = class _RawSet {
|
|
|
13879
12906
|
);
|
|
13880
12907
|
if (data && innerHTMLThisRandom) {
|
|
13881
12908
|
const template2 = config.window.document.createElement("template");
|
|
13882
|
-
|
|
12909
|
+
let s = ElementUtils.toInnerHTML(data, { document: config.window.document });
|
|
12910
|
+
template2.innerHTML = s.replace(RegExp(innerHTMLThisRandom, "g"), "this.");
|
|
13883
12911
|
;
|
|
13884
12912
|
data = template2.content;
|
|
13885
12913
|
}
|
|
@@ -13919,22 +12947,17 @@ var _RawSet = class _RawSet {
|
|
|
13919
12947
|
new Map(JSON.parse(normalAttribute)).forEach((v, k) => {
|
|
13920
12948
|
const variablePaths = v.variablePaths;
|
|
13921
12949
|
let targetScript = v.originalAttrValue.trim();
|
|
13922
|
-
|
|
13923
|
-
variablePaths.forEach((it) => {
|
|
13924
|
-
checktargetScript = targetScript.replaceAll(it.origin, "");
|
|
13925
|
-
});
|
|
13926
|
-
let isScriptValue = checktargetScript.length === 0 && variablePaths.length === 1;
|
|
13927
|
-
if (isScriptValue) {
|
|
13928
|
-
let r = ObjectUtils.Path.toOptionalChainPath(variablePaths[0].inner);
|
|
13929
|
-
targetScript = targetScript.replaceAll(variablePaths[0].origin, r);
|
|
13930
|
-
} else {
|
|
12950
|
+
if (v.isStringTemplate) {
|
|
13931
12951
|
variablePaths.forEach((it) => {
|
|
13932
12952
|
let r = ObjectUtils.Path.toOptionalChainPath(it.inner);
|
|
13933
12953
|
targetScript = targetScript.replaceAll(it.origin, `\${${r}}`);
|
|
13934
12954
|
});
|
|
12955
|
+
} else {
|
|
12956
|
+
let r = ObjectUtils.Path.toOptionalChainPath(variablePaths[0].inner);
|
|
12957
|
+
targetScript = targetScript.replaceAll(variablePaths[0].origin, r);
|
|
13935
12958
|
}
|
|
13936
12959
|
const cval = ObjectUtils.Script.evaluateReturn(
|
|
13937
|
-
{ bodyScript: config.script, returnScript:
|
|
12960
|
+
{ bodyScript: config.script, returnScript: v.isStringTemplate ? "`" + targetScript + "`" : targetScript },
|
|
13938
12961
|
Object.assign(config.obj, config.renderData ? { __render: config.renderData } : void 0)
|
|
13939
12962
|
);
|
|
13940
12963
|
attribute2[k] = cval;
|
|
@@ -13958,6 +12981,8 @@ _RawSet.DR_INNERTEXT_NAME = "dr-inner-text";
|
|
|
13958
12981
|
_RawSet.DR_DETECT_NAME = "dr-detect";
|
|
13959
12982
|
_RawSet.DR_STRIP_NAME = "dr-strip";
|
|
13960
12983
|
_RawSet.DR_REPLACE_TARGET_ELEMENT_IS_NAME = "dr-replace-target-element-is";
|
|
12984
|
+
// elementName
|
|
12985
|
+
_RawSet.DR_TARGET_ELEMENT_ELEMENTNAME = "dr-target-element";
|
|
13961
12986
|
// 감지처리되는 옵션
|
|
13962
12987
|
_RawSet.DR_DETECT_IF_OPTIONNAME = "dr-detect-option-if";
|
|
13963
12988
|
_RawSet.DR_DETECT_FILTER_OPTIONNAME = "dr-detect-option-filter";
|
|
@@ -14024,6 +13049,9 @@ _RawSet.DR_TAGS = [];
|
|
|
14024
13049
|
// public static readonly DR_REPLACE_ACTION_ATTRIBUTES = [
|
|
14025
13050
|
// RawSet.DR_REPLACE_TARGET_ELEMENT_IS_NAME
|
|
14026
13051
|
// ]
|
|
13052
|
+
_RawSet.DR_ELEMENTS = [
|
|
13053
|
+
_RawSet.DR_TARGET_ELEMENT_ELEMENTNAME
|
|
13054
|
+
];
|
|
14027
13055
|
_RawSet.DR_ATTRIBUTES = [
|
|
14028
13056
|
_RawSet.DR_NAME,
|
|
14029
13057
|
_RawSet.DR_APPENDER_NAME,
|
|
@@ -14037,7 +13065,7 @@ _RawSet.DR_ATTRIBUTES = [
|
|
|
14037
13065
|
_RawSet.DR_INNERHTML_NAME,
|
|
14038
13066
|
_RawSet.DR_INNERTEXT_NAME,
|
|
14039
13067
|
_RawSet.DR_REPEAT_NAME,
|
|
14040
|
-
|
|
13068
|
+
// RawSet.DR_DETECT_NAME, // TODO: DrDetect 오퍼레이터 구현 필요
|
|
14041
13069
|
_RawSet.DR_STRIP_NAME
|
|
14042
13070
|
];
|
|
14043
13071
|
var RawSet = _RawSet;
|
|
@@ -14045,17 +13073,10 @@ var RawSet = _RawSet;
|
|
|
14045
13073
|
// src/decorators/DomRenderNoProxy.ts
|
|
14046
13074
|
var DomRenderNoProxyKey = "DomRender:NoProxy";
|
|
14047
13075
|
var DomRenderNoProxy = (target, propertyKey) => {
|
|
14048
|
-
|
|
14049
|
-
Reflect.defineMetadata(DomRenderNoProxyKey, true, target);
|
|
14050
|
-
return;
|
|
14051
|
-
}
|
|
14052
|
-
Reflect.defineMetadata(DomRenderNoProxyKey, true, target, propertyKey);
|
|
13076
|
+
ReflectUtils.defineMetadata(DomRenderNoProxyKey, true, target, propertyKey);
|
|
14053
13077
|
};
|
|
14054
13078
|
var getDomRenderNoProxy = (target, propertyKey) => {
|
|
14055
|
-
|
|
14056
|
-
return Reflect.getMetadata(DomRenderNoProxyKey, target);
|
|
14057
|
-
}
|
|
14058
|
-
return Reflect.getMetadata(DomRenderNoProxyKey, target, propertyKey);
|
|
13079
|
+
return ReflectUtils.getMetadata(DomRenderNoProxyKey, target, propertyKey);
|
|
14059
13080
|
};
|
|
14060
13081
|
var isDomRenderNoProxy = (target, propertyKey) => {
|
|
14061
13082
|
return ValidUtils.isNullOrUndefined(target) || getDomRenderNoProxy(target, propertyKey) === true;
|
|
@@ -14079,6 +13100,11 @@ var isOnRawSetRendered = (obj) => {
|
|
|
14079
13100
|
return typeof obj?.onRawSetRendered === "function";
|
|
14080
13101
|
};
|
|
14081
13102
|
|
|
13103
|
+
// src/lifecycle/OnChildRawSetRendered.ts
|
|
13104
|
+
var isOnChildRawSetRendered = (obj) => {
|
|
13105
|
+
return typeof obj?.onChildRawSetRendered === "function";
|
|
13106
|
+
};
|
|
13107
|
+
|
|
14082
13108
|
// src/DomRenderProxy.ts
|
|
14083
13109
|
var excludeGetSetPropertys = [
|
|
14084
13110
|
"onBeforeReturnGet",
|
|
@@ -14116,12 +13142,12 @@ var getDomRenderProxy = (obj) => {
|
|
|
14116
13142
|
return void 0;
|
|
14117
13143
|
};
|
|
14118
13144
|
var DomRenderProxy = class _DomRenderProxy {
|
|
13145
|
+
// public name = Math.random();
|
|
14119
13146
|
constructor(_domRender_origin, target, _domRender_config) {
|
|
14120
13147
|
this._domRender_origin = _domRender_origin;
|
|
14121
13148
|
this._domRender_config = _domRender_config;
|
|
14122
13149
|
this._domRender_ref = /* @__PURE__ */ new Map();
|
|
14123
13150
|
this._rawSets = /* @__PURE__ */ new Map();
|
|
14124
|
-
// public _firstTarget: Node;
|
|
14125
13151
|
this._targets = /* @__PURE__ */ new Set();
|
|
14126
13152
|
if (target) {
|
|
14127
13153
|
this._targets.add(target);
|
|
@@ -14205,7 +13231,7 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14205
13231
|
const onInit = target.getAttribute?.(RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME);
|
|
14206
13232
|
let initParam;
|
|
14207
13233
|
if (onCreate) {
|
|
14208
|
-
initParam =
|
|
13234
|
+
initParam = ObjectUtils.Script.evaluateReturn(onCreate, this._domRender_proxy);
|
|
14209
13235
|
}
|
|
14210
13236
|
if (isOnInitRender(this._domRender_proxy)) {
|
|
14211
13237
|
await this._domRender_proxy.onInitRender(
|
|
@@ -14234,46 +13260,65 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14234
13260
|
}
|
|
14235
13261
|
const removeRawSets = [];
|
|
14236
13262
|
const rawSets = raws ?? this.getRawSets();
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
|
|
13263
|
+
const CHUNK_SIZE = 50;
|
|
13264
|
+
const chunks = [];
|
|
13265
|
+
const rawSetsArray = Array.from(rawSets);
|
|
13266
|
+
for (let i = 0; i < rawSetsArray.length; i += CHUNK_SIZE) {
|
|
13267
|
+
chunks.push(rawSetsArray.slice(i, i + CHUNK_SIZE));
|
|
13268
|
+
}
|
|
13269
|
+
for (const chunk of chunks) {
|
|
13270
|
+
const promises = chunk.map(async (it) => {
|
|
13271
|
+
it.getUsingTriggerVariables(this._domRender_config).forEach((path) => {
|
|
13272
|
+
this.addRawSet(path, it);
|
|
13273
|
+
});
|
|
13274
|
+
let renderResult;
|
|
13275
|
+
if (it.isConnected) {
|
|
13276
|
+
const targetAttrMap = it.point.node?.getAttribute?.(EventManager.normalAttrMapAttrName);
|
|
13277
|
+
if (it.detect?.action) {
|
|
13278
|
+
it.detect.action();
|
|
13279
|
+
} else if (it.type === "TARGET_ELEMENT" /* TARGET_ELEMENT */ && it.dataSet?.render?.currentThis && fullPathStr && targetAttrMap) {
|
|
13280
|
+
const attrStart = performance.now();
|
|
13281
|
+
new Map(JSON.parse(targetAttrMap)).forEach((v, k) => {
|
|
13282
|
+
var _a2;
|
|
13283
|
+
const isUsing = v.variablePaths.some((it2) => EventManager.isUsingThisVar(it2.inner, `this.${fullPathStr}`));
|
|
13284
|
+
if (isUsing) {
|
|
13285
|
+
const targetAttrObject = RawSet.getAttributeObject(it.point.node, {
|
|
13286
|
+
script: it.dataSet?.render?.renderScript ?? "",
|
|
13287
|
+
obj: Object.assign(this._domRender_proxy ?? {}, { __render: it.dataSet?.render })
|
|
13288
|
+
});
|
|
13289
|
+
(_a2 = it.dataSet).render ?? (_a2.render = {});
|
|
13290
|
+
it.dataSet.render.attribute = targetAttrObject;
|
|
13291
|
+
if (isOnChangeAttrRender(it.dataSet?.render?.currentThis)) {
|
|
13292
|
+
it.dataSet?.render?.currentThis?.onChangeAttrRender?.(k, targetAttrObject[k], { rawSet: it });
|
|
13293
|
+
}
|
|
14259
13294
|
}
|
|
13295
|
+
});
|
|
13296
|
+
const attrEnd = performance.now();
|
|
13297
|
+
} else {
|
|
13298
|
+
const renderStart = performance.now();
|
|
13299
|
+
const rawSets2 = await it.render(this._domRender_proxy, this._domRender_config);
|
|
13300
|
+
const renderEnd = performance.now();
|
|
13301
|
+
renderResult = rawSets2;
|
|
13302
|
+
if (rawSets2 && rawSets2.raws.length > 0) {
|
|
13303
|
+
await this.render(rawSets2.raws);
|
|
14260
13304
|
}
|
|
14261
|
-
});
|
|
14262
|
-
} else {
|
|
14263
|
-
const rawSets2 = await it.render(this._domRender_proxy, this._domRender_config);
|
|
14264
|
-
renderResult = rawSets2;
|
|
14265
|
-
if (rawSets2 && rawSets2.raws.length > 0) {
|
|
14266
|
-
await this.render(rawSets2.raws);
|
|
14267
13305
|
}
|
|
13306
|
+
} else {
|
|
13307
|
+
removeRawSets.push(it);
|
|
14268
13308
|
}
|
|
14269
|
-
|
|
14270
|
-
|
|
14271
|
-
|
|
14272
|
-
|
|
14273
|
-
|
|
14274
|
-
|
|
13309
|
+
const t = it.findNearThis(this._domRender_proxy);
|
|
13310
|
+
if (isOnRawSetRendered(t)) {
|
|
13311
|
+
await t.onRawSetRendered(it, { path: fullPathStr, value: ObjectUtils.Script.evaluateReturn(`this.${fullPathStr}`, this._domRender_proxy), root: this._domRender_proxy, renderResult });
|
|
13312
|
+
}
|
|
13313
|
+
});
|
|
13314
|
+
await Promise.all(promises);
|
|
13315
|
+
if (chunks.length > 1) {
|
|
13316
|
+
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
14275
13317
|
}
|
|
14276
13318
|
}
|
|
13319
|
+
if (isOnChildRawSetRendered(this._domRender_proxy)) {
|
|
13320
|
+
await this._domRender_proxy.onChildRawSetRendered();
|
|
13321
|
+
}
|
|
14277
13322
|
if (removeRawSets.length > 0) {
|
|
14278
13323
|
this.removeRawSet(...removeRawSets);
|
|
14279
13324
|
}
|
|
@@ -14288,12 +13333,15 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14288
13333
|
// return current;
|
|
14289
13334
|
// }
|
|
14290
13335
|
root(pathInfos, value, lastDoneExecute = true) {
|
|
13336
|
+
const rootStartTime = Date.now();
|
|
13337
|
+
const pathKey = pathInfos.flat().map((i) => i.path).join(".");
|
|
14291
13338
|
const fullPaths = [];
|
|
14292
13339
|
if (this._domRender_ref.size > 0) {
|
|
14293
13340
|
this._domRender_ref.forEach((it, key) => {
|
|
14294
13341
|
if ("_DomRender_isProxy" in key) {
|
|
14295
13342
|
it.forEach((sit) => {
|
|
14296
13343
|
try {
|
|
13344
|
+
const recursiveStartTime = Date.now();
|
|
14297
13345
|
const concat2 = pathInfos.concat([[{ path: sit, obj: key }]]);
|
|
14298
13346
|
const items = key._DomRender_proxy?.root(
|
|
14299
13347
|
concat2,
|
|
@@ -14307,6 +13355,7 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14307
13355
|
}
|
|
14308
13356
|
});
|
|
14309
13357
|
} else {
|
|
13358
|
+
const pathProcessStartTime = Date.now();
|
|
14310
13359
|
const strings = pathInfos.reverse().map((it) => it.map((it2) => it2.path).join(","));
|
|
14311
13360
|
const fullPathStr = strings.map((it) => isNaN(Number(it)) ? "." + it : `[${it}]`).join("").slice(1);
|
|
14312
13361
|
if (lastDoneExecute) {
|
|
@@ -14314,10 +13363,13 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14314
13363
|
const front = strings.slice(0, strings.length - 1).map((it) => isNaN(Number(it)) ? "." + it : `[${it}]`).join("");
|
|
14315
13364
|
const lastPropertyName = strings[strings.length - 1];
|
|
14316
13365
|
const path = "this" + front;
|
|
14317
|
-
const data =
|
|
13366
|
+
const data = ObjectUtils.Script.evaluateReturn(ObjectUtils.Path.toOptionalChainPath(path), this._domRender_proxy);
|
|
13367
|
+
const promiseStartTime = Date.now();
|
|
14318
13368
|
new Promise(async (resolve) => {
|
|
13369
|
+
const promiseInnerStartTime = Date.now();
|
|
14319
13370
|
let rData = [];
|
|
14320
13371
|
const firstPathStr = front.slice(1);
|
|
13372
|
+
const dictionaryCheckStartTime = Date.now();
|
|
14321
13373
|
const firstTargets = this._rawSets.get(firstPathStr);
|
|
14322
13374
|
const firstTargetDictionary = [];
|
|
14323
13375
|
firstTargets?.forEach((it) => {
|
|
@@ -14359,6 +13411,7 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14359
13411
|
rData = await this.render(rawSets);
|
|
14360
13412
|
}
|
|
14361
13413
|
}
|
|
13414
|
+
const renderStartTime = Date.now();
|
|
14362
13415
|
if (lastPropertyName === "length" && Array.isArray(data)) {
|
|
14363
13416
|
const aIterable = this._rawSets.get(firstPathStr);
|
|
14364
13417
|
if (aIterable) {
|
|
@@ -14367,13 +13420,17 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14367
13420
|
} else if (iterable) {
|
|
14368
13421
|
rData = await this.render(Array.from(iterable), fullPathStr);
|
|
14369
13422
|
}
|
|
13423
|
+
const eventProcessStartTime = Date.now();
|
|
14370
13424
|
const Node2 = this._domRender_config.window.Node;
|
|
14371
13425
|
this._targets.forEach((it) => {
|
|
14372
13426
|
if (it.nodeType === Node2.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node2.ELEMENT_NODE) {
|
|
13427
|
+
const findAttrStartTime = Date.now();
|
|
14373
13428
|
const targets = this._domRender_config.eventManager.findAttrElements(
|
|
14374
13429
|
it,
|
|
14375
13430
|
this._domRender_config
|
|
14376
13431
|
);
|
|
13432
|
+
const targetCount = targets?.size || targets?.length || 0;
|
|
13433
|
+
const changeVarStartTime = Date.now();
|
|
14377
13434
|
this._domRender_config.eventManager.changeVar(
|
|
14378
13435
|
this._domRender_proxy,
|
|
14379
13436
|
targets,
|
|
@@ -14383,7 +13440,7 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14383
13440
|
}
|
|
14384
13441
|
});
|
|
14385
13442
|
if (rData?.length > 0 && isOnChildRenderedByProperty(data)) {
|
|
14386
|
-
const propertyValue =
|
|
13443
|
+
const propertyValue = ObjectUtils.Script.evaluateReturn(`this.${lastPropertyName}`, data);
|
|
14387
13444
|
data.onChildRenderedByProperty(lastPropertyName, propertyValue);
|
|
14388
13445
|
}
|
|
14389
13446
|
resolve(rData);
|
|
@@ -14399,6 +13456,7 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14399
13456
|
target[p] = value;
|
|
14400
13457
|
return true;
|
|
14401
13458
|
}
|
|
13459
|
+
let start = performance.now();
|
|
14402
13460
|
if (typeof p === "string") {
|
|
14403
13461
|
value = this.proxy(receiver, value, p);
|
|
14404
13462
|
}
|
|
@@ -14421,14 +13479,23 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14421
13479
|
}).forEach((it) => {
|
|
14422
13480
|
const variablePaths = it.valueScript.variablePaths;
|
|
14423
13481
|
let targetScript = it.valueScript.originalAttrValue;
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14429
|
-
|
|
13482
|
+
let script;
|
|
13483
|
+
if (it.valueScript.isStringTemplate) {
|
|
13484
|
+
variablePaths.forEach((it2) => {
|
|
13485
|
+
let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
|
|
13486
|
+
targetScript = targetScript.replaceAll(it2.origin, `\${${r}}`);
|
|
13487
|
+
});
|
|
13488
|
+
script = "`" + targetScript + "`";
|
|
13489
|
+
} else {
|
|
13490
|
+
variablePaths.forEach((it2) => {
|
|
13491
|
+
let r = ObjectUtils.Path.toOptionalChainPath(it2.inner);
|
|
13492
|
+
targetScript = targetScript.replaceAll(it2.origin, `${r}`);
|
|
13493
|
+
});
|
|
13494
|
+
script = targetScript;
|
|
13495
|
+
}
|
|
13496
|
+
const value1 = ObjectUtils.Script.evaluateReturn(script, it.pathInfo.obj);
|
|
13497
|
+
if (value1 === null || value1 === void 0) {
|
|
14430
13498
|
elementInfo.element.removeAttribute(it.key);
|
|
14431
|
-
elementInfo.element[it.key] = null;
|
|
14432
13499
|
} else {
|
|
14433
13500
|
elementInfo.element.setAttribute(it.key, value1);
|
|
14434
13501
|
elementInfo.element[it.key] = value1;
|
|
@@ -14438,11 +13505,11 @@ var DomRenderProxy = class _DomRenderProxy {
|
|
|
14438
13505
|
);
|
|
14439
13506
|
DocumentUtils.querySelectorAllByAttributeName(rootElement, EventManager.linkTargetMapAttrName)?.forEach(
|
|
14440
13507
|
(elementInfo) => {
|
|
14441
|
-
const targets = new Map(
|
|
13508
|
+
const targets = new Map(ObjectUtils.Script.evaluateReturn(elementInfo.value));
|
|
14442
13509
|
Array.from(targets.entries()).filter(([key, value2]) => value2.trim()).filter(isDefined).flatMap(([key, valueScript]) => {
|
|
14443
13510
|
return fullPathInfo.flat().filter((it) => valueScript.includes(`this.${it.path}`)).flatMap((it) => ({ key, valueScript, pathInfo: it }));
|
|
14444
13511
|
}).forEach((info) => {
|
|
14445
|
-
const value1 =
|
|
13512
|
+
const value1 = ObjectUtils.Script.evaluateReturn(info.valueScript, info.pathInfo.obj);
|
|
14446
13513
|
const applyAttributeName = EventManager.linkAttrs.find((it) => it.name === info.key);
|
|
14447
13514
|
if (applyAttributeName) {
|
|
14448
13515
|
if (value1 === null) {
|
|
@@ -14599,11 +13666,13 @@ var Router = class {
|
|
|
14599
13666
|
let routeData;
|
|
14600
13667
|
if (config?.firstUrl) {
|
|
14601
13668
|
const path = config.firstUrl.split("?");
|
|
13669
|
+
const urlSearchParams = new URLSearchParams(path[1] ?? "");
|
|
14602
13670
|
routeData = {
|
|
14603
13671
|
url: config.firstUrl,
|
|
14604
13672
|
path: path[0],
|
|
14605
|
-
searchParams:
|
|
13673
|
+
searchParams: urlSearchParams,
|
|
14606
13674
|
router: this,
|
|
13675
|
+
search: urlSearchParams.size > 0 ? `?${urlSearchParams.toString()}` : "",
|
|
14607
13676
|
triggerPoint: "end"
|
|
14608
13677
|
};
|
|
14609
13678
|
this.behaviorSubject = new BehaviorSubject(routeData);
|
|
@@ -14656,31 +13725,30 @@ var Router = class {
|
|
|
14656
13725
|
}
|
|
14657
13726
|
}
|
|
14658
13727
|
getRouteData(config) {
|
|
14659
|
-
let path =
|
|
14660
|
-
let url =
|
|
13728
|
+
let path = this.getPathName();
|
|
13729
|
+
let url = this.getUrl();
|
|
13730
|
+
let searchParams = this.getSearchParams();
|
|
13731
|
+
let search = this.getSearch();
|
|
14661
13732
|
if (config?.pathOrUrl) {
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
}
|
|
14669
|
-
if (isUrl) {
|
|
14670
|
-
const u = new URL(config.pathOrUrl);
|
|
14671
|
-
path = u.pathname;
|
|
14672
|
-
url = u.pathname + u.search;
|
|
13733
|
+
const paths = config.pathOrUrl.split("?");
|
|
13734
|
+
search = paths[1] ? `?${paths[1]}` : "";
|
|
13735
|
+
searchParams = new URLSearchParams(search);
|
|
13736
|
+
const firstUrl = paths[0];
|
|
13737
|
+
if (ValidUtils.isUrl(firstUrl)) {
|
|
13738
|
+
path = new URL(firstUrl).pathname;
|
|
14673
13739
|
} else {
|
|
14674
|
-
path =
|
|
13740
|
+
path = firstUrl;
|
|
14675
13741
|
}
|
|
14676
|
-
|
|
14677
|
-
path = this.getPathName();
|
|
14678
|
-
url = this.getUrl();
|
|
13742
|
+
url = config.pathOrUrl;
|
|
14679
13743
|
}
|
|
14680
13744
|
const newVar = {
|
|
14681
13745
|
path,
|
|
14682
13746
|
url,
|
|
14683
|
-
searchParams
|
|
13747
|
+
searchParams,
|
|
13748
|
+
// 이렇게 하면 진짜 문자열이 변형이 될수 있다 따라서 그냥 문자열 자른 원본을넣어줘야한다
|
|
13749
|
+
// search: searchParams.size > 0 ? `?${searchParams.toString()}` : '',
|
|
13750
|
+
search,
|
|
13751
|
+
router: this
|
|
14684
13752
|
};
|
|
14685
13753
|
const data = this.getData();
|
|
14686
13754
|
if (data) {
|
|
@@ -14692,7 +13760,6 @@ var Router = class {
|
|
|
14692
13760
|
newVar.pathData = data2;
|
|
14693
13761
|
}
|
|
14694
13762
|
}
|
|
14695
|
-
newVar.router = this;
|
|
14696
13763
|
return Object.freeze(newVar);
|
|
14697
13764
|
}
|
|
14698
13765
|
pushState(data, title, path) {
|
|
@@ -14743,7 +13810,6 @@ var Router = class {
|
|
|
14743
13810
|
}
|
|
14744
13811
|
}
|
|
14745
13812
|
toUrl(data) {
|
|
14746
|
-
console.log("toUrl", data);
|
|
14747
13813
|
let targetPath;
|
|
14748
13814
|
if (typeof data === "string") {
|
|
14749
13815
|
targetPath = data;
|
|
@@ -14754,6 +13820,10 @@ var Router = class {
|
|
|
14754
13820
|
}
|
|
14755
13821
|
return targetPath;
|
|
14756
13822
|
}
|
|
13823
|
+
reload() {
|
|
13824
|
+
const currentUrl = this.getUrl();
|
|
13825
|
+
this.replace(currentUrl);
|
|
13826
|
+
}
|
|
14757
13827
|
};
|
|
14758
13828
|
|
|
14759
13829
|
// src/routers/PathRouter.ts
|
|
@@ -14821,6 +13891,9 @@ var PathRouter = class extends Router {
|
|
|
14821
13891
|
getPathName() {
|
|
14822
13892
|
return this.config.window.location?.pathname ?? "/";
|
|
14823
13893
|
}
|
|
13894
|
+
getSearch() {
|
|
13895
|
+
return this.config.window.location?.search ?? "";
|
|
13896
|
+
}
|
|
14824
13897
|
getHashSearchParams(data) {
|
|
14825
13898
|
const searchParams = new URLSearchParams(this.config.window.location?.hash.slice(1) ?? "");
|
|
14826
13899
|
data?.delete?.forEach((it) => {
|
|
@@ -14902,6 +13975,9 @@ var HashRouter = class extends Router {
|
|
|
14902
13975
|
getPathName() {
|
|
14903
13976
|
return LocationUtils.hashPath(this.config.window) || "/";
|
|
14904
13977
|
}
|
|
13978
|
+
getSearch() {
|
|
13979
|
+
return LocationUtils.hashSearch(this.config.window);
|
|
13980
|
+
}
|
|
14905
13981
|
getHashSearchParams(data) {
|
|
14906
13982
|
const hash = this.config.window.location.hash;
|
|
14907
13983
|
const queryIndex = hash.indexOf("?");
|
|
@@ -15124,6 +14200,41 @@ function debounceTime(duration) {
|
|
|
15124
14200
|
};
|
|
15125
14201
|
}
|
|
15126
14202
|
|
|
14203
|
+
// ../core/dist/esm/message/operators/bufferTime.js
|
|
14204
|
+
function bufferTime(bufferTimeSpan) {
|
|
14205
|
+
return (source) => {
|
|
14206
|
+
return new Observable((subscriber) => {
|
|
14207
|
+
let buffer = [];
|
|
14208
|
+
const intervalId = setInterval(() => {
|
|
14209
|
+
if (buffer.length > 0) {
|
|
14210
|
+
subscriber.next(buffer);
|
|
14211
|
+
buffer = [];
|
|
14212
|
+
}
|
|
14213
|
+
}, bufferTimeSpan);
|
|
14214
|
+
const sourceSubscription = source.subscribe({
|
|
14215
|
+
next: (value) => {
|
|
14216
|
+
buffer.push(value);
|
|
14217
|
+
},
|
|
14218
|
+
error: (err) => {
|
|
14219
|
+
subscriber.error(err);
|
|
14220
|
+
clearInterval(intervalId);
|
|
14221
|
+
},
|
|
14222
|
+
complete: () => {
|
|
14223
|
+
if (buffer.length > 0) {
|
|
14224
|
+
subscriber.next(buffer);
|
|
14225
|
+
}
|
|
14226
|
+
subscriber.complete();
|
|
14227
|
+
clearInterval(intervalId);
|
|
14228
|
+
}
|
|
14229
|
+
});
|
|
14230
|
+
return () => {
|
|
14231
|
+
sourceSubscription.unsubscribe();
|
|
14232
|
+
clearInterval(intervalId);
|
|
14233
|
+
};
|
|
14234
|
+
});
|
|
14235
|
+
};
|
|
14236
|
+
}
|
|
14237
|
+
|
|
15127
14238
|
// src/components/ComponentBase.ts
|
|
15128
14239
|
var __decorate = function(decorators, target, key, desc) {
|
|
15129
14240
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -15171,6 +14282,8 @@ var ComponentBase = class {
|
|
|
15171
14282
|
this._eventBindings = [];
|
|
15172
14283
|
this._refreshTimers = /* @__PURE__ */ new Map();
|
|
15173
14284
|
this.childrenSetSubject = new Subject();
|
|
14285
|
+
this.onRawSetRenderedOtherDataSubject = new Subject();
|
|
14286
|
+
this.onChildRawSetRenderedOtherDataSubject = new Subject();
|
|
15174
14287
|
}
|
|
15175
14288
|
get componentConfig() {
|
|
15176
14289
|
return this._config;
|
|
@@ -15338,6 +14451,7 @@ var ComponentBase = class {
|
|
|
15338
14451
|
this._refreshTimers.clear();
|
|
15339
14452
|
}
|
|
15340
14453
|
async onRawSetRendered(rawSet, otherData) {
|
|
14454
|
+
this.onRawSetRenderedOtherDataSubject.next(otherData);
|
|
15341
14455
|
const queries = ReflectUtils.getMetadata(QUERY_METADATA_KEY, this.constructor);
|
|
15342
14456
|
if (queries) {
|
|
15343
14457
|
queries.filter((it) => it.refreshRawSetRendered).forEach((queryInfo) => {
|
|
@@ -15351,6 +14465,9 @@ var ComponentBase = class {
|
|
|
15351
14465
|
});
|
|
15352
14466
|
}
|
|
15353
14467
|
}
|
|
14468
|
+
async onChildRawSetRendered() {
|
|
14469
|
+
this.onChildRawSetRenderedOtherDataSubject.next();
|
|
14470
|
+
}
|
|
15354
14471
|
/**
|
|
15355
14472
|
* Manually refresh all query and event decorators
|
|
15356
14473
|
* Useful when DOM elements are dynamically added/removed and you want to update bindings
|
|
@@ -15453,6 +14570,17 @@ var ComponentBase = class {
|
|
|
15453
14570
|
}
|
|
15454
14571
|
}
|
|
15455
14572
|
}
|
|
14573
|
+
getAttributeNames(attribute2 = this._attribute) {
|
|
14574
|
+
const target = attribute2;
|
|
14575
|
+
if (!target)
|
|
14576
|
+
return [];
|
|
14577
|
+
const keys = Object.keys(target);
|
|
14578
|
+
const names = /* @__PURE__ */ new Set();
|
|
14579
|
+
for (const k of keys) {
|
|
14580
|
+
names.add(k);
|
|
14581
|
+
}
|
|
14582
|
+
return Array.from(names);
|
|
14583
|
+
}
|
|
15456
14584
|
getAttribute(name, attribute2 = this._attribute) {
|
|
15457
14585
|
const target = attribute2;
|
|
15458
14586
|
if (!target) {
|
|
@@ -15531,6 +14659,10 @@ var ComponentBase = class {
|
|
|
15531
14659
|
}
|
|
15532
14660
|
onCreatedThisChildDebounce(childrenSet) {
|
|
15533
14661
|
}
|
|
14662
|
+
onRawSetRenderedDebounce(childrenSet) {
|
|
14663
|
+
}
|
|
14664
|
+
onChildRawSetRenderedDebounce() {
|
|
14665
|
+
}
|
|
15534
14666
|
onCreateRenderData(data) {
|
|
15535
14667
|
this._render = data.render;
|
|
15536
14668
|
if (data.render?.rawSet) {
|
|
@@ -15544,7 +14676,7 @@ var ComponentBase = class {
|
|
|
15544
14676
|
}
|
|
15545
14677
|
}
|
|
15546
14678
|
onChangeAttrRender(name, value, other) {
|
|
15547
|
-
if (other
|
|
14679
|
+
if (other?.rawSet) {
|
|
15548
14680
|
this.setRawSet(other.rawSet);
|
|
15549
14681
|
}
|
|
15550
14682
|
const attributes = ReflectUtils.getMetadata(ATTRIBUTE_METADATA_KEY, this.constructor);
|
|
@@ -15568,6 +14700,12 @@ var ComponentBase = class {
|
|
|
15568
14700
|
this.createChildrenDebounceSubscription = this.childrenSetSubject.pipe(debounceTime(this.componentConfig?.createChildrenDebounce ?? 0)).subscribe((it) => {
|
|
15569
14701
|
this.onCreatedThisChildDebounce(it);
|
|
15570
14702
|
});
|
|
14703
|
+
this.onRawSetRenderedOtherDataSubjectSubscription = this.onRawSetRenderedOtherDataSubject.pipe(bufferTime(this.componentConfig?.onRawSetRenderedOtherDataDebounce ?? 0)).subscribe((it) => {
|
|
14704
|
+
this.onRawSetRenderedDebounce(it);
|
|
14705
|
+
});
|
|
14706
|
+
this.onChildRawSetRenderedOtherDataSubjectSubscription = this.onChildRawSetRenderedOtherDataSubject.pipe(debounceTime(this.componentConfig?.onChildRawSetRenderedOtherDataDebounce ?? 0)).subscribe((it) => {
|
|
14707
|
+
this.onChildRawSetRenderedDebounce();
|
|
14708
|
+
});
|
|
15571
14709
|
if (rawSet) {
|
|
15572
14710
|
this.setRawSet(rawSet);
|
|
15573
14711
|
const e = this.getElement();
|
|
@@ -15592,6 +14730,8 @@ var ComponentBase = class {
|
|
|
15592
14730
|
this._cleanupEventBindings();
|
|
15593
14731
|
this._clearAllRefreshTimers();
|
|
15594
14732
|
this.createChildrenDebounceSubscription?.unsubscribe();
|
|
14733
|
+
this.onRawSetRenderedOtherDataSubjectSubscription?.unsubscribe();
|
|
14734
|
+
this.onChildRawSetRenderedOtherDataSubjectSubscription?.unsubscribe();
|
|
15595
14735
|
}
|
|
15596
14736
|
};
|
|
15597
14737
|
__decorate([
|
|
@@ -15634,6 +14774,22 @@ __decorate([
|
|
|
15634
14774
|
DomRenderNoProxy,
|
|
15635
14775
|
__metadata("design:type", Object)
|
|
15636
14776
|
], ComponentBase.prototype, "createChildrenDebounceSubscription", void 0);
|
|
14777
|
+
__decorate([
|
|
14778
|
+
DomRenderNoProxy,
|
|
14779
|
+
__metadata("design:type", Object)
|
|
14780
|
+
], ComponentBase.prototype, "onRawSetRenderedOtherDataSubject", void 0);
|
|
14781
|
+
__decorate([
|
|
14782
|
+
DomRenderNoProxy,
|
|
14783
|
+
__metadata("design:type", Object)
|
|
14784
|
+
], ComponentBase.prototype, "onChildRawSetRenderedOtherDataSubject", void 0);
|
|
14785
|
+
__decorate([
|
|
14786
|
+
DomRenderNoProxy,
|
|
14787
|
+
__metadata("design:type", Object)
|
|
14788
|
+
], ComponentBase.prototype, "onRawSetRenderedOtherDataSubjectSubscription", void 0);
|
|
14789
|
+
__decorate([
|
|
14790
|
+
DomRenderNoProxy,
|
|
14791
|
+
__metadata("design:type", Object)
|
|
14792
|
+
], ComponentBase.prototype, "onChildRawSetRenderedOtherDataSubjectSubscription", void 0);
|
|
15637
14793
|
|
|
15638
14794
|
// src/components/router/RouterOutlet.ts
|
|
15639
14795
|
var RouterOutlet;
|
|
@@ -15643,18 +14799,27 @@ var RouterOutlet;
|
|
|
15643
14799
|
constructor() {
|
|
15644
14800
|
super(...arguments);
|
|
15645
14801
|
this.if = null;
|
|
14802
|
+
this.sw = false;
|
|
15646
14803
|
}
|
|
15647
14804
|
setValue(value) {
|
|
15648
|
-
this.
|
|
14805
|
+
this.sw = false;
|
|
14806
|
+
setTimeout(() => {
|
|
14807
|
+
this.value = value;
|
|
14808
|
+
}, 0);
|
|
14809
|
+
setTimeout(() => {
|
|
14810
|
+
this.sw = true;
|
|
14811
|
+
}, 0);
|
|
15649
14812
|
}
|
|
15650
14813
|
async onInitRender(param, rawSet) {
|
|
15651
14814
|
await super.onInitRender(param, rawSet);
|
|
15652
14815
|
const c = this.getParentThis();
|
|
15653
14816
|
const userValue = this.getAttribute("value");
|
|
15654
|
-
if (userValue) {
|
|
15655
|
-
this.
|
|
15656
|
-
} else if (
|
|
15657
|
-
this.
|
|
14817
|
+
if (typeof userValue === "string") {
|
|
14818
|
+
this.setValue(c[userValue]);
|
|
14819
|
+
} else if (userValue instanceof ComponentSet) {
|
|
14820
|
+
this.setValue(userValue);
|
|
14821
|
+
} else if (!userValue && c instanceof ComponentRouterBase) {
|
|
14822
|
+
this.setValue(c.child);
|
|
15658
14823
|
}
|
|
15659
14824
|
}
|
|
15660
14825
|
onDestroyRender(data) {
|
|
@@ -15663,7 +14828,7 @@ var RouterOutlet;
|
|
|
15663
14828
|
onChangeAttrRender(name, value, other) {
|
|
15664
14829
|
super.onChangeAttrRender(name, value, other);
|
|
15665
14830
|
if (this.equalsAttributeName(name, "value")) {
|
|
15666
|
-
this.value
|
|
14831
|
+
this.setValue(value);
|
|
15667
14832
|
}
|
|
15668
14833
|
if (this.equalsAttributeName(name, "if")) {
|
|
15669
14834
|
this.if = value;
|
|
@@ -15671,6 +14836,9 @@ var RouterOutlet;
|
|
|
15671
14836
|
if (this.equalsAttributeName(name, "createArguments")) {
|
|
15672
14837
|
this.createArguments = value;
|
|
15673
14838
|
}
|
|
14839
|
+
if (this.childObject && this.childRawSet && isOnChangeAttrRender(this.childObject)) {
|
|
14840
|
+
this.childObject.onChangeAttrRender(name, value, { rawSet: this.childRawSet });
|
|
14841
|
+
}
|
|
15674
14842
|
}
|
|
15675
14843
|
onCreatedThisChild(child, data) {
|
|
15676
14844
|
super.onCreatedThisChild(child, data);
|
|
@@ -15683,9 +14851,22 @@ var RouterOutlet;
|
|
|
15683
14851
|
}
|
|
15684
14852
|
this.getAttribute("onCreatedDebounce")?.(this.value?.obj);
|
|
15685
14853
|
}
|
|
15686
|
-
|
|
15687
|
-
component ?? (component = this.value?.obj);
|
|
15688
|
-
this.
|
|
14854
|
+
onCreateDrThis($component, $rawSet) {
|
|
14855
|
+
this.childObject = $component ?? ($component = this.value?.obj);
|
|
14856
|
+
this.childRawSet = $rawSet;
|
|
14857
|
+
if ($component) {
|
|
14858
|
+
this.getAttribute("onCreated")?.($component);
|
|
14859
|
+
if (isOnChangeAttrRender($component)) {
|
|
14860
|
+
this.getAttributeNames().filter((it) => it.startsWith("attribute-")).forEach((it) => {
|
|
14861
|
+
var _a2;
|
|
14862
|
+
const attrName = it.replace(/^attribute-/, "");
|
|
14863
|
+
const attrValue = this.getAttribute(it);
|
|
14864
|
+
(_a2 = $rawSet.dataSet.render).attribute ?? (_a2.attribute = {});
|
|
14865
|
+
$rawSet.dataSet.render.attribute[attrName] = attrValue;
|
|
14866
|
+
$component.onChangeAttrRender(attrName, attrValue, { rawSet: $rawSet });
|
|
14867
|
+
});
|
|
14868
|
+
}
|
|
14869
|
+
}
|
|
15689
14870
|
}
|
|
15690
14871
|
}
|
|
15691
14872
|
_RouterOutlet.RouterOutlet = RouterOutlet2;
|
|
@@ -15695,7 +14876,11 @@ var RouterOutlet_default = {
|
|
|
15695
14876
|
routerOutlet: (config, executer) => {
|
|
15696
14877
|
return RawSet.createComponentTargetElement({
|
|
15697
14878
|
name: RouterOutlet.selector,
|
|
15698
|
-
template:
|
|
14879
|
+
template: `
|
|
14880
|
+
<dr-if value="\${@this@.sw}$">
|
|
14881
|
+
<div dr-this="@this@.value" dr-detect-option-if="@this@?.value && @this@?.if" dr-option-strip="true" dr-on-create:arguments="@this@.createArguments" dr-on-create:callback="@this@?.onCreateDrThis?.($component, $rawSet)">#innerHTML#</div>
|
|
14882
|
+
</dr-if>
|
|
14883
|
+
`,
|
|
15699
14884
|
objFactory: (e, o, r2, counstructorParam) => {
|
|
15700
14885
|
return executer?.run({ rootObject: new RouterOutlet.RouterOutlet(...counstructorParam), config });
|
|
15701
14886
|
}
|
|
@@ -15755,6 +14940,7 @@ var A;
|
|
|
15755
14940
|
this.target = null;
|
|
15756
14941
|
this.style = null;
|
|
15757
14942
|
this.classAttr = null;
|
|
14943
|
+
this.drClass = null;
|
|
15758
14944
|
this.click = null;
|
|
15759
14945
|
this.replace = false;
|
|
15760
14946
|
this.scrollToTop = true;
|
|
@@ -15779,6 +14965,21 @@ var A;
|
|
|
15779
14965
|
this.domRenderConfig?.router?.go({ path: this.href, replace: this.replace, scrollToTop: this.scrollToTop });
|
|
15780
14966
|
}
|
|
15781
14967
|
}
|
|
14968
|
+
onChangeAttrRender(name, value, other) {
|
|
14969
|
+
super.onChangeAttrRender(name, value, other);
|
|
14970
|
+
if (this.element && name.startsWith("attribute-")) {
|
|
14971
|
+
this.element.setAttribute(name, value);
|
|
14972
|
+
}
|
|
14973
|
+
}
|
|
14974
|
+
onAElementInit($element) {
|
|
14975
|
+
this.element = $element;
|
|
14976
|
+
this.getAttribute("onInit")?.($element);
|
|
14977
|
+
this.getAttributeNames().filter((it) => it.startsWith("attribute-")).forEach((it) => {
|
|
14978
|
+
const attrName = it.replace(/^attribute-/, "");
|
|
14979
|
+
const attrValue = this.getAttribute(it);
|
|
14980
|
+
this.element.setAttribute(attrName, attrValue);
|
|
14981
|
+
});
|
|
14982
|
+
}
|
|
15782
14983
|
}
|
|
15783
14984
|
__decorate2([
|
|
15784
14985
|
attribute({ converter: (v) => v || null }),
|
|
@@ -15796,6 +14997,10 @@ var A;
|
|
|
15796
14997
|
attribute({ name: "class", converter: (v) => v || null }),
|
|
15797
14998
|
__metadata2("design:type", String)
|
|
15798
14999
|
], A2.prototype, "classAttr", void 0);
|
|
15000
|
+
__decorate2([
|
|
15001
|
+
attribute({ name: "dr-class", converter: (v) => v || null }),
|
|
15002
|
+
__metadata2("design:type", String)
|
|
15003
|
+
], A2.prototype, "drClass", void 0);
|
|
15799
15004
|
__decorate2([
|
|
15800
15005
|
attribute(),
|
|
15801
15006
|
__metadata2("design:type", Function)
|
|
@@ -15820,6 +15025,8 @@ var A_default = {
|
|
|
15820
15025
|
style="\${@this@.style}$"
|
|
15821
15026
|
class="\${@this@.classAttr}$"
|
|
15822
15027
|
dr-event-click="@this@.onClick($event)"
|
|
15028
|
+
dr-class="\${@this@.drClass}$"
|
|
15029
|
+
dr-on-init="@this@.onAElementInit($element)"
|
|
15823
15030
|
>#innerHTML#</a>`,
|
|
15824
15031
|
objFactory: (e, o, r2, constructorParam) => {
|
|
15825
15032
|
return DomRender.run({ rootObject: new A.A(...constructorParam), config });
|
|
@@ -15829,10 +15036,23 @@ var A_default = {
|
|
|
15829
15036
|
};
|
|
15830
15037
|
|
|
15831
15038
|
// src/components/appender/Appender.ts
|
|
15039
|
+
var __decorate3 = function(decorators, target, key, desc) {
|
|
15040
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15041
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15042
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15043
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15044
|
+
};
|
|
15045
|
+
var __metadata3 = function(k, v) {
|
|
15046
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15047
|
+
};
|
|
15832
15048
|
var Appender;
|
|
15833
|
-
((
|
|
15834
|
-
|
|
15049
|
+
(function(Appender_1) {
|
|
15050
|
+
Appender_1.selector = "dr-appender";
|
|
15835
15051
|
class Appender3 extends ComponentBase {
|
|
15052
|
+
constructor() {
|
|
15053
|
+
super(...arguments);
|
|
15054
|
+
this.drOptionItemVariableName = null;
|
|
15055
|
+
}
|
|
15836
15056
|
// onCreateRender(...param: any) {
|
|
15837
15057
|
// console.log('--onCreateRender')
|
|
15838
15058
|
// }
|
|
@@ -15862,13 +15082,17 @@ var Appender;
|
|
|
15862
15082
|
}
|
|
15863
15083
|
}
|
|
15864
15084
|
}
|
|
15865
|
-
|
|
15085
|
+
__decorate3([
|
|
15086
|
+
attribute({ name: "dr-option-item-variable-name", converter: (v) => v || null }),
|
|
15087
|
+
__metadata3("design:type", String)
|
|
15088
|
+
], Appender3.prototype, "drOptionItemVariableName", void 0);
|
|
15089
|
+
Appender_1.Appender = Appender3;
|
|
15866
15090
|
})(Appender || (Appender = {}));
|
|
15867
15091
|
var Appender_default = {
|
|
15868
15092
|
appender: (config) => {
|
|
15869
15093
|
return RawSet.createComponentTargetElement({
|
|
15870
15094
|
name: Appender.selector,
|
|
15871
|
-
template: '<div dr-appender="@this@.value" dr-option-strip="true">#innerHTML#</div>',
|
|
15095
|
+
template: '<div dr-appender="@this@.value" dr-option-item-variable-name="${@this@.drOptionItemVariableName}$" dr-option-strip="true">#innerHTML#</div>',
|
|
15872
15096
|
objFactory: (e, o, r2, counstructorParam) => {
|
|
15873
15097
|
return DomRender.run({ rootObject: new Appender.Appender(...counstructorParam), config });
|
|
15874
15098
|
}
|
|
@@ -16118,6 +15342,11 @@ var Details;
|
|
|
16118
15342
|
if (toggleAttribute) {
|
|
16119
15343
|
toggleAttribute?.(element.open);
|
|
16120
15344
|
}
|
|
15345
|
+
if (element.open) {
|
|
15346
|
+
this.getAttribute("onOpen")?.();
|
|
15347
|
+
} else {
|
|
15348
|
+
this.getAttribute("onClose")?.();
|
|
15349
|
+
}
|
|
16121
15350
|
}
|
|
16122
15351
|
async onInitRender(param, rawSet) {
|
|
16123
15352
|
await super.onInitRender(param, rawSet);
|
|
@@ -16238,7 +15467,7 @@ var Details_default = {
|
|
|
16238
15467
|
// src/components/forOf/ForOf.ts
|
|
16239
15468
|
var ForOf;
|
|
16240
15469
|
((_ForOf) => {
|
|
16241
|
-
_ForOf.selector = "
|
|
15470
|
+
_ForOf.selector = "dr-for-of";
|
|
16242
15471
|
class ForOf2 extends ComponentBase {
|
|
16243
15472
|
onChangeAttrRender(name, value, other) {
|
|
16244
15473
|
super.onChangeAttrRender(name, value, other);
|
|
@@ -16249,6 +15478,17 @@ var ForOf;
|
|
|
16249
15478
|
}
|
|
16250
15479
|
_ForOf.ForOf = ForOf2;
|
|
16251
15480
|
})(ForOf || (ForOf = {}));
|
|
15481
|
+
var ForOf_default = {
|
|
15482
|
+
forOf: (config) => {
|
|
15483
|
+
return RawSet.createComponentTargetElement({
|
|
15484
|
+
name: ForOf.selector,
|
|
15485
|
+
template: '<div dr-for-of="@this@.value" >#innerHTML#</div>',
|
|
15486
|
+
objFactory: (e, o, r2, counstructorParam) => {
|
|
15487
|
+
return DomRender.run({ rootObject: new ForOf.ForOf(...counstructorParam), config });
|
|
15488
|
+
}
|
|
15489
|
+
});
|
|
15490
|
+
}
|
|
15491
|
+
};
|
|
16252
15492
|
|
|
16253
15493
|
// src/components/if/If.ts
|
|
16254
15494
|
var If;
|
|
@@ -16275,7 +15515,7 @@ var If_default = {
|
|
|
16275
15515
|
if: (config) => {
|
|
16276
15516
|
return RawSet.createComponentTargetElement({
|
|
16277
15517
|
name: If.selector,
|
|
16278
|
-
template: '<div dr-if="@this@.sw" >#innerHTML#</div>',
|
|
15518
|
+
template: '<div dr-if="@this@.sw" dr-option-strip="true" >#innerHTML#</div>',
|
|
16279
15519
|
objFactory: (e, o, r2, counstructorParam) => {
|
|
16280
15520
|
return DomRender.run({ rootObject: new If.If(...counstructorParam), config });
|
|
16281
15521
|
}
|
|
@@ -16669,13 +15909,13 @@ var Radio_default = {
|
|
|
16669
15909
|
};
|
|
16670
15910
|
|
|
16671
15911
|
// src/components/router/Route.ts
|
|
16672
|
-
var
|
|
15912
|
+
var __decorate4 = function(decorators, target, key, desc) {
|
|
16673
15913
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16674
15914
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16675
15915
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16676
15916
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16677
15917
|
};
|
|
16678
|
-
var
|
|
15918
|
+
var __metadata4 = function(k, v) {
|
|
16679
15919
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
16680
15920
|
};
|
|
16681
15921
|
var Route;
|
|
@@ -16708,13 +15948,13 @@ var Route;
|
|
|
16708
15948
|
this.routerSubscription?.unsubscribe();
|
|
16709
15949
|
}
|
|
16710
15950
|
}
|
|
16711
|
-
|
|
15951
|
+
__decorate4([
|
|
16712
15952
|
attribute({ name: "value" }),
|
|
16713
|
-
|
|
15953
|
+
__metadata4("design:type", String)
|
|
16714
15954
|
], CheckerBase.prototype, "value", void 0);
|
|
16715
|
-
|
|
15955
|
+
__decorate4([
|
|
16716
15956
|
DomRenderNoProxy,
|
|
16717
|
-
|
|
15957
|
+
__metadata4("design:type", Object)
|
|
16718
15958
|
], CheckerBase.prototype, "inputDomRenderConfig", void 0);
|
|
16719
15959
|
class Match extends CheckerBase {
|
|
16720
15960
|
check(config) {
|
|
@@ -16751,13 +15991,13 @@ var Route_default = {
|
|
|
16751
15991
|
};
|
|
16752
15992
|
|
|
16753
15993
|
// src/components/select/Select.ts
|
|
16754
|
-
var
|
|
15994
|
+
var __decorate5 = function(decorators, target, key, desc) {
|
|
16755
15995
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16756
15996
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16757
15997
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16758
15998
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16759
15999
|
};
|
|
16760
|
-
var
|
|
16000
|
+
var __metadata5 = function(k, v) {
|
|
16761
16001
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
16762
16002
|
};
|
|
16763
16003
|
var Select;
|
|
@@ -16902,21 +16142,21 @@ var Select;
|
|
|
16902
16142
|
}
|
|
16903
16143
|
}
|
|
16904
16144
|
}
|
|
16905
|
-
|
|
16145
|
+
__decorate5([
|
|
16906
16146
|
attribute({ name: "value" }),
|
|
16907
|
-
|
|
16147
|
+
__metadata5("design:type", String)
|
|
16908
16148
|
], Option.prototype, "value", void 0);
|
|
16909
|
-
|
|
16149
|
+
__decorate5([
|
|
16910
16150
|
attribute({ name: "selected", converter: (v) => v !== null && v === true }),
|
|
16911
|
-
|
|
16151
|
+
__metadata5("design:type", Object)
|
|
16912
16152
|
], Option.prototype, "selected", void 0);
|
|
16913
|
-
|
|
16153
|
+
__decorate5([
|
|
16914
16154
|
attribute({ name: "disabled", converter: (v) => v !== null && v === true }),
|
|
16915
|
-
|
|
16155
|
+
__metadata5("design:type", Object)
|
|
16916
16156
|
], Option.prototype, "disabled", void 0);
|
|
16917
|
-
|
|
16157
|
+
__decorate5([
|
|
16918
16158
|
attribute({ name: "class", converter: (v) => v ? v : null }),
|
|
16919
|
-
|
|
16159
|
+
__metadata5("design:type", String)
|
|
16920
16160
|
], Option.prototype, "classAttr", void 0);
|
|
16921
16161
|
Select_1.Option = Option;
|
|
16922
16162
|
class Summary extends ComponentBase {
|
|
@@ -16981,9 +16221,9 @@ var Select;
|
|
|
16981
16221
|
}
|
|
16982
16222
|
}
|
|
16983
16223
|
}
|
|
16984
|
-
|
|
16224
|
+
__decorate5([
|
|
16985
16225
|
attribute({ name: "class", converter: (v) => v === "" ? null : v }),
|
|
16986
|
-
|
|
16226
|
+
__metadata5("design:type", String)
|
|
16987
16227
|
], Summary.prototype, "classAttr", void 0);
|
|
16988
16228
|
Select_1.Summary = Summary;
|
|
16989
16229
|
class SelectBody extends ComponentBase {
|
|
@@ -17019,13 +16259,13 @@ var Select;
|
|
|
17019
16259
|
select?.setOptions(options);
|
|
17020
16260
|
}
|
|
17021
16261
|
}
|
|
17022
|
-
|
|
16262
|
+
__decorate5([
|
|
17023
16263
|
attribute({ name: "class", converter: (v) => v === "" ? null : v }),
|
|
17024
|
-
|
|
16264
|
+
__metadata5("design:type", String)
|
|
17025
16265
|
], SelectBody.prototype, "classAttr", void 0);
|
|
17026
|
-
|
|
16266
|
+
__decorate5([
|
|
17027
16267
|
attribute({ name: "float" }),
|
|
17028
|
-
|
|
16268
|
+
__metadata5("design:type", String)
|
|
17029
16269
|
], SelectBody.prototype, "float", void 0);
|
|
17030
16270
|
Select_1.SelectBody = SelectBody;
|
|
17031
16271
|
class Select2 extends ComponentBase {
|
|
@@ -17038,6 +16278,13 @@ var Select;
|
|
|
17038
16278
|
this.selectedValues = [];
|
|
17039
16279
|
this.selectedOptions = [];
|
|
17040
16280
|
}
|
|
16281
|
+
// get value(): string | (string | null)[] | null | undefined {
|
|
16282
|
+
// return this._value;
|
|
16283
|
+
// }
|
|
16284
|
+
// set value(val: string | (string | null)[] | null | undefined) {
|
|
16285
|
+
// console.log('value set', val)
|
|
16286
|
+
// this._value = val;
|
|
16287
|
+
// }
|
|
17041
16288
|
get optionComponents() {
|
|
17042
16289
|
return this.getChildren(Option);
|
|
17043
16290
|
}
|
|
@@ -17081,13 +16328,17 @@ var Select;
|
|
|
17081
16328
|
const summaries = this.getChildren(Summary);
|
|
17082
16329
|
this.options = options;
|
|
17083
16330
|
const values = this.options.filter((it) => it.selected && !it.disabled).map((it) => it.value);
|
|
17084
|
-
this.getAttribute("changeSelected")?.(values);
|
|
17085
16331
|
summaries?.forEach((it) => {
|
|
17086
16332
|
it.setDisabled(this.disabled);
|
|
17087
16333
|
if (!this.disabled) {
|
|
17088
16334
|
it.setOptions(options);
|
|
17089
16335
|
}
|
|
17090
16336
|
});
|
|
16337
|
+
this.selectedValues = values;
|
|
16338
|
+
this.selectedOptions = this.options.filter((it) => it.selected && !it.disabled);
|
|
16339
|
+
this.value = this.selectedValues[0];
|
|
16340
|
+
this.getAttribute("onchange")?.(this.value);
|
|
16341
|
+
this.getAttribute("onchangeValues")?.(values);
|
|
17091
16342
|
}
|
|
17092
16343
|
onInitDetailsElement(detailsElement) {
|
|
17093
16344
|
this.element = detailsElement;
|
|
@@ -17101,46 +16352,73 @@ var Select;
|
|
|
17101
16352
|
this.documentClickSubscription?.unsubscribe();
|
|
17102
16353
|
this.windowBlurSubscription?.unsubscribe();
|
|
17103
16354
|
}
|
|
16355
|
+
setValue(value) {
|
|
16356
|
+
this.value = value;
|
|
16357
|
+
if (this.options) {
|
|
16358
|
+
this.options.forEach((it) => {
|
|
16359
|
+
it.selected = false;
|
|
16360
|
+
it.updateStatus();
|
|
16361
|
+
});
|
|
16362
|
+
for (let option of this.options) {
|
|
16363
|
+
if (option.value === value) {
|
|
16364
|
+
option.selected = true;
|
|
16365
|
+
if (!this.multiple) {
|
|
16366
|
+
break;
|
|
16367
|
+
}
|
|
16368
|
+
} else {
|
|
16369
|
+
option.selected = false;
|
|
16370
|
+
}
|
|
16371
|
+
option.updateStatus();
|
|
16372
|
+
}
|
|
16373
|
+
}
|
|
16374
|
+
console.log("value set", value);
|
|
16375
|
+
}
|
|
17104
16376
|
test() {
|
|
17105
16377
|
console.log("tttttttt");
|
|
17106
16378
|
}
|
|
17107
16379
|
}
|
|
17108
|
-
|
|
16380
|
+
__decorate5([
|
|
17109
16381
|
attribute({ name: "multiple", converter: (v) => v !== null }),
|
|
17110
|
-
|
|
16382
|
+
__metadata5("design:type", Object)
|
|
17111
16383
|
], Select2.prototype, "multiple", void 0);
|
|
17112
|
-
|
|
16384
|
+
__decorate5([
|
|
17113
16385
|
attribute({ name: "disabled", converter: (v) => v !== null }),
|
|
17114
|
-
|
|
16386
|
+
__metadata5("design:type", Object)
|
|
17115
16387
|
], Select2.prototype, "disabled", void 0);
|
|
17116
|
-
|
|
16388
|
+
__decorate5([
|
|
17117
16389
|
attribute({ name: "class", converter: (v) => v === "" ? null : v }),
|
|
17118
|
-
|
|
16390
|
+
__metadata5("design:type", String)
|
|
17119
16391
|
], Select2.prototype, "classAttr", void 0);
|
|
17120
|
-
|
|
16392
|
+
__decorate5([
|
|
17121
16393
|
attribute({ name: "name", converter: (v) => v === "" ? null : v }),
|
|
17122
|
-
|
|
16394
|
+
__metadata5("design:type", String)
|
|
17123
16395
|
], Select2.prototype, "name", void 0);
|
|
17124
|
-
|
|
16396
|
+
__decorate5([
|
|
17125
16397
|
DomRenderNoProxy,
|
|
17126
|
-
|
|
16398
|
+
__metadata5("design:type", typeof (_a2 = typeof HTMLDetailsElement !== "undefined" && HTMLDetailsElement) === "function" ? _a2 : Object)
|
|
17127
16399
|
], Select2.prototype, "element", void 0);
|
|
17128
|
-
|
|
16400
|
+
__decorate5([
|
|
17129
16401
|
DomRenderNoProxy,
|
|
17130
|
-
|
|
16402
|
+
__metadata5("design:type", Object)
|
|
17131
16403
|
], Select2.prototype, "documentClickSubscription", void 0);
|
|
17132
|
-
|
|
16404
|
+
__decorate5([
|
|
17133
16405
|
DomRenderNoProxy,
|
|
17134
|
-
|
|
16406
|
+
__metadata5("design:type", Object)
|
|
17135
16407
|
], Select2.prototype, "windowBlurSubscription", void 0);
|
|
17136
|
-
|
|
16408
|
+
__decorate5([
|
|
17137
16409
|
DomRenderNoProxy,
|
|
17138
|
-
|
|
16410
|
+
__metadata5("design:type", Summary)
|
|
17139
16411
|
], Select2.prototype, "summaryComponent", void 0);
|
|
17140
|
-
|
|
16412
|
+
__decorate5([
|
|
17141
16413
|
DomRenderNoProxy,
|
|
17142
|
-
|
|
16414
|
+
__metadata5("design:type", SelectBody)
|
|
17143
16415
|
], Select2.prototype, "selectBodyComponent", void 0);
|
|
16416
|
+
__decorate5([
|
|
16417
|
+
attribute("value"),
|
|
16418
|
+
__metadata5("design:type", Function),
|
|
16419
|
+
__metadata5("design:paramtypes", [String]),
|
|
16420
|
+
__metadata5("design:returntype", void 0)
|
|
16421
|
+
], Select2.prototype, "setValue", null);
|
|
17144
16422
|
Select_1.Select = Select2;
|
|
17145
16423
|
})(Select || (Select = {}));
|
|
17146
16424
|
var stateComponentFactory = (name, type) => {
|
|
@@ -17208,6 +16486,16 @@ var This;
|
|
|
17208
16486
|
constructor() {
|
|
17209
16487
|
super(...arguments);
|
|
17210
16488
|
this.if = null;
|
|
16489
|
+
this.sw = false;
|
|
16490
|
+
}
|
|
16491
|
+
setValue(value) {
|
|
16492
|
+
this.sw = false;
|
|
16493
|
+
setTimeout(() => {
|
|
16494
|
+
this.value = value;
|
|
16495
|
+
}, 0);
|
|
16496
|
+
setTimeout(() => {
|
|
16497
|
+
this.sw = true;
|
|
16498
|
+
}, 0);
|
|
17211
16499
|
}
|
|
17212
16500
|
async onInitRender(param, rawSet) {
|
|
17213
16501
|
await super.onInitRender(param, rawSet);
|
|
@@ -17218,7 +16506,7 @@ var This;
|
|
|
17218
16506
|
onChangeAttrRender(name, value, other) {
|
|
17219
16507
|
super.onChangeAttrRender(name, value, other);
|
|
17220
16508
|
if (this.equalsAttributeName(name, "value")) {
|
|
17221
|
-
this.value
|
|
16509
|
+
this.setValue(value);
|
|
17222
16510
|
}
|
|
17223
16511
|
if (this.equalsAttributeName(name, "if")) {
|
|
17224
16512
|
this.if = value;
|
|
@@ -17227,9 +16515,22 @@ var This;
|
|
|
17227
16515
|
this.createArguments = value;
|
|
17228
16516
|
}
|
|
17229
16517
|
}
|
|
17230
|
-
created(component) {
|
|
17231
|
-
component ?? (component = this.value?.obj);
|
|
17232
|
-
this.
|
|
16518
|
+
created($component, $rawSet) {
|
|
16519
|
+
this.childObject = $component ?? ($component = this.value?.obj);
|
|
16520
|
+
this.childRawSet = $rawSet;
|
|
16521
|
+
if ($component) {
|
|
16522
|
+
this.getAttribute("onCreated")?.($component);
|
|
16523
|
+
if (isOnChangeAttrRender($component)) {
|
|
16524
|
+
this.getAttributeNames().filter((it) => it.startsWith("attribute-")).forEach((it) => {
|
|
16525
|
+
var _a2;
|
|
16526
|
+
const attrName = it.replace(/^attribute-/, "");
|
|
16527
|
+
const attrValue = this.getAttribute(it);
|
|
16528
|
+
(_a2 = $rawSet.dataSet.render).attribute ?? (_a2.attribute = {});
|
|
16529
|
+
$rawSet.dataSet.render.attribute[attrName] = attrValue;
|
|
16530
|
+
$component.onChangeAttrRender(attrName, attrValue, { rawSet: $rawSet });
|
|
16531
|
+
});
|
|
16532
|
+
}
|
|
16533
|
+
}
|
|
17233
16534
|
}
|
|
17234
16535
|
}
|
|
17235
16536
|
_This.This = This2;
|
|
@@ -17238,7 +16539,11 @@ var This_default = {
|
|
|
17238
16539
|
this: (config) => {
|
|
17239
16540
|
return RawSet.createComponentTargetElement({
|
|
17240
16541
|
name: This.selector,
|
|
17241
|
-
template:
|
|
16542
|
+
template: `
|
|
16543
|
+
<dr-if value="\${@this@.sw}$">
|
|
16544
|
+
<div dr-this="@this@.value" dr-detect-option-if="@this@?.value && @this@?.if" dr-option-strip="true" dr-on-create:arguments="@this@.createArguments" dr-on-create:callback="@this@?.created?.($component, $rawSet)">#innerHTML#</div>
|
|
16545
|
+
</dr-if>
|
|
16546
|
+
`,
|
|
17242
16547
|
objFactory: (e, o, r2, counstructorParam) => {
|
|
17243
16548
|
return DomRender.run({ rootObject: new This.This(...counstructorParam), config });
|
|
17244
16549
|
}
|
|
@@ -17322,7 +16627,8 @@ var drComponent = {
|
|
|
17322
16627
|
...Input_default,
|
|
17323
16628
|
...Route_default,
|
|
17324
16629
|
...RouterOutlet_default,
|
|
17325
|
-
...A_default
|
|
16630
|
+
...A_default,
|
|
16631
|
+
...ForOf_default
|
|
17326
16632
|
};
|
|
17327
16633
|
|
|
17328
16634
|
// src/DomRender.ts
|
|
@@ -17490,6 +16796,13 @@ var Appender2 = class {
|
|
|
17490
16796
|
}
|
|
17491
16797
|
};
|
|
17492
16798
|
}
|
|
16799
|
+
get(key) {
|
|
16800
|
+
const o = this.keyMap.get(key);
|
|
16801
|
+
if (o !== void 0) {
|
|
16802
|
+
return this[o];
|
|
16803
|
+
}
|
|
16804
|
+
return void 0;
|
|
16805
|
+
}
|
|
17493
16806
|
set(key, ...v) {
|
|
17494
16807
|
const o = this.keyMap.get(key);
|
|
17495
16808
|
if (o !== void 0) {
|
|
@@ -17502,7 +16815,7 @@ var Appender2 = class {
|
|
|
17502
16815
|
delete(key) {
|
|
17503
16816
|
const o = this.keyMap.get(key);
|
|
17504
16817
|
if (o !== void 0) {
|
|
17505
|
-
this[o] = [];
|
|
16818
|
+
this[o] = this[o].map((it) => void 0);
|
|
17506
16819
|
this.keyMap.delete(key);
|
|
17507
16820
|
}
|
|
17508
16821
|
}
|
|
@@ -17997,22 +17310,6 @@ export {
|
|
|
17997
17310
|
};
|
|
17998
17311
|
/*! Bundled license information:
|
|
17999
17312
|
|
|
18000
|
-
reflect-metadata/Reflect.js:
|
|
18001
|
-
(*! *****************************************************************************
|
|
18002
|
-
Copyright (C) Microsoft. All rights reserved.
|
|
18003
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
18004
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
18005
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18006
|
-
|
|
18007
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
18008
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
18009
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
18010
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
18011
|
-
|
|
18012
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
18013
|
-
and limitations under the License.
|
|
18014
|
-
***************************************************************************** *)
|
|
18015
|
-
|
|
18016
17313
|
reflect-metadata/Reflect.js:
|
|
18017
17314
|
(*! *****************************************************************************
|
|
18018
17315
|
Copyright (C) Microsoft. All rights reserved.
|