@symbo.ls/create 2.11.319 → 2.11.322
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bundle/index.js +36 -26
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/prepare.js +1 -1
- package/package.json +2 -2
- package/src/index.js +8 -0
- package/src/prepare.js +2 -2
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -482,7 +482,7 @@ var require_object = __commonJS({
|
|
|
482
482
|
clone: () => clone,
|
|
483
483
|
deepClone: () => deepClone4,
|
|
484
484
|
deepCloneExclude: () => deepCloneExclude,
|
|
485
|
-
|
|
485
|
+
deepCloneWithExtend: () => deepCloneWithExtend2,
|
|
486
486
|
deepContains: () => deepContains,
|
|
487
487
|
deepDestringify: () => deepDestringify,
|
|
488
488
|
deepDiff: () => deepDiff,
|
|
@@ -613,7 +613,7 @@ var require_object = __commonJS({
|
|
|
613
613
|
}
|
|
614
614
|
return o;
|
|
615
615
|
};
|
|
616
|
-
var
|
|
616
|
+
var deepCloneWithExtend2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
617
617
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
618
618
|
for (const prop in obj) {
|
|
619
619
|
if (prop === "__proto__")
|
|
@@ -624,7 +624,7 @@ var require_object = __commonJS({
|
|
|
624
624
|
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
625
625
|
continue;
|
|
626
626
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
627
|
-
o[prop] =
|
|
627
|
+
o[prop] = deepCloneWithExtend2(objProp, excludeFrom, cleanUndefined);
|
|
628
628
|
} else
|
|
629
629
|
o[prop] = objProp;
|
|
630
630
|
}
|
|
@@ -1842,7 +1842,7 @@ var require_cjs2 = __commonJS({
|
|
|
1842
1842
|
clone: () => clone,
|
|
1843
1843
|
deepClone: () => deepClone22,
|
|
1844
1844
|
deepCloneExclude: () => deepCloneExclude,
|
|
1845
|
-
deepCloneWithExtnd: () =>
|
|
1845
|
+
deepCloneWithExtnd: () => deepCloneWithExtnd,
|
|
1846
1846
|
deepContains: () => deepContains,
|
|
1847
1847
|
deepDestringify: () => deepDestringify,
|
|
1848
1848
|
deepDiff: () => deepDiff,
|
|
@@ -1973,7 +1973,7 @@ var require_cjs2 = __commonJS({
|
|
|
1973
1973
|
}
|
|
1974
1974
|
return o;
|
|
1975
1975
|
};
|
|
1976
|
-
var
|
|
1976
|
+
var deepCloneWithExtnd = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
1977
1977
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
1978
1978
|
for (const prop in obj) {
|
|
1979
1979
|
if (prop === "__proto__")
|
|
@@ -1984,7 +1984,7 @@ var require_cjs2 = __commonJS({
|
|
|
1984
1984
|
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
1985
1985
|
continue;
|
|
1986
1986
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
1987
|
-
o[prop] =
|
|
1987
|
+
o[prop] = deepCloneWithExtnd(objProp, excludeFrom, cleanUndefined);
|
|
1988
1988
|
} else
|
|
1989
1989
|
o[prop] = objProp;
|
|
1990
1990
|
}
|
|
@@ -7690,12 +7690,6 @@ var init_spacing = __esm({
|
|
|
7690
7690
|
SPACING = {
|
|
7691
7691
|
ratio: 1.618,
|
|
7692
7692
|
subSequence: true
|
|
7693
|
-
// '@tabletS': {
|
|
7694
|
-
// ratio: 1.45
|
|
7695
|
-
// },
|
|
7696
|
-
// '@mobileM': {
|
|
7697
|
-
// ratio: 1.2
|
|
7698
|
-
// }
|
|
7699
7693
|
};
|
|
7700
7694
|
}
|
|
7701
7695
|
});
|
|
@@ -13172,12 +13166,12 @@ var require_methods = __commonJS({
|
|
|
13172
13166
|
};
|
|
13173
13167
|
var set4 = function(val, options = {}) {
|
|
13174
13168
|
const state = this;
|
|
13175
|
-
const value2 = (0, import_utils39.
|
|
13169
|
+
const value2 = (0, import_utils39.deepCloneWithExtend)(val);
|
|
13176
13170
|
return state.clean({ preventStateUpdate: true, ...options }).update(value2, { replace: true, ...options });
|
|
13177
13171
|
};
|
|
13178
13172
|
var reset = function(options = {}) {
|
|
13179
13173
|
const state = this;
|
|
13180
|
-
const value2 = (0, import_utils39.
|
|
13174
|
+
const value2 = (0, import_utils39.deepCloneWithExtend)(state.parse());
|
|
13181
13175
|
return state.set(value2, { replace: true, ...options });
|
|
13182
13176
|
};
|
|
13183
13177
|
var apply = function(func, options = {}) {
|
|
@@ -13291,7 +13285,7 @@ var require_inherit = __commonJS({
|
|
|
13291
13285
|
if ((0, import_utils39.isUndefined)(inheritedState))
|
|
13292
13286
|
return element.state;
|
|
13293
13287
|
if ((0, import_utils39.is)(inheritedState)("object", "array")) {
|
|
13294
|
-
return (0, import_utils39.
|
|
13288
|
+
return (0, import_utils39.deepCloneWithExtend)(inheritedState, import_ignore.IGNORE_STATE_PARAMS);
|
|
13295
13289
|
} else if ((0, import_utils39.is)(inheritedState)("string", "number", "boolean")) {
|
|
13296
13290
|
ref.__stateType = typeof inheritedState;
|
|
13297
13291
|
return { value: inheritedState };
|
|
@@ -13509,7 +13503,7 @@ var require_create2 = __commonJS({
|
|
|
13509
13503
|
if (objectizeState === false)
|
|
13510
13504
|
return parent.state || {};
|
|
13511
13505
|
else
|
|
13512
|
-
element.state = (0, import_utils39.
|
|
13506
|
+
element.state = (0, import_utils39.deepCloneWithExtend)(objectizeState, import_ignore.IGNORE_STATE_PARAMS);
|
|
13513
13507
|
const whatInitReturns = (0, import_event.triggerEventOn)("stateInit", element, options);
|
|
13514
13508
|
if (whatInitReturns === false)
|
|
13515
13509
|
return element.state;
|
|
@@ -13528,7 +13522,7 @@ var require_create2 = __commonJS({
|
|
|
13528
13522
|
const { __ref: ref } = state;
|
|
13529
13523
|
if (!ref)
|
|
13530
13524
|
return;
|
|
13531
|
-
const dependentState = (0, import_utils39.
|
|
13525
|
+
const dependentState = (0, import_utils39.deepCloneWithExtend)(ref, import_ignore.IGNORE_STATE_PARAMS);
|
|
13532
13526
|
const newDepends = { [element.key]: dependentState };
|
|
13533
13527
|
ref.__depends = (0, import_utils39.isObject)(ref.__depends) ? { ...ref.__depends, ...newDepends } : newDepends;
|
|
13534
13528
|
return dependentState;
|
|
@@ -14817,8 +14811,8 @@ var require_component = __commonJS({
|
|
|
14817
14811
|
return newElem;
|
|
14818
14812
|
};
|
|
14819
14813
|
var extendizeByKey = (element, parent, key) => {
|
|
14820
|
-
const { context, tag, extend, props: props4, attr, state, childExtend, childProps, on: on2, if: condition } = element;
|
|
14821
|
-
const hasComponentAttrs = extend || childExtend || props4 || state || on2 || condition || attr;
|
|
14814
|
+
const { context, tag, extend, props: props4, attr, state, childExtend, childProps, on: on2, if: condition, data } = element;
|
|
14815
|
+
const hasComponentAttrs = extend || childExtend || props4 || state || on2 || condition || attr || data;
|
|
14822
14816
|
const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? key.split("_")[0] : key.includes(".") ? key.split(".")[0] : [key];
|
|
14823
14817
|
const isExtendKeyComponent = context && context.components[extendFromKey];
|
|
14824
14818
|
if (element === isExtendKeyComponent)
|
|
@@ -17075,9 +17069,8 @@ var require_create4 = __commonJS({
|
|
|
17075
17069
|
return element;
|
|
17076
17070
|
};
|
|
17077
17071
|
var redefineElement = (element, parent, key, options) => {
|
|
17078
|
-
var _a, _b;
|
|
17079
17072
|
const elementWrapper = createBasedOnType(element, parent, key, options);
|
|
17080
|
-
if (options.syntaxv3 ||
|
|
17073
|
+
if (options.syntaxv3 || element.props && element.props.syntaxv3 || parent && parent.props && parent.props.syntaxv3) {
|
|
17081
17074
|
element.props.syntaxv3 = true;
|
|
17082
17075
|
return (0, import_component.createValidDomqlObjectFromSugar)(element, parent, key, options);
|
|
17083
17076
|
} else if ((0, import_component.checkIfKeyIsComponent)(key)) {
|
|
@@ -17140,6 +17133,7 @@ var require_create4 = __commonJS({
|
|
|
17140
17133
|
(0, import_render.assignNode)(element, parent, key, attachOptions);
|
|
17141
17134
|
(0, import_event.triggerEventOn)("renderRouter", element, options);
|
|
17142
17135
|
(0, import_event.triggerEventOn)("render", element, options);
|
|
17136
|
+
(0, import_event.triggerEventOn)("done", element, options);
|
|
17143
17137
|
};
|
|
17144
17138
|
var checkIfPrimitive = (element) => (0, import_utils39.is)(element)("string", "number");
|
|
17145
17139
|
var applyValueAsText = (element, parent, key) => {
|
|
@@ -20282,7 +20276,7 @@ var init_prepare = __esm({
|
|
|
20282
20276
|
utils2.deepMerge(state, options.state);
|
|
20283
20277
|
if (App && App.state)
|
|
20284
20278
|
(0, import_utils16.deepMerge)(state, App.state);
|
|
20285
|
-
return (0, import_utils16.
|
|
20279
|
+
return (0, import_utils16.deepCloneWithExtend)(state);
|
|
20286
20280
|
};
|
|
20287
20281
|
preparePages = (options) => {
|
|
20288
20282
|
const pages = options.pages;
|
|
@@ -20399,7 +20393,7 @@ var init_createDomql = __esm({
|
|
|
20399
20393
|
});
|
|
20400
20394
|
|
|
20401
20395
|
// dist/cjs/index.js
|
|
20402
|
-
var __create5, __defProp11, __getOwnPropDesc11, __getOwnPropNames11, __getProtoOf5, __hasOwnProp11, __export11, __copyProps11, __toESM5, __toCommonJS11, src_exports3, import_utils18, utils3, import_router4, import_ferchOnCreate, import_syncExtend2, import_options2, import_dynamic2, import_createDomql, SYMBOLS_KEY2, mergeWithLocalFile2, create, createAsync, createSync, src_default2;
|
|
20396
|
+
var __create5, __defProp11, __getOwnPropDesc11, __getOwnPropNames11, __getProtoOf5, __hasOwnProp11, __export11, __copyProps11, __toESM5, __toCommonJS11, src_exports3, import_utils18, utils3, import_router4, import_ferchOnCreate, import_syncExtend2, import_options2, import_dynamic2, import_createDomql, SYMBOLS_KEY2, mergeWithLocalFile2, create, createAsync, createSync, createSkeleton, src_default2;
|
|
20403
20397
|
var init_cjs = __esm({
|
|
20404
20398
|
"dist/cjs/index.js"() {
|
|
20405
20399
|
"use strict";
|
|
@@ -20434,6 +20428,7 @@ var init_cjs = __esm({
|
|
|
20434
20428
|
__export11(src_exports3, {
|
|
20435
20429
|
create: () => create,
|
|
20436
20430
|
createAsync: () => createAsync,
|
|
20431
|
+
createSkeleton: () => createSkeleton,
|
|
20437
20432
|
createSync: () => createSync,
|
|
20438
20433
|
default: () => src_default2
|
|
20439
20434
|
});
|
|
@@ -20476,6 +20471,13 @@ var init_cjs = __esm({
|
|
|
20476
20471
|
redefinedOptions.on.create(domqlApp, redefinedOptions);
|
|
20477
20472
|
return domqlApp;
|
|
20478
20473
|
};
|
|
20474
|
+
createSkeleton = (App, options = import_options2.default, optionsExternalFile) => {
|
|
20475
|
+
return create(
|
|
20476
|
+
App,
|
|
20477
|
+
(0, import_utils18.deepMerge)({ domqlOptions: { onlyResolveExtends: true } }, options),
|
|
20478
|
+
optionsExternalFile
|
|
20479
|
+
);
|
|
20480
|
+
};
|
|
20479
20481
|
src_default2 = create;
|
|
20480
20482
|
}
|
|
20481
20483
|
});
|
|
@@ -24088,8 +24090,8 @@ var init_Tooltip = __esm({
|
|
|
24088
24090
|
const { Tooltip: Tooltip2, TooltipHidden: TooltipHidden2 } = el;
|
|
24089
24091
|
const TooltipElem = Tooltip2 || TooltipHidden2;
|
|
24090
24092
|
if (!TooltipElem || TooltipElem)
|
|
24091
|
-
return
|
|
24092
|
-
const TooltipActive =
|
|
24093
|
+
return;
|
|
24094
|
+
const TooltipActive = TooltipElem && TooltipElem.props && TooltipElem.props[".active"];
|
|
24093
24095
|
return {
|
|
24094
24096
|
position: "relative",
|
|
24095
24097
|
zIndex: 999,
|
|
@@ -27228,6 +27230,7 @@ var src_exports4 = {};
|
|
|
27228
27230
|
__export(src_exports4, {
|
|
27229
27231
|
create: () => create2,
|
|
27230
27232
|
createAsync: () => createAsync2,
|
|
27233
|
+
createSkeleton: () => createSkeleton2,
|
|
27231
27234
|
createSync: () => createSync2,
|
|
27232
27235
|
default: () => src_default3
|
|
27233
27236
|
});
|
|
@@ -27496,7 +27499,7 @@ var prepareState2 = (options, App) => {
|
|
|
27496
27499
|
utilImports_exports.deepMerge(state, options.state);
|
|
27497
27500
|
if (App && App.state)
|
|
27498
27501
|
(0, import_utils36.deepMerge)(state, App.state);
|
|
27499
|
-
return (0, import_utils36.
|
|
27502
|
+
return (0, import_utils36.deepCloneWithExtend)(state);
|
|
27500
27503
|
};
|
|
27501
27504
|
var preparePages2 = (options) => {
|
|
27502
27505
|
const pages = options.pages;
|
|
@@ -27595,4 +27598,11 @@ var createSync2 = async (App, options = options_default2, optionsExternalFile) =
|
|
|
27595
27598
|
redefinedOptions.on.create(domqlApp, redefinedOptions);
|
|
27596
27599
|
return domqlApp;
|
|
27597
27600
|
};
|
|
27601
|
+
var createSkeleton2 = (App, options = options_default2, optionsExternalFile) => {
|
|
27602
|
+
return create2(
|
|
27603
|
+
App,
|
|
27604
|
+
(0, import_utils38.deepMerge)({ domqlOptions: { onlyResolveExtends: true } }, options),
|
|
27605
|
+
optionsExternalFile
|
|
27606
|
+
);
|
|
27607
|
+
};
|
|
27598
27608
|
var src_default3 = create2;
|
package/dist/cjs/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var src_exports = {};
|
|
|
30
30
|
__export(src_exports, {
|
|
31
31
|
create: () => create,
|
|
32
32
|
createAsync: () => createAsync,
|
|
33
|
+
createSkeleton: () => createSkeleton,
|
|
33
34
|
createSync: () => createSync,
|
|
34
35
|
default: () => src_default
|
|
35
36
|
});
|
|
@@ -72,4 +73,11 @@ const createSync = async (App, options = import_options.default, optionsExternal
|
|
|
72
73
|
redefinedOptions.on.create(domqlApp, redefinedOptions);
|
|
73
74
|
return domqlApp;
|
|
74
75
|
};
|
|
76
|
+
const createSkeleton = (App, options = import_options.default, optionsExternalFile) => {
|
|
77
|
+
return create(
|
|
78
|
+
App,
|
|
79
|
+
(0, import_utils.deepMerge)({ domqlOptions: { onlyResolveExtends: true } }, options),
|
|
80
|
+
optionsExternalFile
|
|
81
|
+
);
|
|
82
|
+
};
|
|
75
83
|
var src_default = create;
|
package/dist/cjs/prepare.js
CHANGED
|
@@ -77,7 +77,7 @@ const prepareState = (options, App) => {
|
|
|
77
77
|
utils.deepMerge(state, options.state);
|
|
78
78
|
if (App && App.state)
|
|
79
79
|
(0, import_utils.deepMerge)(state, App.state);
|
|
80
|
-
return (0, import_utils.
|
|
80
|
+
return (0, import_utils.deepCloneWithExtend)(state);
|
|
81
81
|
};
|
|
82
82
|
const preparePages = (options) => {
|
|
83
83
|
const pages = options.pages;
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -54,4 +54,12 @@ export const createSync = async (App, options = DEFAULT_CREATE_OPTIONS, optionsE
|
|
|
54
54
|
return domqlApp
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
export const createSkeleton = (App, options = DEFAULT_CREATE_OPTIONS, optionsExternalFile) => {
|
|
58
|
+
return create(
|
|
59
|
+
App,
|
|
60
|
+
deepMerge({ domqlOptions: { onlyResolveExtends: true } }, options),
|
|
61
|
+
optionsExternalFile
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
57
65
|
export default create
|
package/src/prepare.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { isString, deepMerge,
|
|
3
|
+
import { isString, deepMerge, deepCloneWithExtend } from '@domql/utils'
|
|
4
4
|
import { initEmotion } from './initEmotion'
|
|
5
5
|
|
|
6
6
|
import * as uikit from '@symbo.ls/uikit'
|
|
@@ -44,7 +44,7 @@ export const prepareState = (options, App) => {
|
|
|
44
44
|
const state = {}
|
|
45
45
|
if (options.state) utils.deepMerge(state, options.state)
|
|
46
46
|
if (App && App.state) deepMerge(state, App.state)
|
|
47
|
-
return
|
|
47
|
+
return deepCloneWithExtend(state)
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export const preparePages = options => {
|