@lcap/nasl 4.1.0-creator.3 → 4.1.0-rc.10

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.
Files changed (146) hide show
  1. package/out/generator/genBundleFiles.d.ts +0 -1
  2. package/out/generator/genBundleFiles.d.ts.map +1 -1
  3. package/out/generator/genBundleFiles.js +4 -7
  4. package/out/generator/genBundleFiles.js.map +1 -1
  5. package/out/generator/index.d.ts +0 -1
  6. package/out/generator/index.d.ts.map +1 -1
  7. package/out/generator/index.js +0 -1
  8. package/out/generator/index.js.map +1 -1
  9. package/out/generator/release-body/data.d.ts.map +1 -1
  10. package/out/generator/release-body/data.js +0 -2
  11. package/out/generator/release-body/data.js.map +1 -1
  12. package/out/generator/release-body/utils.d.ts +3 -7
  13. package/out/generator/release-body/utils.d.ts.map +1 -1
  14. package/out/generator/release-body/utils.js +2 -4
  15. package/out/generator/release-body/utils.js.map +1 -1
  16. package/out/index.d.ts +1 -1
  17. package/out/index.d.ts.map +1 -1
  18. package/out/index.js +1 -2
  19. package/out/index.js.map +1 -1
  20. package/out/natural/index.d.ts +0 -2
  21. package/out/natural/index.d.ts.map +1 -1
  22. package/out/natural/index.js +0 -4
  23. package/out/natural/index.js.map +1 -1
  24. package/out/natural/parseNaturalTS.d.ts +8 -5
  25. package/out/natural/parseNaturalTS.d.ts.map +1 -1
  26. package/out/natural/parseNaturalTS.js +50 -200
  27. package/out/natural/parseNaturalTS.js.map +1 -1
  28. package/out/natural/transformTS2UI.d.ts.map +1 -1
  29. package/out/natural/transformTS2UI.js +17 -15
  30. package/out/natural/transformTS2UI.js.map +1 -1
  31. package/out/natural/transformTSCode.d.ts.map +1 -1
  32. package/out/natural/transformTSCode.js +4 -4
  33. package/out/natural/transformTSCode.js.map +1 -1
  34. package/out/natural/transforms/registerTransform.d.ts +8 -0
  35. package/out/natural/transforms/registerTransform.d.ts.map +1 -0
  36. package/out/natural/transforms/registerTransform.js +24 -0
  37. package/out/natural/transforms/registerTransform.js.map +1 -0
  38. package/out/natural/transforms/transform2Entity.d.ts +1 -3
  39. package/out/natural/transforms/transform2Entity.d.ts.map +1 -1
  40. package/out/natural/transforms/transform2Entity.js +5 -7
  41. package/out/natural/transforms/transform2Entity.js.map +1 -1
  42. package/out/natural/transforms/transform2Enum.d.ts +1 -3
  43. package/out/natural/transforms/transform2Enum.d.ts.map +1 -1
  44. package/out/natural/transforms/transform2Enum.js +3 -3
  45. package/out/natural/transforms/transform2Enum.js.map +1 -1
  46. package/out/natural/transforms/transform2GlobalLogicDeclaration.d.ts +1 -3
  47. package/out/natural/transforms/transform2GlobalLogicDeclaration.d.ts.map +1 -1
  48. package/out/natural/transforms/transform2GlobalLogicDeclaration.js +3 -3
  49. package/out/natural/transforms/transform2GlobalLogicDeclaration.js.map +1 -1
  50. package/out/natural/transforms/transform2Logic.d.ts +1 -9
  51. package/out/natural/transforms/transform2Logic.d.ts.map +1 -1
  52. package/out/natural/transforms/transform2Logic.js +7 -39
  53. package/out/natural/transforms/transform2Logic.js.map +1 -1
  54. package/out/natural/transforms/transform2LogicItem.d.ts +29 -59
  55. package/out/natural/transforms/transform2LogicItem.d.ts.map +1 -1
  56. package/out/natural/transforms/transform2LogicItem.js +199 -375
  57. package/out/natural/transforms/transform2LogicItem.js.map +1 -1
  58. package/out/natural/transforms/transform2Structure.d.ts +1 -3
  59. package/out/natural/transforms/transform2Structure.d.ts.map +1 -1
  60. package/out/natural/transforms/transform2Structure.js +4 -4
  61. package/out/natural/transforms/transform2Structure.js.map +1 -1
  62. package/out/natural/transforms/transform2TypeAnnotation.d.ts +1 -3
  63. package/out/natural/transforms/transform2TypeAnnotation.d.ts.map +1 -1
  64. package/out/natural/transforms/transform2TypeAnnotation.js +11 -10
  65. package/out/natural/transforms/transform2TypeAnnotation.js.map +1 -1
  66. package/out/natural/transforms/transform2Variable.d.ts +1 -6
  67. package/out/natural/transforms/transform2Variable.d.ts.map +1 -1
  68. package/out/natural/transforms/transform2Variable.js +6 -30
  69. package/out/natural/transforms/transform2Variable.js.map +1 -1
  70. package/out/natural/transforms/utils.d.ts +3 -22
  71. package/out/natural/transforms/utils.d.ts.map +1 -1
  72. package/out/natural/transforms/utils.js +12 -80
  73. package/out/natural/transforms/utils.js.map +1 -1
  74. package/out/server/OQL/sqlFunctions.json +8 -696
  75. package/out/server/index.d.ts +0 -1
  76. package/out/server/index.d.ts.map +1 -1
  77. package/out/server/index.js +0 -1
  78. package/out/server/index.js.map +1 -1
  79. package/out/server/naslServer.d.ts +1 -5
  80. package/out/server/naslServer.d.ts.map +1 -1
  81. package/out/server/naslServer.js +16 -31
  82. package/out/server/naslServer.js.map +1 -1
  83. package/out/service/initial/form-designer.d.ts +1 -1
  84. package/out/service/initial/form-designer.d.ts.map +1 -1
  85. package/out/service/initial/form-designer.js +1 -4
  86. package/out/service/initial/form-designer.js.map +1 -1
  87. package/out/service/initial/processV2.d.ts +1 -1
  88. package/out/service/initial/processV2.d.ts.map +1 -1
  89. package/out/service/initial/processV2.js +1 -4
  90. package/out/service/initial/processV2.js.map +1 -1
  91. package/out/service/initial/types.d.ts +0 -1
  92. package/out/service/initial/types.d.ts.map +1 -1
  93. package/out/service/storage/api.d.ts +7 -16
  94. package/out/service/storage/api.js +0 -6
  95. package/out/service/storage/api.js.map +1 -1
  96. package/out/service/storage/cache/index.d.ts +15 -3
  97. package/out/service/storage/cache/index.d.ts.map +1 -1
  98. package/out/service/storage/cache/index.js +299 -14
  99. package/out/service/storage/cache/index.js.map +1 -1
  100. package/out/service/storage/cache/split.d.ts +21 -0
  101. package/out/service/storage/cache/split.d.ts.map +1 -1
  102. package/out/service/storage/cache/split.js +33 -24
  103. package/out/service/storage/cache/split.js.map +1 -1
  104. package/out/service/storage/init.d.ts +0 -9
  105. package/out/service/storage/init.d.ts.map +1 -1
  106. package/out/service/storage/init.js +73 -38
  107. package/out/service/storage/init.js.map +1 -1
  108. package/out/service/storage/service.js +1 -1
  109. package/out/service/storage/service.js.map +1 -1
  110. package/package.json +13 -15
  111. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/nasl/error.ts +0 -45
  112. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/datasources/defaultDS/entities/StockFinancials.ts +0 -89
  113. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/datasources/defaultDS/entities/Stocks.ts +0 -96
  114. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/datasources/defaultDS.ts +0 -5
  115. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/enums/FinancialStatementType.ts +0 -13
  116. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/logics/getStockFinancialStatements.ts +0 -62
  117. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/roles/DEV-AdminRole.ts +0 -5
  118. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/sqlFunctions/dameng.ts +0 -73
  119. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/sqlFunctions/mysql.ts +0 -67
  120. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/sqlFunctions/oracle.ts +0 -59
  121. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/sqlFunctions/postgresql.ts +0 -30
  122. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/sqlFunctions/vastbase_pg.ts +0 -28
  123. package/out/debug/apps/24b6fb54-2871-4866-b64b-676bec0f7eb5/embedded/zystestnew/structures/FinancialDataItem.ts +0 -9
  124. package/out/debug/apps/anonymous/extension.component.ts +0 -0
  125. package/out/debug/apps/anonymous/nasl.ui.component.ts +0 -7743
  126. package/out/generator/genSimpleBundleFile.d.ts +0 -19
  127. package/out/generator/genSimpleBundleFile.d.ts.map +0 -1
  128. package/out/generator/genSimpleBundleFile.js +0 -114
  129. package/out/generator/genSimpleBundleFile.js.map +0 -1
  130. package/out/natural/parseNaturalTSXView.d.ts +0 -14
  131. package/out/natural/parseNaturalTSXView.d.ts.map +0 -1
  132. package/out/natural/parseNaturalTSXView.js +0 -565
  133. package/out/natural/parseNaturalTSXView.js.map +0 -1
  134. package/out/natural/transforms/transform2MetadataType.d.ts +0 -5
  135. package/out/natural/transforms/transform2MetadataType.d.ts.map +0 -1
  136. package/out/natural/transforms/transform2MetadataType.js +0 -14
  137. package/out/natural/transforms/transform2MetadataType.js.map +0 -1
  138. package/out/natural/transforms/transform2ValidationRule.d.ts +0 -5
  139. package/out/natural/transforms/transform2ValidationRule.d.ts.map +0 -1
  140. package/out/natural/transforms/transform2ValidationRule.js +0 -24
  141. package/out/natural/transforms/transform2ValidationRule.js.map +0 -1
  142. package/out/natural/transforms/transformThemeAndStyle.d.ts +0 -28
  143. package/out/natural/transforms/transformThemeAndStyle.d.ts.map +0 -1
  144. package/out/natural/transforms/transformThemeAndStyle.js +0 -269
  145. package/out/natural/transforms/transformThemeAndStyle.js.map +0 -1
  146. package/out/server/OQL/sqlCategory.json +0 -410
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transform2ValidationRule = void 0;
4
- const transform2LogicItem_1 = require("./transform2LogicItem");
5
- const utils_1 = require("./utils");
6
- function transform2ValidationRule(node, options) {
7
- const callee = (0, utils_1.generate)(node.callee).code;
8
- const calleeArr = callee.split('.');
9
- const calleeName = calleeArr.pop();
10
- const calleeNamespace = calleeArr.join('.');
11
- if (calleeNamespace && calleeNamespace !== 'nasl.validation') {
12
- return (0, utils_1.throwError)(options?.parsingId, 'rules 中的函数命令空间可以不填或必须为 nasl.validation', node);
13
- }
14
- const rule = new utils_1.naslTypes.ValidationRule({
15
- calleeNamespace: 'nasl.validation',
16
- calleeName,
17
- arguments: node.arguments.map((arg) => new utils_1.naslTypes.Argument({
18
- expression: (0, transform2LogicItem_1.transform2LogicItem)(arg, { ...options, transformType: 'attr' }),
19
- })),
20
- });
21
- return rule;
22
- }
23
- exports.transform2ValidationRule = transform2ValidationRule;
24
- //# sourceMappingURL=transform2ValidationRule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transform2ValidationRule.js","sourceRoot":"","sources":["../../../src/natural/transforms/transform2ValidationRule.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,mCAAsE;AAEtE,SAAgB,wBAAwB,CAAC,IAA+B,EAAE,OAAgC;IACxG,MAAM,MAAM,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;IAC1C,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,UAAU,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;IACnC,MAAM,eAAe,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5C,IAAI,eAAe,IAAI,eAAe,KAAK,iBAAiB,EAAE,CAAC;QAC7D,OAAO,IAAA,kBAAU,EAAC,OAAO,EAAE,SAAS,EAAE,wCAAwC,EAAE,IAAI,CAAC,CAAC;IACxF,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,iBAAS,CAAC,cAAc,CAAC;QACxC,eAAe,EAAE,iBAAiB;QAClC,UAAU;QACV,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,iBAAS,CAAC,QAAQ,CAAC;YAC1D,UAAU,EAAE,IAAA,yCAAmB,EAAC,GAAG,EAAE,EAAE,GAAG,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC;SAC9E,CAAC,CAAC;KACJ,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC;AAlBD,4DAkBC"}
@@ -1,28 +0,0 @@
1
- import { naslTypes } from './utils';
2
- /**
3
- * "map": {
4
- ":root": {
5
- "--brand-primary-disabled": "#b4c7e4",
6
- "--brand-primary-opacity-20": "#355b9733",
7
- "--brand-primary-lightest": "#e6ecf6",
8
- "--brand-primary-lighter": "#b4c7e4",
9
- "--brand-primary-light": "#3e6ab0",
10
- "--brand-primary-dark": "#2f5186",
11
- "--brand-primary-darker": "#121e32",
12
- "--brand-primary-darkest": "#060a11",
13
- "--brand-primary": "#355b97",
14
- "--panel-background": "#bbb5b5"
15
- },
16
-
17
- ".el-card": {
18
- "--el-card-border-color": "#28498c"
19
- }
20
- },
21
- */
22
- export declare function transformTheme(css: string, options: {
23
- parsingId?: number;
24
- }): Record<string, Record<string, string>>;
25
- export declare function transformStyle(css: string, options: {
26
- parsingId?: number;
27
- }): naslTypes.CSSRule[];
28
- //# sourceMappingURL=transformThemeAndStyle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformThemeAndStyle.d.ts","sourceRoot":"","sources":["../../../src/natural/transforms/transformThemeAndStyle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAc,MAAM,SAAS,CAAC;AAGhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,0CAoC1E;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,uBAgC1E"}
@@ -1,269 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.transformStyle = exports.transformTheme = void 0;
27
- const postcss = __importStar(require("postcss"));
28
- const postcss_values_parser_1 = require("postcss-values-parser");
29
- const utils_1 = require("./utils");
30
- const lodash_1 = require("lodash");
31
- /**
32
- * "map": {
33
- ":root": {
34
- "--brand-primary-disabled": "#b4c7e4",
35
- "--brand-primary-opacity-20": "#355b9733",
36
- "--brand-primary-lightest": "#e6ecf6",
37
- "--brand-primary-lighter": "#b4c7e4",
38
- "--brand-primary-light": "#3e6ab0",
39
- "--brand-primary-dark": "#2f5186",
40
- "--brand-primary-darker": "#121e32",
41
- "--brand-primary-darkest": "#060a11",
42
- "--brand-primary": "#355b97",
43
- "--panel-background": "#bbb5b5"
44
- },
45
-
46
- ".el-card": {
47
- "--el-card-border-color": "#28498c"
48
- }
49
- },
50
- */
51
- function transformTheme(css, options) {
52
- const root = postcss.parse(css);
53
- const map = {};
54
- root.nodes.forEach((node) => {
55
- if (node.type === 'comment')
56
- return;
57
- if (node.type === 'rule') {
58
- // 获取选择器,支持多个选择器用逗号分隔
59
- const selectors = node.selector.split(',').map(s => s.trim());
60
- selectors.forEach(selector => {
61
- // 初始化选择器对应的变量映射
62
- if (!map[selector]) {
63
- map[selector] = {};
64
- }
65
- node.nodes.forEach((decl) => {
66
- if (decl.type === 'comment')
67
- return;
68
- if (decl.type === 'decl') {
69
- // 只处理 CSS 变量(以 -- 开头的属性)
70
- if (decl.prop.startsWith('--')) {
71
- map[selector][decl.prop] = decl.value.trim();
72
- }
73
- else {
74
- return (0, utils_1.throwError)(options?.parsingId, '$theme 中只支持 CSS 变量,不支持其他属性:' + decl.prop);
75
- }
76
- }
77
- else {
78
- return (0, utils_1.throwError)(options?.parsingId, '不支持的节点类型:' + decl.type);
79
- }
80
- });
81
- });
82
- }
83
- else {
84
- return (0, utils_1.throwError)(options?.parsingId, '不支持的节点类型:' + node.type);
85
- }
86
- });
87
- return map;
88
- }
89
- exports.transformTheme = transformTheme;
90
- function transformStyle(css, options) {
91
- const root = postcss.parse(css);
92
- const cssRules = [];
93
- root.nodes.forEach((node) => {
94
- if (node.type === 'comment')
95
- return;
96
- if (node.type === 'rule') {
97
- const selector = node.selector;
98
- const declarations = {};
99
- node.nodes.forEach((decl) => {
100
- if (decl.type === 'comment')
101
- return;
102
- if (decl.type === 'decl') {
103
- Object.assign(declarations, getChildrenDeclaration(decl));
104
- }
105
- else {
106
- return (0, utils_1.throwError)(options?.parsingId, '不支持的节点类型:' + decl.type);
107
- }
108
- });
109
- cssRules.push({
110
- concept: 'CSSRule',
111
- selector,
112
- declarations,
113
- });
114
- }
115
- else {
116
- return (0, utils_1.throwError)(options?.parsingId, '不支持的节点类型:' + node.type);
117
- }
118
- });
119
- return cssRules.map((cssRule) => new utils_1.naslTypes.CSSRule(cssRule));
120
- }
121
- exports.transformStyle = transformStyle;
122
- function getChildrenValue(val) {
123
- return val.nodes.map((node) => node.toString());
124
- }
125
- /**
126
- * @ref https://github.com/netease-lcap/ui-libraries/blob/test/packages/builder/src/build/build-css-info.ts#L206
127
- */
128
- function getChildrenDeclaration(decl) {
129
- let match;
130
- const value = decl.value;
131
- const declarations = {};
132
- if (decl.prop === 'background') {
133
- declarations.backgroundColor = decl.value;
134
- }
135
- else if (decl.prop === 'border') {
136
- if (value === undefined || value === null)
137
- return;
138
- const parseVal = (0, postcss_values_parser_1.parse)(value);
139
- const arr = getChildrenValue(parseVal);
140
- // const arr = value.split(/\s+/);
141
- if (arr.length < 3)
142
- return;
143
- const [borderWidth, borderStyle, borderColor] = arr;
144
- declarations.borderLeftWidth = borderWidth;
145
- declarations.borderLeftStyle = borderStyle;
146
- declarations.borderLeftColor = borderColor;
147
- declarations.borderRightWidth = borderWidth;
148
- declarations.borderRightStyle = borderStyle;
149
- declarations.borderRightColor = borderColor;
150
- declarations.borderTopWidth = borderWidth;
151
- declarations.borderTopStyle = borderStyle;
152
- declarations.borderTopColor = borderColor;
153
- declarations.borderBottomWidth = borderWidth;
154
- declarations.borderBottomStyle = borderStyle;
155
- declarations.borderBottomColor = borderColor;
156
- }
157
- else if ((match = decl.prop.match(/^border-(left|right|top|bottom)$/))) {
158
- const borderProp = match[1];
159
- if (value === undefined || value === null)
160
- return;
161
- const parseVal = (0, postcss_values_parser_1.parse)(value);
162
- const arr = getChildrenValue(parseVal);
163
- // const arr = value.split(/\s+/);
164
- if (arr.length < 3)
165
- return;
166
- const [borderWidth, borderStyle, borderColor] = arr;
167
- declarations[`border${(0, lodash_1.capitalize)(borderProp)}Width`] = borderWidth;
168
- declarations[`border${(0, lodash_1.capitalize)(borderProp)}Style`] = borderStyle;
169
- declarations[`border${(0, lodash_1.capitalize)(borderProp)}Color`] = borderColor;
170
- }
171
- else if (decl.prop === 'margin') {
172
- if (value === undefined || value === null)
173
- return;
174
- const parseVal = (0, postcss_values_parser_1.parse)(value);
175
- const arr = getChildrenValue(parseVal);
176
- // const arr = value.split(/\s+/);
177
- if (arr.length === 1) {
178
- declarations.marginTop = arr[0];
179
- declarations.marginRight = arr[0];
180
- declarations.marginBottom = arr[0];
181
- declarations.marginLeft = arr[0];
182
- }
183
- else if (arr.length === 2) {
184
- declarations.marginTop = arr[0];
185
- declarations.marginRight = arr[1];
186
- declarations.marginBottom = arr[0];
187
- declarations.marginLeft = arr[1];
188
- }
189
- else if (arr.length === 3) {
190
- declarations.marginTop = arr[0];
191
- declarations.marginRight = arr[1];
192
- declarations.marginBottom = arr[2];
193
- declarations.marginLeft = arr[1];
194
- }
195
- else if (arr.length === 4) {
196
- declarations.marginTop = arr[0];
197
- declarations.marginRight = arr[1];
198
- declarations.marginBottom = arr[2];
199
- declarations.marginLeft = arr[3];
200
- }
201
- }
202
- else if (decl.prop === 'padding') {
203
- if (value === undefined || value === null)
204
- return;
205
- const parseVal = (0, postcss_values_parser_1.parse)(value);
206
- const arr = getChildrenValue(parseVal);
207
- // const arr = value.split(/\s+/);
208
- if (arr.length === 1) {
209
- declarations.paddingTop = arr[0];
210
- declarations.paddingRight = arr[0];
211
- declarations.paddingBottom = arr[0];
212
- declarations.paddingLeft = arr[0];
213
- }
214
- else if (arr.length === 2) {
215
- declarations.paddingTop = arr[0];
216
- declarations.paddingRight = arr[1];
217
- declarations.paddingBottom = arr[0];
218
- declarations.paddingLeft = arr[1];
219
- }
220
- else if (arr.length === 3) {
221
- declarations.paddingTop = arr[0];
222
- declarations.paddingRight = arr[1];
223
- declarations.paddingBottom = arr[2];
224
- declarations.paddingLeft = arr[1];
225
- }
226
- else if (arr.length === 4) {
227
- declarations.paddingTop = arr[0];
228
- declarations.paddingRight = arr[1];
229
- declarations.paddingBottom = arr[2];
230
- declarations.paddingLeft = arr[3];
231
- }
232
- }
233
- else if (decl.prop === 'border-radius') {
234
- if (value === undefined || value === null)
235
- return;
236
- const parseVal = (0, postcss_values_parser_1.parse)(value);
237
- const arr = getChildrenValue(parseVal);
238
- // const arr = value.split(/\s+/);
239
- if (arr.length === 1) {
240
- declarations.borderTopLeftRadius = arr[0];
241
- declarations.borderTopRightRadius = arr[0];
242
- declarations.borderBottomRightRadius = arr[0];
243
- declarations.borderBottomLeftRadius = arr[0];
244
- }
245
- else if (arr.length === 2) {
246
- declarations.borderTopLeftRadius = arr[0];
247
- declarations.borderTopRightRadius = arr[1];
248
- declarations.borderBottomRightRadius = arr[0];
249
- declarations.borderBottomLeftRadius = arr[1];
250
- }
251
- else if (arr.length === 3) {
252
- declarations.borderTopLeftRadius = arr[0];
253
- declarations.borderTopRightRadius = arr[1];
254
- declarations.borderBottomRightRadius = arr[2];
255
- declarations.borderBottomLeftRadius = arr[1];
256
- }
257
- else if (arr.length === 4) {
258
- declarations.borderTopLeftRadius = arr[0];
259
- declarations.borderTopRightRadius = arr[1];
260
- declarations.borderBottomRightRadius = arr[2];
261
- declarations.borderBottomLeftRadius = arr[3];
262
- }
263
- }
264
- else {
265
- declarations[(0, lodash_1.camelCase)(decl.prop)] = decl.value;
266
- }
267
- return declarations;
268
- }
269
- //# sourceMappingURL=transformThemeAndStyle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformThemeAndStyle.js","sourceRoot":"","sources":["../../../src/natural/transforms/transformThemeAndStyle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AACnC,iEAAuE;AACvE,mCAAgD;AAChD,mCAA+C;AAE/C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,cAAc,CAAC,GAAW,EAAE,OAA+B;IACvE,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,GAAG,GAA2C,EAAE,CAAC;IAEvD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO;QACpC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACvB,qBAAqB;YACrB,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAE9D,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBACzB,gBAAgB;gBAChB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC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