@cloudbase/cals 1.1.14 → 1.2.1
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/lib/{parser → cjs/parser}/cals/index.d.ts +1 -1
- package/lib/cjs/parser/cals/index.d.ts.map +1 -0
- package/lib/{parser → cjs/parser}/cals/index.js +2 -1
- package/lib/cjs/parser/cals/utils/block/helpers/get-component-namespace.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/merge-dataset.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/merge-listeners.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/merge-resources.d.ts.map +1 -0
- package/lib/{parser → cjs/parser}/cals/utils/block/helpers/remap-component-ids.d.ts +2 -2
- package/lib/cjs/parser/cals/utils/block/helpers/remap-component-ids.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/renew-id-in-code.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/block/helpers/resolve-new-id.d.ts.map +1 -0
- package/lib/{parser → cjs/parser}/cals/utils/block/index.d.ts +2 -2
- package/lib/cjs/parser/cals/utils/block/index.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/code/index.d.ts.map +1 -0
- package/lib/{parser → cjs/parser}/cals/utils/common.d.ts +1 -1
- package/lib/cjs/parser/cals/utils/common.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/getUsedReference.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/getUsedResources.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/runtime.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/spinoff/index.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/style.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/template.d.ts.map +1 -0
- package/lib/{parser → cjs/parser}/cals/utils/template.js +2 -0
- package/lib/cjs/parser/cals/utils/version/common.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/version/config.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/version/index.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/version/parses.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/version/utils.d.ts.map +1 -0
- package/lib/cjs/parser/dependiencies/index.d.ts.map +1 -0
- package/lib/cjs/parser/expression/index.d.ts.map +1 -0
- package/lib/cjs/parser/index.d.ts.map +1 -0
- package/lib/cjs/parser/plugins/postcss-rpx2clac.d.ts.map +1 -0
- package/lib/cjs/types/basic/app.d.ts.map +1 -0
- package/lib/cjs/types/basic/common.d.ts.map +1 -0
- package/lib/cjs/types/basic/component.d.ts.map +1 -0
- package/lib/cjs/types/basic/datasource.d.ts.map +1 -0
- package/lib/{types → cjs/types}/index.d.ts +1 -1
- package/lib/cjs/types/index.d.ts.map +1 -0
- package/lib/{types → cjs/types}/index.js +2 -13
- package/lib/cjs/types/lcds.d.ts +612 -0
- package/lib/cjs/types/lcds.d.ts.map +1 -0
- package/lib/cjs/types/lcds.js +34 -0
- package/lib/{types → cjs/types}/platform/app.d.ts +4 -2
- package/lib/cjs/types/platform/app.d.ts.map +1 -0
- package/lib/cjs/types/platform/common.d.ts.map +1 -0
- package/lib/{types → cjs/types}/platform/component.d.ts +1 -1
- package/lib/cjs/types/platform/component.d.ts.map +1 -0
- package/lib/{types → cjs/types}/platform/datasource.d.ts +4 -4
- package/lib/cjs/types/platform/datasource.d.ts.map +1 -0
- package/lib/cjs/types/platform/eventFlow.d.ts.map +1 -0
- package/lib/cjs/types/platform/query.d.ts.map +1 -0
- package/lib/{types → cjs/types}/platform/theme.d.ts +5 -5
- package/lib/cjs/types/platform/theme.d.ts.map +1 -0
- package/lib/cjs/utils/CSSProperty.d.ts.map +1 -0
- package/lib/cjs/utils/color-generator/core.d.ts.map +1 -0
- package/lib/cjs/utils/color-generator/generate.d.ts.map +1 -0
- package/lib/cjs/utils/color-generator/utils.d.ts.map +1 -0
- package/lib/cjs/utils/constant.d.ts.map +1 -0
- package/lib/cjs/utils/dts/auto-generated.d.ts +2 -0
- package/lib/cjs/utils/dts/auto-generated.d.ts.map +1 -0
- package/lib/{utils → cjs/utils}/dts/auto-generated.js +113 -0
- package/lib/{utils → cjs/utils}/dts/build.d.ts.map +1 -1
- package/lib/cjs/utils/dts/index.d.ts.map +1 -0
- package/lib/cjs/utils/index.d.ts.map +1 -0
- package/lib/cjs/utils/version/common.d.ts.map +1 -0
- package/lib/cjs/utils/version/featureChecker.d.ts.map +1 -0
- package/lib/cjs/utils/version/migrations/version4.d.ts.map +1 -0
- package/lib/esm/parser/cals/index.d.ts +625 -0
- package/lib/esm/parser/cals/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/index.js +1549 -0
- package/lib/esm/parser/cals/utils/block/helpers/get-component-namespace.d.ts +2 -0
- package/lib/esm/parser/cals/utils/block/helpers/get-component-namespace.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/get-component-namespace.js +5 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-dataset.d.ts +6 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-dataset.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-dataset.js +13 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-listeners.d.ts +6 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-listeners.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-listeners.js +10 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-resources.d.ts +6 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-resources.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/merge-resources.js +25 -0
- package/lib/esm/parser/cals/utils/block/helpers/remap-component-ids.d.ts +30 -0
- package/lib/esm/parser/cals/utils/block/helpers/remap-component-ids.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/remap-component-ids.js +125 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-code.d.ts +7 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-code.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-code.js +9 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts +8 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-expr.js +56 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts +15 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-resource.js +13 -0
- package/lib/esm/parser/cals/utils/block/helpers/resolve-new-id.d.ts +7 -0
- package/lib/esm/parser/cals/utils/block/helpers/resolve-new-id.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/helpers/resolve-new-id.js +17 -0
- package/lib/esm/parser/cals/utils/block/index.d.ts +67 -0
- package/lib/esm/parser/cals/utils/block/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/block/index.js +451 -0
- package/lib/esm/parser/cals/utils/code/index.d.ts +36 -0
- package/lib/esm/parser/cals/utils/code/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/code/index.js +401 -0
- package/lib/esm/parser/cals/utils/common.d.ts +35 -0
- package/lib/esm/parser/cals/utils/common.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/common.js +301 -0
- package/lib/esm/parser/cals/utils/getUsedReference.d.ts +8 -0
- package/lib/esm/parser/cals/utils/getUsedReference.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/getUsedReference.js +54 -0
- package/lib/esm/parser/cals/utils/getUsedResources.d.ts +10 -0
- package/lib/esm/parser/cals/utils/getUsedResources.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/getUsedResources.js +132 -0
- package/lib/esm/parser/cals/utils/runtime.d.ts +14 -0
- package/lib/esm/parser/cals/utils/runtime.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/runtime.js +254 -0
- package/lib/esm/parser/cals/utils/spinoff/index.d.ts +10 -0
- package/lib/esm/parser/cals/utils/spinoff/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/spinoff/index.js +95 -0
- package/lib/esm/parser/cals/utils/style.d.ts +43 -0
- package/lib/esm/parser/cals/utils/style.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/style.js +463 -0
- package/lib/esm/parser/cals/utils/template.d.ts +6 -0
- package/lib/esm/parser/cals/utils/template.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/template.js +223 -0
- package/lib/esm/parser/cals/utils/version/common.d.ts +5 -0
- package/lib/esm/parser/cals/utils/version/common.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/common.js +375 -0
- package/lib/esm/parser/cals/utils/version/config.d.ts +16 -0
- package/lib/esm/parser/cals/utils/version/config.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/config.js +241 -0
- package/lib/esm/parser/cals/utils/version/index.d.ts +3 -0
- package/lib/esm/parser/cals/utils/version/index.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/index.js +68 -0
- package/lib/esm/parser/cals/utils/version/parses.d.ts +16 -0
- package/lib/esm/parser/cals/utils/version/parses.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/parses.js +560 -0
- package/lib/esm/parser/cals/utils/version/utils.d.ts +14 -0
- package/lib/esm/parser/cals/utils/version/utils.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/version/utils.js +129 -0
- package/lib/esm/parser/dependiencies/index.d.ts +143 -0
- package/lib/esm/parser/dependiencies/index.d.ts.map +1 -0
- package/lib/esm/parser/dependiencies/index.js +684 -0
- package/lib/esm/parser/expression/index.d.ts +123 -0
- package/lib/esm/parser/expression/index.d.ts.map +1 -0
- package/lib/esm/parser/expression/index.js +296 -0
- package/lib/esm/parser/index.d.ts +13 -0
- package/lib/esm/parser/index.d.ts.map +1 -0
- package/lib/esm/parser/index.js +12 -0
- package/lib/esm/parser/plugins/postcss-rpx2clac.d.ts +18 -0
- package/lib/esm/parser/plugins/postcss-rpx2clac.d.ts.map +1 -0
- package/lib/esm/parser/plugins/postcss-rpx2clac.js +67 -0
- package/lib/esm/types/basic/app.d.ts +76 -0
- package/lib/esm/types/basic/app.d.ts.map +1 -0
- package/lib/esm/types/basic/app.js +1 -0
- package/lib/esm/types/basic/common.d.ts +125 -0
- package/lib/esm/types/basic/common.d.ts.map +1 -0
- package/lib/esm/types/basic/common.js +1 -0
- package/lib/esm/types/basic/component.d.ts +212 -0
- package/lib/esm/types/basic/component.d.ts.map +1 -0
- package/lib/esm/types/basic/component.js +1 -0
- package/lib/esm/types/basic/datasource.d.ts +50 -0
- package/lib/esm/types/basic/datasource.d.ts.map +1 -0
- package/lib/esm/types/basic/datasource.js +1 -0
- package/lib/esm/types/index.d.ts +12 -0
- package/lib/esm/types/index.d.ts.map +1 -0
- package/lib/esm/types/index.js +14 -0
- package/lib/esm/types/lcds.d.ts +612 -0
- package/lib/esm/types/lcds.d.ts.map +1 -0
- package/lib/esm/types/lcds.js +31 -0
- package/lib/esm/types/platform/app.d.ts +278 -0
- package/lib/esm/types/platform/app.d.ts.map +1 -0
- package/lib/esm/types/platform/app.js +8 -0
- package/lib/esm/types/platform/common.d.ts +190 -0
- package/lib/esm/types/platform/common.d.ts.map +1 -0
- package/lib/esm/types/platform/common.js +84 -0
- package/lib/esm/types/platform/component.d.ts +166 -0
- package/lib/esm/types/platform/component.d.ts.map +1 -0
- package/lib/esm/types/platform/component.js +8 -0
- package/lib/esm/types/platform/datasource.d.ts +500 -0
- package/lib/esm/types/platform/datasource.d.ts.map +1 -0
- package/lib/esm/types/platform/datasource.js +6 -0
- package/lib/esm/types/platform/eventFlow.d.ts +20 -0
- package/lib/esm/types/platform/eventFlow.d.ts.map +1 -0
- package/lib/esm/types/platform/eventFlow.js +1 -0
- package/lib/esm/types/platform/query.d.ts +78 -0
- package/lib/esm/types/platform/query.d.ts.map +1 -0
- package/lib/esm/types/platform/query.js +12 -0
- package/lib/esm/types/platform/theme.d.ts +47 -0
- package/lib/esm/types/platform/theme.d.ts.map +1 -0
- package/lib/esm/types/platform/theme.js +1 -0
- package/lib/esm/utils/CSSProperty.d.ts +64 -0
- package/lib/esm/utils/CSSProperty.d.ts.map +1 -0
- package/lib/esm/utils/CSSProperty.js +86 -0
- package/lib/esm/utils/color-generator/core.d.ts +52 -0
- package/lib/esm/utils/color-generator/core.d.ts.map +1 -0
- package/lib/esm/utils/color-generator/core.js +57 -0
- package/lib/esm/utils/color-generator/generate.d.ts +67 -0
- package/lib/esm/utils/color-generator/generate.d.ts.map +1 -0
- package/lib/esm/utils/color-generator/generate.js +92 -0
- package/lib/esm/utils/color-generator/utils.d.ts +15 -0
- package/lib/esm/utils/color-generator/utils.d.ts.map +1 -0
- package/lib/esm/utils/color-generator/utils.js +30 -0
- package/lib/esm/utils/constant.d.ts +65 -0
- package/lib/esm/utils/constant.d.ts.map +1 -0
- package/lib/esm/utils/constant.js +69 -0
- package/lib/esm/utils/dts/auto-generated.d.ts +2 -0
- package/lib/esm/utils/dts/auto-generated.d.ts.map +1 -0
- package/lib/esm/utils/dts/auto-generated.js +1909 -0
- package/lib/esm/utils/dts/build.d.ts +2 -0
- package/lib/esm/utils/dts/build.d.ts.map +1 -0
- package/lib/esm/utils/dts/build.js +147 -0
- package/lib/esm/utils/dts/index.d.ts +141 -0
- package/lib/esm/utils/dts/index.d.ts.map +1 -0
- package/lib/esm/utils/dts/index.js +1071 -0
- package/lib/esm/utils/index.d.ts +9 -0
- package/lib/esm/utils/index.d.ts.map +1 -0
- package/lib/esm/utils/index.js +8 -0
- package/lib/esm/utils/version/common.d.ts +3 -0
- package/lib/esm/utils/version/common.d.ts.map +1 -0
- package/lib/esm/utils/version/common.js +22 -0
- package/lib/esm/utils/version/featureChecker.d.ts +5 -0
- package/lib/esm/utils/version/featureChecker.d.ts.map +1 -0
- package/lib/esm/utils/version/featureChecker.js +32 -0
- package/lib/esm/utils/version/migrations/version4.d.ts +3 -0
- package/lib/esm/utils/version/migrations/version4.d.ts.map +1 -0
- package/lib/esm/utils/version/migrations/version4.js +192 -0
- package/lib/schema/lcds_component.json +1 -1
- package/lib/schema/platform_application.json +1 -1
- package/lib/schema/platform_template.json +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +7 -5
- package/lib/parser/cals/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/get-component-namespace.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/merge-dataset.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/merge-listeners.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/merge-resources.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/remap-component-ids.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/renew-id-in-code.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/helpers/resolve-new-id.d.ts.map +0 -1
- package/lib/parser/cals/utils/block/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/code/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/common.d.ts.map +0 -1
- package/lib/parser/cals/utils/getUsedReference.d.ts.map +0 -1
- package/lib/parser/cals/utils/getUsedResources.d.ts.map +0 -1
- package/lib/parser/cals/utils/runtime.d.ts.map +0 -1
- package/lib/parser/cals/utils/spinoff/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/style.d.ts.map +0 -1
- package/lib/parser/cals/utils/template.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/common.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/config.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/parses.d.ts.map +0 -1
- package/lib/parser/cals/utils/version/utils.d.ts.map +0 -1
- package/lib/parser/dependiencies/index.d.ts.map +0 -1
- package/lib/parser/expression/index.d.ts.map +0 -1
- package/lib/parser/index.d.ts.map +0 -1
- package/lib/parser/plugins/postcss-rpx2clac.d.ts.map +0 -1
- package/lib/types/basic/app.d.ts.map +0 -1
- package/lib/types/basic/common.d.ts.map +0 -1
- package/lib/types/basic/component.d.ts.map +0 -1
- package/lib/types/basic/datasource.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/lcds.d.ts +0 -610
- package/lib/types/lcds.d.ts.map +0 -1
- package/lib/types/lcds.js +0 -25
- package/lib/types/platform/app.d.ts.map +0 -1
- package/lib/types/platform/common.d.ts.map +0 -1
- package/lib/types/platform/component.d.ts.map +0 -1
- package/lib/types/platform/datasource.d.ts.map +0 -1
- package/lib/types/platform/eventFlow.d.ts.map +0 -1
- package/lib/types/platform/query.d.ts.map +0 -1
- package/lib/types/platform/theme.d.ts.map +0 -1
- package/lib/utils/CSSProperty.d.ts.map +0 -1
- package/lib/utils/color-generator/core.d.ts.map +0 -1
- package/lib/utils/color-generator/generate.d.ts.map +0 -1
- package/lib/utils/color-generator/utils.d.ts.map +0 -1
- package/lib/utils/constant.d.ts.map +0 -1
- package/lib/utils/dts/auto-generated.d.ts +0 -2
- package/lib/utils/dts/auto-generated.d.ts.map +0 -1
- package/lib/utils/dts/index.d.ts.map +0 -1
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/version/common.d.ts.map +0 -1
- package/lib/utils/version/featureChecker.d.ts.map +0 -1
- package/lib/utils/version/migrations/version4.d.ts.map +0 -1
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/get-component-namespace.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/get-component-namespace.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-dataset.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-dataset.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-listeners.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-listeners.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-resources.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-resources.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/remap-component-ids.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-code.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-code.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-expr.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-expr.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-resource.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-resource.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/resolve-new-id.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/resolve-new-id.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/block/index.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/code/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/code/index.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/common.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/getUsedReference.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/getUsedReference.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/getUsedResources.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/getUsedResources.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/runtime.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/runtime.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/spinoff/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/spinoff/index.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/style.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/style.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/template.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/common.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/common.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/config.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/config.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/index.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/parses.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/parses.js +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/utils.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/cals/utils/version/utils.js +0 -0
- /package/lib/{parser → cjs/parser}/dependiencies/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/dependiencies/index.js +0 -0
- /package/lib/{parser → cjs/parser}/expression/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/expression/index.js +0 -0
- /package/lib/{parser → cjs/parser}/index.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/index.js +0 -0
- /package/lib/{parser → cjs/parser}/plugins/postcss-rpx2clac.d.ts +0 -0
- /package/lib/{parser → cjs/parser}/plugins/postcss-rpx2clac.js +0 -0
- /package/lib/{types → cjs/types}/basic/app.d.ts +0 -0
- /package/lib/{types → cjs/types}/basic/app.js +0 -0
- /package/lib/{types → cjs/types}/basic/common.d.ts +0 -0
- /package/lib/{types → cjs/types}/basic/common.js +0 -0
- /package/lib/{types → cjs/types}/basic/component.d.ts +0 -0
- /package/lib/{types → cjs/types}/basic/component.js +0 -0
- /package/lib/{types → cjs/types}/basic/datasource.d.ts +0 -0
- /package/lib/{types → cjs/types}/basic/datasource.js +0 -0
- /package/lib/{types → cjs/types}/platform/app.js +0 -0
- /package/lib/{types → cjs/types}/platform/common.d.ts +0 -0
- /package/lib/{types → cjs/types}/platform/common.js +0 -0
- /package/lib/{types → cjs/types}/platform/component.js +0 -0
- /package/lib/{types → cjs/types}/platform/datasource.js +0 -0
- /package/lib/{types → cjs/types}/platform/eventFlow.d.ts +0 -0
- /package/lib/{types → cjs/types}/platform/eventFlow.js +0 -0
- /package/lib/{types → cjs/types}/platform/query.d.ts +0 -0
- /package/lib/{types → cjs/types}/platform/query.js +0 -0
- /package/lib/{types → cjs/types}/platform/theme.js +0 -0
- /package/lib/{utils → cjs/utils}/CSSProperty.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/CSSProperty.js +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/core.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/core.js +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/generate.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/generate.js +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/utils.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/color-generator/utils.js +0 -0
- /package/lib/{utils → cjs/utils}/constant.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/constant.js +0 -0
- /package/lib/{utils → cjs/utils}/dts/build.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/dts/build.js +0 -0
- /package/lib/{utils → cjs/utils}/dts/index.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/dts/index.js +0 -0
- /package/lib/{utils → cjs/utils}/index.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/index.js +0 -0
- /package/lib/{utils → cjs/utils}/version/common.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/version/common.js +0 -0
- /package/lib/{utils → cjs/utils}/version/featureChecker.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/version/featureChecker.js +0 -0
- /package/lib/{utils → cjs/utils}/version/migrations/version4.d.ts +0 -0
- /package/lib/{utils → cjs/utils}/version/migrations/version4.js +0 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { PropBindType } from '../../expression';
|
|
2
|
+
import { removeInvalidStyleFormValue } from './style';
|
|
3
|
+
import { isEmptyObj, isPlainObject, isValidClassNameListBind } from './common';
|
|
4
|
+
import cloneDeep from 'lodash/cloneDeep';
|
|
5
|
+
export function readComponents(properties = {}, excludeKeys = []) {
|
|
6
|
+
var _a;
|
|
7
|
+
const cmps /* IWeAppPage['componentInstances'] */ = {};
|
|
8
|
+
for (const key in properties) {
|
|
9
|
+
if (excludeKeys.indexOf(key) > -1) {
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
const srcCmp = properties[key];
|
|
13
|
+
const srcProps = srcCmp['x-props'];
|
|
14
|
+
if (srcProps) {
|
|
15
|
+
const cmpParts = srcProps.sourceKey.split(':');
|
|
16
|
+
cmps[key] = {};
|
|
17
|
+
setValidValue(cmps[key], 'xComponent', {
|
|
18
|
+
moduleName: cmpParts[0],
|
|
19
|
+
name: cmpParts[1],
|
|
20
|
+
});
|
|
21
|
+
const componentXProps = {};
|
|
22
|
+
setValidValue(componentXProps, 'data', readDynamicData(srcProps));
|
|
23
|
+
setValidValue(componentXProps, 'listeners', readListeners(srcProps.listenerInstances));
|
|
24
|
+
setValidValue(componentXProps, 'directives', readDirectives(srcProps));
|
|
25
|
+
setValidValue(componentXProps, 'style', srcProps.style);
|
|
26
|
+
setValidValue(componentXProps, 'commonStyle', removeInvalidStyleFormValue(srcProps.commonStyle));
|
|
27
|
+
setValidValue(componentXProps, 'styleBindPath', srcProps.styleBindPath);
|
|
28
|
+
if ((_a = srcProps.styleBind) === null || _a === void 0 ? void 0 : _a.bindDataPath) {
|
|
29
|
+
componentXProps.styleBind = {
|
|
30
|
+
type: srcProps.styleBind.type,
|
|
31
|
+
value: srcProps.styleBind.bindDataPath,
|
|
32
|
+
extra: srcProps.styleBind.extra,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (isValidClassNameListBind(srcProps.classNameListBind)) {
|
|
36
|
+
const classList = srcProps.classNameListBind;
|
|
37
|
+
setValidValue(componentXProps, 'classListBind', {
|
|
38
|
+
type: classList.type,
|
|
39
|
+
value: classList.bindDataPath,
|
|
40
|
+
extra: classList.extra,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (srcProps.classNameList) {
|
|
44
|
+
setValidValue(componentXProps, 'classList', srcProps.classNameList);
|
|
45
|
+
}
|
|
46
|
+
setValidValue(cmps[key], 'xProps', componentXProps);
|
|
47
|
+
setValidValue(cmps[key], 'xIndex', srcCmp['x-index']);
|
|
48
|
+
const excludeKeys = (srcProps.dataTypes || [])
|
|
49
|
+
.filter((dataType) => dataType.type !== 'slot')
|
|
50
|
+
.map((dataType) => dataType.propertyPath);
|
|
51
|
+
setValidValue(cmps[key], 'properties', readComponents(srcCmp.properties, excludeKeys));
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
cmps[key] = { properties: readComponents(srcCmp.properties) };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return cmps;
|
|
58
|
+
}
|
|
59
|
+
export function readDirectives(cmp) {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
const directives /* IWeAppComponentInstance['xProps']['directives'] */ = {};
|
|
62
|
+
// 默认为 true,节省体积不记录
|
|
63
|
+
if (cmp.data && cmp.data._visible !== true) {
|
|
64
|
+
directives.waIf = {
|
|
65
|
+
value: cmp.data._visible,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if ((_a = cmp.dataBinds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
69
|
+
const bind = cmp.dataBinds.find((bind) => bind.propertyPath === '_visible');
|
|
70
|
+
if (bind) {
|
|
71
|
+
const foundDataType = (cmp.dataTypes || []).find((dataType) => dataType.propertyPath === bind.propertyPath);
|
|
72
|
+
if (foundDataType && foundDataType.type === 'bind') {
|
|
73
|
+
directives.waIf = {
|
|
74
|
+
type: bind.type || PropBindType.state,
|
|
75
|
+
value: bind.bindDataPath,
|
|
76
|
+
extra: bind.extra,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const forBind = cmp.dataBinds.find((bind) => bind.propertyPath === '_waFor');
|
|
81
|
+
if (forBind) {
|
|
82
|
+
directives.waFor = {
|
|
83
|
+
type: forBind.type || PropBindType.state,
|
|
84
|
+
value: forBind.bindDataPath,
|
|
85
|
+
extra: forBind.extra,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
const displayBind = cmp.dataBinds.find((bind) => bind.propertyPath === '_display');
|
|
89
|
+
if (displayBind) {
|
|
90
|
+
directives.waDisplay = {
|
|
91
|
+
type: displayBind.type || PropBindType.state,
|
|
92
|
+
value: displayBind.bindDataPath,
|
|
93
|
+
extra: displayBind.extra,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (directives.waFor && ((_b = cmp.data) === null || _b === void 0 ? void 0 : _b._waForKey)) {
|
|
98
|
+
directives.waForKey = {
|
|
99
|
+
value: cmp.data._waForKey,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return directives;
|
|
103
|
+
}
|
|
104
|
+
export function readDynamicData(cmp) {
|
|
105
|
+
var _a, _b;
|
|
106
|
+
const data = {};
|
|
107
|
+
const ignoredProps = ['_visible', '_waFor', '_waForKey', '_display'];
|
|
108
|
+
// Read data
|
|
109
|
+
for (const prop in cmp.data) {
|
|
110
|
+
if (ignoredProps.indexOf(prop) > -1) {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
// Keep null values to generate all wxml attributes
|
|
114
|
+
data[prop] = { value: cmp.data[prop] };
|
|
115
|
+
}
|
|
116
|
+
// Read data binds
|
|
117
|
+
(_b = (_a = cmp.dataBinds) === null || _a === void 0 ? void 0 : _a.forEach) === null || _b === void 0 ? void 0 : _b.call(_a, (bind) => {
|
|
118
|
+
if (ignoredProps.indexOf(bind.propertyPath) > -1) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const foundDataType = (cmp.dataTypes || []).find((dataType) => dataType.propertyPath === bind.propertyPath);
|
|
122
|
+
if (foundDataType && foundDataType.type === 'bind') {
|
|
123
|
+
data[bind.propertyPath] = {
|
|
124
|
+
type: bind.type || PropBindType.state,
|
|
125
|
+
value: bind.bindDataPath,
|
|
126
|
+
extra: bind.extra,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
return data;
|
|
131
|
+
}
|
|
132
|
+
export function readListeners(listenerInstances = []) {
|
|
133
|
+
const listeners = listenerInstances.map((act) => {
|
|
134
|
+
const fromParts = act.sourceKey.split(':');
|
|
135
|
+
return {
|
|
136
|
+
key: act.key,
|
|
137
|
+
trigger: act.trigger,
|
|
138
|
+
type: act.type,
|
|
139
|
+
handler: {
|
|
140
|
+
moduleName: fromParts[0],
|
|
141
|
+
name: fromParts[1],
|
|
142
|
+
},
|
|
143
|
+
data: readDynamicData(act),
|
|
144
|
+
isCapturePhase: act.isCapturePhase,
|
|
145
|
+
noPropagation: act.noPropagation,
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
return listeners;
|
|
149
|
+
}
|
|
150
|
+
export function writeListeners(listeners = []) {
|
|
151
|
+
return listeners.map((l) => {
|
|
152
|
+
const act = {
|
|
153
|
+
key: l.key || '',
|
|
154
|
+
sourceKey: `${l.handler.moduleName}:${l.handler.name}`,
|
|
155
|
+
trigger: l.trigger,
|
|
156
|
+
type: l.type,
|
|
157
|
+
data: {},
|
|
158
|
+
dataBinds: [],
|
|
159
|
+
handler: l.handler,
|
|
160
|
+
isCapturePhase: l.isCapturePhase,
|
|
161
|
+
noPropagation: l.noPropagation,
|
|
162
|
+
};
|
|
163
|
+
return writeDynamicData(l.data, act, null);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
// 处理Listeners动态数据
|
|
167
|
+
export function writeDynamicData(from = {}, to, properties) {
|
|
168
|
+
const act = cloneDeep(to);
|
|
169
|
+
act.dataTypes = to.dataTypes || [];
|
|
170
|
+
for (const prop in from) {
|
|
171
|
+
const dv = from[prop];
|
|
172
|
+
if (dv.type === 'static' || dv.type === undefined) {
|
|
173
|
+
act.data = to.data || {};
|
|
174
|
+
act.data[prop] = dv.value;
|
|
175
|
+
act.dataTypes.push({
|
|
176
|
+
propertyPath: prop,
|
|
177
|
+
type: 'static',
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
else if (dv.type === 'slot') {
|
|
181
|
+
act.dataTypes.push({
|
|
182
|
+
propertyPath: prop,
|
|
183
|
+
type: 'slot',
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
act.dataBinds = to.dataBinds || [];
|
|
188
|
+
if (!dv.value.startsWith('!') || dv.value === PropBindType.expression) {
|
|
189
|
+
act.dataBinds.push({
|
|
190
|
+
propertyPath: prop,
|
|
191
|
+
bindDataPath: dv.value,
|
|
192
|
+
type: dv.type,
|
|
193
|
+
extra: dv.extra,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
// check "!" to be compatible with legacy data
|
|
198
|
+
const globalStateReg = /^!global./;
|
|
199
|
+
let fixedValue = '';
|
|
200
|
+
if (globalStateReg.test(dv.value)) {
|
|
201
|
+
fixedValue = dv.value.replace(globalStateReg, '!app.state.');
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
fixedValue = dv.value.replace(/^!\w+./, '!$page.');
|
|
205
|
+
}
|
|
206
|
+
act.dataBinds.push({
|
|
207
|
+
propertyPath: prop,
|
|
208
|
+
bindDataPath: fixedValue,
|
|
209
|
+
type: PropBindType.expression,
|
|
210
|
+
extra: dv.extra,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
act.dataTypes.push({
|
|
214
|
+
propertyPath: prop,
|
|
215
|
+
type: 'bind',
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
// 兼容之前的应用,slot类型的字段从 properties 中取
|
|
220
|
+
if (properties) {
|
|
221
|
+
Object.keys(properties).forEach((key) => {
|
|
222
|
+
const foundOne = act.dataTypes.find((dataType) => dataType.propertyPath === key);
|
|
223
|
+
if (foundOne) {
|
|
224
|
+
foundOne.type = 'slot';
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
if (!properties[key].xComponent)
|
|
228
|
+
act.dataTypes.push({
|
|
229
|
+
propertyPath: key,
|
|
230
|
+
type: 'slot',
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
return act;
|
|
236
|
+
}
|
|
237
|
+
export function setValidValue(target, key, value) {
|
|
238
|
+
if (!target) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
target[key] = getValidValue(value);
|
|
242
|
+
}
|
|
243
|
+
export function getValidValue(value) {
|
|
244
|
+
if (value === undefined || value === null) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
if (isPlainObject(value) && isEmptyObj(value)) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
return value;
|
|
254
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IPlatformApp } from '../../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* [WeApps协议] to [CALS协议]
|
|
4
|
+
*
|
|
5
|
+
* @param data
|
|
6
|
+
*/
|
|
7
|
+
export declare function processComponentModule(data: any, optsions: {
|
|
8
|
+
dependencies: object[];
|
|
9
|
+
}): IPlatformApp;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/cals/utils/spinoff/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAuHjD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,GAAG,EACT,QAAQ,EAAE;IACR,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,GACA,YAAY,CAqBd"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { SPINOFF_SUFFIX } from '../../../../utils';
|
|
13
|
+
function serializeModuleName(ctx, moduleName, componentName) {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
let { dependencies = [], dependenciesMap = {} } = ctx;
|
|
16
|
+
const reg = new RegExp(`${SPINOFF_SUFFIX}$`);
|
|
17
|
+
if (ctx.streamlineModuleName) {
|
|
18
|
+
if (moduleName === ((_a = dependencies[0]) === null || _a === void 0 ? void 0 : _a.name)) {
|
|
19
|
+
moduleName = undefined;
|
|
20
|
+
}
|
|
21
|
+
let find = undefined;
|
|
22
|
+
for (let i = dependencies.length - 1; i > 0; i--) {
|
|
23
|
+
let lib = dependencies[i];
|
|
24
|
+
let currentModuleName = lib.name;
|
|
25
|
+
let key = `${currentModuleName}:${componentName}`;
|
|
26
|
+
if (!!dependenciesMap[key]) {
|
|
27
|
+
find = lib;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (find) {
|
|
32
|
+
if ((find === null || find === void 0 ? void 0 : find.name) === moduleName) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else if (((_b = dependencies[0]) === null || _b === void 0 ? void 0 : _b.name) === moduleName) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else if (moduleName &&
|
|
41
|
+
!reg.test(moduleName) &&
|
|
42
|
+
!dependenciesMap[`${moduleName}:${componentName}`] &&
|
|
43
|
+
dependenciesMap[`${moduleName}${SPINOFF_SUFFIX}:${componentName}`]) {
|
|
44
|
+
return `${moduleName}${SPINOFF_SUFFIX}`;
|
|
45
|
+
}
|
|
46
|
+
return moduleName;
|
|
47
|
+
}
|
|
48
|
+
function serializeComponent(ctx, component, scope = 'page') {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
// const scope = ctx.component?.id ? 'component' : 'page'
|
|
51
|
+
const componentName = ((_a = component.xComponent) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
52
|
+
const moduleName = serializeModuleName(ctx, (_b = component.xComponent) === null || _b === void 0 ? void 0 : _b.moduleName, componentName);
|
|
53
|
+
const componentCtx = Object.assign({}, ctx);
|
|
54
|
+
if (componentCtx.dependencies && !componentCtx.dependenciesMap) {
|
|
55
|
+
componentCtx.dependenciesMap = processDependenciesMap(componentCtx.dependencies || []);
|
|
56
|
+
}
|
|
57
|
+
const properties = component.properties
|
|
58
|
+
? Object.keys(component.properties).reduce((map, id) => {
|
|
59
|
+
map[id] = serializeComponent(componentCtx, Object.assign({}, component.properties[id]));
|
|
60
|
+
return map;
|
|
61
|
+
}, {})
|
|
62
|
+
: undefined;
|
|
63
|
+
return Object.assign(Object.assign({}, component), { xComponent: component.xComponent
|
|
64
|
+
? Object.assign(Object.assign({}, component.xComponent), { moduleName }) : undefined, properties });
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* [WeApps协议] to [CALS协议]
|
|
68
|
+
*
|
|
69
|
+
* @param data
|
|
70
|
+
*/
|
|
71
|
+
export function processComponentModule(data, optsions) {
|
|
72
|
+
let { version, selectedPageId, pageInstanceList, lowCodes = [], datasources, vars, dataset } = data, restData = __rest(data, ["version", "selectedPageId", "pageInstanceList", "lowCodes", "datasources", "vars", "dataset"]);
|
|
73
|
+
let { dependencies = [] } = optsions || {};
|
|
74
|
+
const ctx = {
|
|
75
|
+
app: data,
|
|
76
|
+
dependencies,
|
|
77
|
+
dependenciesMap: processDependenciesMap(dependencies),
|
|
78
|
+
};
|
|
79
|
+
const homePage = pageInstanceList === null || pageInstanceList === void 0 ? void 0 : pageInstanceList.find((page) => page.isHome);
|
|
80
|
+
let processed = Object.assign(Object.assign({}, data), { componentInstances: Object.keys(data.componentInstances || {}).reduce((map, id) => {
|
|
81
|
+
map[id] = serializeComponent(ctx, Object.assign({}, data.componentInstances[id]));
|
|
82
|
+
return map;
|
|
83
|
+
}, {}) });
|
|
84
|
+
return processed;
|
|
85
|
+
}
|
|
86
|
+
function processDependenciesMap(dependencies = []) {
|
|
87
|
+
let map = dependencies.reduce((map, componentLib) => {
|
|
88
|
+
let { components = [] } = componentLib;
|
|
89
|
+
for (let item of components) {
|
|
90
|
+
map[item.sourceKey] = item;
|
|
91
|
+
}
|
|
92
|
+
return map;
|
|
93
|
+
}, {});
|
|
94
|
+
return map;
|
|
95
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Properties } from 'csstype';
|
|
2
|
+
export declare function removeInvalidStyleFormValue(styleForm?: any): any;
|
|
3
|
+
/**
|
|
4
|
+
* Convert WeApps common style to css styles(React.CSSProperties)
|
|
5
|
+
* toRem/toRpx/toRpx 三者互斥 @deprecated
|
|
6
|
+
* 应使用 defaultUnit 来声明
|
|
7
|
+
*/
|
|
8
|
+
export declare function processCommonStyle2CSSProperties(commonStyle?: any, options?: {
|
|
9
|
+
/**
|
|
10
|
+
* 默认 px/无单位 转 rem
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
toRem?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 默认 px/无单位 转为rpx
|
|
16
|
+
* @deprecated
|
|
17
|
+
*/
|
|
18
|
+
toRpx?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* px/无单位情况下 处理为何单位
|
|
21
|
+
* rem | rpx | px
|
|
22
|
+
* 优先级高于以上
|
|
23
|
+
*/
|
|
24
|
+
defaultUnit?: 'rem' | 'px' | 'rpx';
|
|
25
|
+
/**
|
|
26
|
+
* 是否使用 calc(xx px / `${rpxCalcRoot}`) 来模拟rpx
|
|
27
|
+
* 小程序不需要转
|
|
28
|
+
*/
|
|
29
|
+
rpxCalcRoot?: string;
|
|
30
|
+
ignoreSelf?: boolean;
|
|
31
|
+
addPXUnit?: boolean;
|
|
32
|
+
}): Properties<string | number>;
|
|
33
|
+
interface ITranslateStyleOptions {
|
|
34
|
+
looseError?: boolean;
|
|
35
|
+
rpxCalcRoot?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated
|
|
39
|
+
*/
|
|
40
|
+
export declare function processCSSProperties2Rem(style?: Properties<string | number>, options?: ITranslateStyleOptions): Properties<string | number>;
|
|
41
|
+
export declare function processCSSPropertiesUnit(style: Properties<string | number>, type: 'px' | 'rem' | 'rpx', options?: ITranslateStyleOptions): {};
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKrC,wBAAgB,2BAA2B,CAAC,SAAS,GAAE,GAA2B,GAAG,GAAG,CAUvF;AA4JD;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,WAAW,GAAE,GAAQ,EACrB,OAAO,GAAE;IACP;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;IACnC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACwE,GAC7F,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CA0S7B;AACD,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AACD;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,GAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAM,EACvC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CAE7B;AACD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAM,EACvC,IAAI,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,EAC1B,OAAO,CAAC,EAAE,sBAAsB,MAcjC"}
|