yy-forms 1.0.39 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -3578,6 +3578,24 @@ var defaultSettings = [{
|
|
|
3578
3578
|
// widgets: saves,
|
|
3579
3579
|
// },
|
|
3580
3580
|
];
|
|
3581
|
+
var USdefaultSettings = [{
|
|
3582
|
+
"title": "Basic Components",
|
|
3583
|
+
"widgets": USelements,
|
|
3584
|
+
"show": true,
|
|
3585
|
+
"useCommon": true // TODO: Should include common components?
|
|
3586
|
+
}, {
|
|
3587
|
+
"title": "Advanced Components",
|
|
3588
|
+
"widgets": USadvancedElements
|
|
3589
|
+
}
|
|
3590
|
+
// {
|
|
3591
|
+
// "title": "Layout Components",
|
|
3592
|
+
// "widgets": layouts,
|
|
3593
|
+
// },
|
|
3594
|
+
// {
|
|
3595
|
+
// "title": "Templates",
|
|
3596
|
+
// "widgets": saves,
|
|
3597
|
+
// },
|
|
3598
|
+
];
|
|
3581
3599
|
var defaultGlobalSettings = {
|
|
3582
3600
|
type: 'object',
|
|
3583
3601
|
properties: {
|
|
@@ -3690,6 +3708,7 @@ function GlobalSettings(_ref) {
|
|
|
3690
3708
|
return onDataChange(v);
|
|
3691
3709
|
}
|
|
3692
3710
|
},
|
|
3711
|
+
locale: 'en',
|
|
3693
3712
|
widgets: _objectSpread2(_objectSpread2({}, globalWidgets), widgets),
|
|
3694
3713
|
mapping: mapping
|
|
3695
3714
|
}));
|
|
@@ -3916,7 +3935,7 @@ function ItemSettings(_ref) {
|
|
|
3916
3935
|
var _settings = Array.isArray(settings) ? [].concat(_toConsumableArray(settings), [{
|
|
3917
3936
|
widgets: [].concat(_toConsumableArray(elementsInfo), _toConsumableArray(advancedElementsInfo), _toConsumableArray(layoutsInfo))
|
|
3918
3937
|
}]) // TODO: 不是最优解
|
|
3919
|
-
: defaultSettings;
|
|
3938
|
+
: i18n.language === 'cn' ? defaultSettings : USdefaultSettings;
|
|
3920
3939
|
var _commonSettings = isObject(commonSettings) ? commonSettings : i18n.language === 'cn' ? defaultCommonSettings : USdefaultCommonSettings;
|
|
3921
3940
|
var widgetList = getWidgetList(_settings, _commonSettings);
|
|
3922
3941
|
var widgetName = getWidgetName(item.schema, globalMapping);
|
|
@@ -3959,6 +3978,7 @@ function ItemSettings(_ref) {
|
|
|
3959
3978
|
schema: settingSchema,
|
|
3960
3979
|
widgets: _objectSpread2(_objectSpread2({}, _widgets), widgets),
|
|
3961
3980
|
mapping: globalMapping,
|
|
3981
|
+
locale: 'en',
|
|
3962
3982
|
watch: {
|
|
3963
3983
|
'#': function _(v) {
|
|
3964
3984
|
return setTimeout(function () {
|
package/dist/index.js
CHANGED
|
@@ -3605,6 +3605,24 @@ var defaultSettings = [{
|
|
|
3605
3605
|
// widgets: saves,
|
|
3606
3606
|
// },
|
|
3607
3607
|
];
|
|
3608
|
+
var USdefaultSettings = [{
|
|
3609
|
+
"title": "Basic Components",
|
|
3610
|
+
"widgets": USelements,
|
|
3611
|
+
"show": true,
|
|
3612
|
+
"useCommon": true // TODO: Should include common components?
|
|
3613
|
+
}, {
|
|
3614
|
+
"title": "Advanced Components",
|
|
3615
|
+
"widgets": USadvancedElements
|
|
3616
|
+
}
|
|
3617
|
+
// {
|
|
3618
|
+
// "title": "Layout Components",
|
|
3619
|
+
// "widgets": layouts,
|
|
3620
|
+
// },
|
|
3621
|
+
// {
|
|
3622
|
+
// "title": "Templates",
|
|
3623
|
+
// "widgets": saves,
|
|
3624
|
+
// },
|
|
3625
|
+
];
|
|
3608
3626
|
var defaultGlobalSettings = {
|
|
3609
3627
|
type: 'object',
|
|
3610
3628
|
properties: {
|
|
@@ -3717,6 +3735,7 @@ function GlobalSettings(_ref) {
|
|
|
3717
3735
|
return onDataChange(v);
|
|
3718
3736
|
}
|
|
3719
3737
|
},
|
|
3738
|
+
locale: 'en',
|
|
3720
3739
|
widgets: _objectSpread2(_objectSpread2({}, globalWidgets), widgets),
|
|
3721
3740
|
mapping: mapping
|
|
3722
3741
|
}));
|
|
@@ -3943,7 +3962,7 @@ function ItemSettings(_ref) {
|
|
|
3943
3962
|
var _settings = Array.isArray(settings) ? [].concat(_toConsumableArray(settings), [{
|
|
3944
3963
|
widgets: [].concat(_toConsumableArray(elementsInfo), _toConsumableArray(advancedElementsInfo), _toConsumableArray(layoutsInfo))
|
|
3945
3964
|
}]) // TODO: 不是最优解
|
|
3946
|
-
: defaultSettings;
|
|
3965
|
+
: i18n.language === 'cn' ? defaultSettings : USdefaultSettings;
|
|
3947
3966
|
var _commonSettings = isObject(commonSettings) ? commonSettings : i18n.language === 'cn' ? defaultCommonSettings : USdefaultCommonSettings;
|
|
3948
3967
|
var widgetList = getWidgetList(_settings, _commonSettings);
|
|
3949
3968
|
var widgetName = getWidgetName(item.schema, globalMapping);
|
|
@@ -3986,6 +4005,7 @@ function ItemSettings(_ref) {
|
|
|
3986
4005
|
schema: settingSchema,
|
|
3987
4006
|
widgets: _objectSpread2(_objectSpread2({}, _widgets), widgets),
|
|
3988
4007
|
mapping: globalMapping,
|
|
4008
|
+
locale: 'en',
|
|
3989
4009
|
watch: {
|
|
3990
4010
|
'#': function _(v) {
|
|
3991
4011
|
return setTimeout(function () {
|
package/package.json
CHANGED
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
elements,
|
|
11
11
|
USelements,
|
|
12
12
|
layouts,
|
|
13
|
-
USlayouts
|
|
13
|
+
USlayouts,
|
|
14
|
+
USdefaultSettings
|
|
14
15
|
} from '../../settings';
|
|
15
16
|
|
|
16
17
|
import { isObject, mergeInOrder } from '../../utils';
|
|
@@ -100,10 +101,10 @@ export default function ItemSettings({ widgets }) {
|
|
|
100
101
|
...settings,
|
|
101
102
|
{ widgets: [...elementsInfo, ...advancedElementsInfo, ...layoutsInfo] },
|
|
102
103
|
] // TODO: 不是最优解
|
|
103
|
-
: defaultSettings;
|
|
104
|
+
: i18n.language === 'cn' ? defaultSettings : USdefaultSettings;
|
|
104
105
|
const _commonSettings = isObject(commonSettings)
|
|
105
106
|
? commonSettings
|
|
106
|
-
: i18n.language === 'cn' ?defaultCommonSettings : USdefaultCommonSettings;
|
|
107
|
+
: i18n.language === 'cn' ? defaultCommonSettings : USdefaultCommonSettings;
|
|
107
108
|
const widgetList = getWidgetList(_settings, _commonSettings);
|
|
108
109
|
const widgetName = getWidgetName(item.schema, globalMapping);
|
|
109
110
|
const element = widgetList.find(e => e.widget === widgetName) || {}; // 有可能会没有找到
|
|
@@ -144,6 +145,7 @@ export default function ItemSettings({ widgets }) {
|
|
|
144
145
|
schema={settingSchema}
|
|
145
146
|
widgets={{ ..._widgets, ...widgets }}
|
|
146
147
|
mapping={globalMapping}
|
|
148
|
+
locale={'en'}
|
|
147
149
|
watch={{
|
|
148
150
|
'#': v => setTimeout(() => onDataChange(v), 0),
|
|
149
151
|
}}
|
package/src/settings/index.js
CHANGED
|
@@ -1941,6 +1941,27 @@ export const defaultSettings = [
|
|
|
1941
1941
|
// },
|
|
1942
1942
|
];
|
|
1943
1943
|
|
|
1944
|
+
export const USdefaultSettings = [
|
|
1945
|
+
{
|
|
1946
|
+
"title": "Basic Components",
|
|
1947
|
+
"widgets": USelements,
|
|
1948
|
+
"show": true,
|
|
1949
|
+
"useCommon": true, // TODO: Should include common components?
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
"title": "Advanced Components",
|
|
1953
|
+
"widgets": USadvancedElements,
|
|
1954
|
+
},
|
|
1955
|
+
// {
|
|
1956
|
+
// "title": "Layout Components",
|
|
1957
|
+
// "widgets": layouts,
|
|
1958
|
+
// },
|
|
1959
|
+
// {
|
|
1960
|
+
// "title": "Templates",
|
|
1961
|
+
// "widgets": saves,
|
|
1962
|
+
// },
|
|
1963
|
+
]
|
|
1964
|
+
|
|
1944
1965
|
|
|
1945
1966
|
export const defaultGlobalSettings = {
|
|
1946
1967
|
type: 'object',
|