shoplazza-cli 1.1.2 → 2.0.0
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/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +206 -332
- package/README.zh.md +318 -0
- package/package.json +24 -70
- package/scripts/install.js +144 -0
- package/scripts/jsbuild/dev/index.js +123 -0
- package/scripts/jsbuild/index.js +77 -0
- package/{lib/checkout/build → scripts/jsbuild}/plugin/vite-plugin-add-extension-id.js +4 -2
- package/scripts/jsbuild/vite.config.js +35 -0
- package/scripts/run.js +29 -0
- package/.editorconfig +0 -28
- package/.prettierrc +0 -9
- package/bin/shoplazza +0 -137
- package/fixtures/assets/blog.scss +0 -74
- package/fixtures/assets/cart_modal.scss +0 -450
- package/fixtures/assets/collection_detail.js +0 -234
- package/fixtures/assets/collection_detail.scss +0 -345
- package/fixtures/assets/collection_list.scss +0 -11
- package/fixtures/assets/collection_slider.scss +0 -169
- package/fixtures/assets/feature_columns.scss +0 -26
- package/fixtures/assets/feature_product.scss +0 -109
- package/fixtures/assets/footer.js +0 -58
- package/fixtures/assets/footer.scss +0 -337
- package/fixtures/assets/four_images.scss +0 -29
- package/fixtures/assets/gallery.scss +0 -55
- package/fixtures/assets/header.js +0 -178
- package/fixtures/assets/header.scss +0 -929
- package/fixtures/assets/image_text.scss +0 -72
- package/fixtures/assets/logo_bar.scss +0 -11
- package/fixtures/assets/newsletter.scss +0 -90
- package/fixtures/assets/not_found.scss +0 -39
- package/fixtures/assets/page_detail.scss +0 -16
- package/fixtures/assets/pagination.scss +0 -150
- package/fixtures/assets/postcss.config.js +0 -6
- package/fixtures/assets/product_description.scss +0 -88
- package/fixtures/assets/product_detail.js +0 -634
- package/fixtures/assets/product_detail.scss +0 -1106
- package/fixtures/assets/relative_product.scss +0 -45
- package/fixtures/assets/reviews.scss +0 -70
- package/fixtures/assets/rich_text.scss +0 -71
- package/fixtures/assets/search.js +0 -87
- package/fixtures/assets/search.scss +0 -67
- package/fixtures/assets/slide.scss +0 -51
- package/fixtures/assets/slider.scss +0 -141
- package/fixtures/assets/test.scss +0 -1
- package/fixtures/assets/theme.css +0 -976
- package/fixtures/assets/theme.scss +0 -1100
- package/fixtures/assets/three_images.scss +0 -20
- package/fixtures/assets/tools.scss +0 -23
- package/fixtures/assets/two_images.scss +0 -24
- package/fixtures/assets/video.scss +0 -45
- package/fixtures/assets/video_text.scss +0 -63
- package/fixtures/config/settings_data.json +0 -107
- package/fixtures/config/settings_schema.json +0 -690
- package/fixtures/layout/theme.liquid +0 -76
- package/fixtures/locales/ar-SA.json +0 -212
- package/fixtures/locales/de-DE.json +0 -290
- package/fixtures/locales/en-US.json +0 -290
- package/fixtures/locales/es-ES.json +0 -290
- package/fixtures/locales/fr-FR.json +0 -290
- package/fixtures/locales/id-ID.json +0 -212
- package/fixtures/locales/it-IT.json +0 -212
- package/fixtures/locales/ja-JP.json +0 -289
- package/fixtures/locales/ko-KR.json +0 -290
- package/fixtures/locales/nl-NL.json +0 -290
- package/fixtures/locales/pl-PL.json +0 -290
- package/fixtures/locales/pt-PT.json +0 -212
- package/fixtures/locales/ru-RU.json +0 -212
- package/fixtures/locales/th-TH.json +0 -212
- package/fixtures/locales/zh-CN.json +0 -290
- package/fixtures/locales/zh-TW.json +0 -290
- package/fixtures/sections/apps.liquid +0 -47
- package/fixtures/sections/blog.liquid +0 -137
- package/fixtures/sections/collection_desc.liquid +0 -34
- package/fixtures/sections/collection_detail.liquid +0 -436
- package/fixtures/sections/collection_image.liquid +0 -104
- package/fixtures/sections/collection_list.liquid +0 -161
- package/fixtures/sections/collection_name.liquid +0 -34
- package/fixtures/sections/collection_slider.liquid +0 -330
- package/fixtures/sections/feature_columns.liquid +0 -275
- package/fixtures/sections/feature_product.liquid +0 -227
- package/fixtures/sections/footer.liquid +0 -488
- package/fixtures/sections/four_images.liquid +0 -160
- package/fixtures/sections/gallery.liquid +0 -258
- package/fixtures/sections/header.liquid +0 -1157
- package/fixtures/sections/html.liquid +0 -40
- package/fixtures/sections/image_text.liquid +0 -350
- package/fixtures/sections/instagram_plus.liquid +0 -393
- package/fixtures/sections/logo_bar.liquid +0 -183
- package/fixtures/sections/newsletter.liquid +0 -225
- package/fixtures/sections/not_found.liquid +0 -39
- package/fixtures/sections/overlay_image.liquid +0 -648
- package/fixtures/sections/page_detail.liquid +0 -39
- package/fixtures/sections/photo_collection.liquid +0 -433
- package/fixtures/sections/product_description.liquid +0 -208
- package/fixtures/sections/product_detail.liquid +0 -611
- package/fixtures/sections/products.liquid +0 -216
- package/fixtures/sections/relative_product.liquid +0 -121
- package/fixtures/sections/reviews.liquid +0 -115
- package/fixtures/sections/rich_text.liquid +0 -157
- package/fixtures/sections/search.liquid +0 -163
- package/fixtures/sections/slide.liquid +0 -719
- package/fixtures/sections/three_images.liquid +0 -157
- package/fixtures/sections/two_images.liquid +0 -125
- package/fixtures/sections/video.liquid +0 -95
- package/fixtures/sections/video_text.liquid +0 -128
- package/fixtures/snippets/bgset.liquid +0 -21
- package/fixtures/snippets/card_title.liquid +0 -8
- package/fixtures/snippets/cart_modal.liquid +0 -74
- package/fixtures/snippets/collection.liquid +0 -77
- package/fixtures/snippets/collection_filter_modal.liquid +0 -56
- package/fixtures/snippets/default_image_4.liquid +0 -14
- package/fixtures/snippets/default_image_6.liquid +0 -18
- package/fixtures/snippets/default_image_8.liquid +0 -23
- package/fixtures/snippets/four_images_item.liquid +0 -8
- package/fixtures/snippets/header_ads.liquid +0 -95
- package/fixtures/snippets/hero_image.liquid +0 -94
- package/fixtures/snippets/icon_video_play_large.liquid +0 -1
- package/fixtures/snippets/icon_video_play_medium.liquid +0 -4
- package/fixtures/snippets/icon_video_play_small.liquid +0 -4
- package/fixtures/snippets/lazyimg.liquid +0 -22
- package/fixtures/snippets/lazyimg_art.liquid +0 -36
- package/fixtures/snippets/lazysizes.liquid +0 -41
- package/fixtures/snippets/link.liquid +0 -2
- package/fixtures/snippets/pagination.liquid +0 -48
- package/fixtures/snippets/product.liquid +0 -126
- package/fixtures/snippets/product_art_tpl.liquid +0 -152
- package/fixtures/snippets/product_info_body.liquid +0 -337
- package/fixtures/snippets/product_info_tpl.liquid +0 -423
- package/fixtures/snippets/product_label.liquid +0 -46
- package/fixtures/snippets/settings.liquid +0 -295
- package/fixtures/snippets/social-meta-tags.liquid +0 -106
- package/fixtures/snippets/video_html.liquid +0 -11
- package/fixtures/snippets/video_source.liquid +0 -98
- package/fixtures/snippets/video_thumb_icon.liquid +0 -2
- package/fixtures/templates/404.liquid +0 -1
- package/fixtures/templates/collection.liquid +0 -92
- package/fixtures/templates/index.liquid +0 -206
- package/fixtures/templates/page.liquid +0 -1
- package/fixtures/templates/product.liquid +0 -99
- package/fixtures/templates/search.liquid +0 -1
- package/jest.config.js +0 -192
- package/lib/__tests__/log.test.js +0 -15
- package/lib/__tests__/utils.test.js +0 -69
- package/lib/app/api/cli.js +0 -225
- package/lib/app/api/openapi.js +0 -121
- package/lib/app/api/partnerOpenapi.js +0 -104
- package/lib/app/bin/index.js +0 -20
- package/lib/app/bin/javy/javy-arm-linux-v5.0.1 +0 -0
- package/lib/app/bin/javy/javy-arm-macos-v5.0.1 +0 -0
- package/lib/app/bin/javy/javy-x86_64-linux-v5.0.1 +0 -0
- package/lib/app/bin/javy/javy-x86_64-macos-v5.0.1 +0 -0
- package/lib/app/bin/javy/javy-x86_64-windows-v5.0.1 +0 -0
- package/lib/app/commands/config/actions/link.js +0 -189
- package/lib/app/commands/config/actions/use.js +0 -40
- package/lib/app/commands/config/index.js +0 -25
- package/lib/app/commands/config/link.js +0 -11
- package/lib/app/commands/config/use.js +0 -11
- package/lib/app/commands/deploy/actions/deploy.js +0 -196
- package/lib/app/commands/deploy/index.js +0 -11
- package/lib/app/commands/dev/actions/dev.js +0 -206
- package/lib/app/commands/dev/index.js +0 -11
- package/lib/app/commands/generate/actions/extension.js +0 -97
- package/lib/app/commands/generate/actions/generateCheckout.js +0 -58
- package/lib/app/commands/generate/actions/generateFunction.js +0 -56
- package/lib/app/commands/generate/actions/generateTheme.js +0 -128
- package/lib/app/commands/generate/extension.js +0 -11
- package/lib/app/commands/generate/index.js +0 -22
- package/lib/app/commands/index.js +0 -82
- package/lib/app/commands/info/actions/info.js +0 -168
- package/lib/app/commands/info/index.js +0 -11
- package/lib/app/commands/init/actions/init.js +0 -176
- package/lib/app/commands/init/index.js +0 -14
- package/lib/app/commands/versions/actions/list.js +0 -210
- package/lib/app/commands/versions/index.js +0 -22
- package/lib/app/commands/versions/list.js +0 -14
- package/lib/app/constant/code.js +0 -7
- package/lib/app/constant/color.js +0 -18
- package/lib/app/constant/extension.js +0 -16
- package/lib/app/constant/host.js +0 -23
- package/lib/app/constant/sso.js +0 -7
- package/lib/app/index.js +0 -8
- package/lib/app/services/auth/config.js +0 -33
- package/lib/app/services/auth/index.js +0 -9
- package/lib/app/services/auth/oauth-server.js +0 -70
- package/lib/app/services/auth/partner-token.js +0 -45
- package/lib/app/services/auth/sso-token.js +0 -69
- package/lib/app/services/auth/store-token.js +0 -100
- package/lib/app/services/auth/url-builder.js +0 -23
- package/lib/app/services/config/index.js +0 -41
- package/lib/app/services/devServer/app.js +0 -76
- package/lib/app/services/devServer/index.js +0 -103
- package/lib/app/services/devServer/middleware/hmacValidatorMiddleWare.js +0 -20
- package/lib/app/services/devServer/middleware/index.js +0 -5
- package/lib/app/services/devServer/tunnel/index.js +0 -43
- package/lib/app/services/devServer/tunnel/providers/cloudflare.js +0 -364
- package/lib/app/services/devServer/tunnel/providers/ngrok.js +0 -70
- package/lib/app/services/devServer/utils/index.js +0 -5
- package/lib/app/services/devServer/utils/secureCompare.js +0 -5
- package/lib/app/services/devServer/views/app.ejs +0 -133
- package/lib/app/services/extension-build/buildCheckout.js +0 -47
- package/lib/app/services/extension-build/buildFunction.js +0 -57
- package/lib/app/services/extension-build/buildTheme.js +0 -100
- package/lib/app/services/extension-build/index.js +0 -23
- package/lib/app/services/extension-build/plugins/vite-plugin-add-extension-id.js +0 -26
- package/lib/app/services/extension-diff/index.js +0 -132
- package/lib/app/services/extension-upsert/index.js +0 -21
- package/lib/app/services/extension-upsert/upsertCheckout.js +0 -44
- package/lib/app/services/extension-upsert/upsertFunction.js +0 -52
- package/lib/app/services/extension-upsert/upsertTheme.js +0 -113
- package/lib/app/services/oss/index.js +0 -45
- package/lib/app/services/partner/index.js +0 -52
- package/lib/app/store/base-store.js +0 -37
- package/lib/app/store/config-store.js +0 -55
- package/lib/app/store/config.js +0 -21
- package/lib/app/store/index.js +0 -14
- package/lib/app/store/install-store.js +0 -41
- package/lib/app/store/sso-store.js +0 -55
- package/lib/app/utils/asyncPool.js +0 -42
- package/lib/app/utils/debug/index.js +0 -16
- package/lib/app/utils/env.js +0 -24
- package/lib/app/utils/error.js +0 -20
- package/lib/app/utils/git.js +0 -20
- package/lib/app/utils/json.js +0 -27
- package/lib/app/utils/path.js +0 -33
- package/lib/app/utils/platform.js +0 -37
- package/lib/app/utils/request/cli.js +0 -72
- package/lib/app/utils/request/debug.js +0 -13
- package/lib/app/utils/request/openapi.js +0 -67
- package/lib/app/utils/request/partnerOpenapi.js +0 -47
- package/lib/app/utils/toml.js +0 -56
- package/lib/app/utils/views/message.js +0 -68
- package/lib/app/utils/views/select.js +0 -36
- package/lib/app/utils/withTempDir.js +0 -55
- package/lib/auth/__mocks__/getCode.js +0 -7
- package/lib/auth/__mocks__/index.js +0 -0
- package/lib/auth/child.js +0 -23
- package/lib/auth/getCode.js +0 -39
- package/lib/auth/index.js +0 -134
- package/lib/check.js +0 -28
- package/lib/checkout/api.js +0 -164
- package/lib/checkout/build/plugin/vite-plugin-transform-extension-html.js +0 -207
- package/lib/checkout/build/vite.config.js +0 -34
- package/lib/checkout/build.js +0 -38
- package/lib/checkout/config.js +0 -97
- package/lib/checkout/create.js +0 -132
- package/lib/checkout/delete.js +0 -26
- package/lib/checkout/deploy.js +0 -59
- package/lib/checkout/dev/index.js +0 -143
- package/lib/checkout/fields.js +0 -29
- package/lib/checkout/index.js +0 -63
- package/lib/checkout/preview.js +0 -52
- package/lib/checkout/pull.js +0 -22
- package/lib/checkout/push.js +0 -141
- package/lib/checkout/template/README.md +0 -34
- package/lib/checkout/template/_gitignore +0 -4
- package/lib/checkout/template/extension.config.js +0 -4
- package/lib/checkout/template/extensions/extension-template/extension.json +0 -10
- package/lib/checkout/template/extensions/extension-template/src/content.html +0 -3
- package/lib/checkout/template/extensions/extension-template/src/index.html +0 -5
- package/lib/checkout/template/extensions/extension-template/src/index.js +0 -11
- package/lib/checkout/template/extensions/extension-template/src/script.html +0 -3
- package/lib/checkout/template/extensions/extension-template/src/style.html +0 -3
- package/lib/checkout/template/package.json +0 -17
- package/lib/checkout/undeploy.js +0 -40
- package/lib/checkout/util.js +0 -201
- package/lib/checkout/verify.js +0 -16
- package/lib/checkout/version.js +0 -7
- package/lib/commands/__tests__/login.test.js +0 -77
- package/lib/commands/__tests__/logout.test.js +0 -29
- package/lib/commands/__tests__/store.test.js +0 -44
- package/lib/commands/__tests__/switch.test.js +0 -45
- package/lib/commands/login.js +0 -120
- package/lib/commands/logout.js +0 -23
- package/lib/commands/store.js +0 -14
- package/lib/commands/switch.js +0 -52
- package/lib/commands/theme/__tests__/delete.test.js +0 -49
- package/lib/commands/theme/__tests__/init.test.js +0 -21
- package/lib/commands/theme/__tests__/list.test.js +0 -80
- package/lib/commands/theme/__tests__/package.test.js +0 -17
- package/lib/commands/theme/__tests__/publish.test.js +0 -61
- package/lib/commands/theme/__tests__/pull.test.js +0 -69
- package/lib/commands/theme/__tests__/push.test.js +0 -63
- package/lib/commands/theme/__tests__/serve.test.js +0 -107
- package/lib/commands/theme/delete.js +0 -64
- package/lib/commands/theme/init.js +0 -51
- package/lib/commands/theme/list.js +0 -28
- package/lib/commands/theme/package.js +0 -37
- package/lib/commands/theme/publish.js +0 -56
- package/lib/commands/theme/pull.js +0 -62
- package/lib/commands/theme/push.js +0 -106
- package/lib/commands/theme/serve.js +0 -153
- package/lib/commands/theme/share.js +0 -20
- package/lib/commands/version.js +0 -6
- package/lib/common/constants.js +0 -24
- package/lib/common/db/partner.js +0 -91
- package/lib/common/inquirers/choose-app.js +0 -79
- package/lib/common/inquirers/choose-partner.js +0 -74
- package/lib/common/log.js +0 -15
- package/lib/common/login.js +0 -125
- package/lib/common/logout.js +0 -16
- package/lib/db/__mocks__/index.js +0 -9
- package/lib/db/__tests__/analytics.test.js +0 -19
- package/lib/db/__tests__/user.test.js +0 -20
- package/lib/db/analytics.js +0 -48
- package/lib/db/index.js +0 -9
- package/lib/db/user.js +0 -71
- package/lib/function/bin/index.js +0 -20
- package/lib/function/bin/javy/javy-arm-linux-v5.0.1 +0 -0
- package/lib/function/bin/javy/javy-arm-macos-v5.0.1 +0 -0
- package/lib/function/bin/javy/javy-x86_64-linux-v5.0.1 +0 -0
- package/lib/function/bin/javy/javy-x86_64-macos-v5.0.1 +0 -0
- package/lib/function/bin/javy/javy-x86_64-windows-v5.0.1 +0 -0
- package/lib/function/commands/compile.js +0 -43
- package/lib/function/commands/create.js +0 -77
- package/lib/function/commands/list.js +0 -18
- package/lib/function/commands/release.js +0 -69
- package/lib/function/index.js +0 -24
- package/lib/function/template/js/README.md +0 -37
- package/lib/function/template/js/_gitignore +0 -4
- package/lib/function/template/js/extension.config.json +0 -5
- package/lib/function/template/js/package.json +0 -17
- package/lib/function/template/js/src/index.js +0 -64
- package/lib/function/utils.js +0 -29
- package/lib/log.js +0 -13
- package/lib/openAPI/__mocks__/index.js +0 -20
- package/lib/openAPI/api.js +0 -76
- package/lib/openAPI/index.js +0 -56
- package/lib/oss.js +0 -102
- package/lib/partner-api/axios.js +0 -67
- package/lib/partner-api/index.js +0 -79
- package/lib/report.js +0 -37
- package/lib/theme-extension/api/index.js +0 -96
- package/lib/theme-extension/commands/build.js +0 -114
- package/lib/theme-extension/commands/connect.js +0 -73
- package/lib/theme-extension/commands/create.js +0 -105
- package/lib/theme-extension/commands/deploy.js +0 -56
- package/lib/theme-extension/commands/list.js +0 -35
- package/lib/theme-extension/commands/release.js +0 -59
- package/lib/theme-extension/commands/serve.js +0 -179
- package/lib/theme-extension/commands/versions.js +0 -55
- package/lib/theme-extension/index.js +0 -29
- package/lib/theme-extension/template/basic-app/README.md +0 -125
- package/lib/theme-extension/template/basic-app/extension.config.json +0 -4
- package/lib/theme-extension/template/basic-app/package.json +0 -18
- package/lib/theme-extension/template/basic-app/theme-app/assets/index.css +0 -4
- package/lib/theme-extension/template/basic-app/theme-app/assets-manifest.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/blocks/index.liquid +0 -16
- package/lib/theme-extension/template/basic-app/theme-app/locales/ar-SA.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/de-DE.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/en-US.json +0 -6
- package/lib/theme-extension/template/basic-app/theme-app/locales/es-ES.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/fr-FR.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/id-ID.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/it-IT.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/ja-JP.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/ko-KR.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/nl-NL.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/pl-PL.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/pt-PT.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/ru-RU.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/th-TH.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/zh-CN.json +0 -6
- package/lib/theme-extension/template/basic-app/theme-app/locales/zh-TW.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/snippets/index.liquid +0 -8
- package/lib/theme-extension/template/embed-app/README.md +0 -125
- package/lib/theme-extension/template/embed-app/extension.config.json +0 -4
- package/lib/theme-extension/template/embed-app/package.json +0 -18
- package/lib/theme-extension/template/embed-app/theme-app/assets-manifest.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/blocks/index.liquid +0 -18
- package/lib/theme-extension/template/embed-app/theme-app/locales/ar-SA.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/de-DE.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/en-US.json +0 -6
- package/lib/theme-extension/template/embed-app/theme-app/locales/es-ES.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/fr-FR.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/id-ID.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/it-IT.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/ja-JP.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/ko-KR.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/nl-NL.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/pl-PL.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/pt-PT.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/ru-RU.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/th-TH.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/zh-CN.json +0 -6
- package/lib/theme-extension/template/embed-app/theme-app/locales/zh-TW.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/snippets/index.liquid +0 -8
- package/lib/theme-extension/template/embed-app/theme-app/snippets/index_css.liquid +0 -6
- package/lib/theme-extension/utils/config.js +0 -32
- package/lib/theme-extension/utils/index.js +0 -213
- package/lib/tracing.js +0 -50
- package/lib/utils/config.js +0 -12
- package/lib/utils/console.js +0 -33
- package/lib/utils/env.js +0 -17
- package/lib/utils/file.js +0 -48
- package/lib/utils/platform.js +0 -37
- package/lib/utils/utils.js +0 -165
- /package/{lib/checkout → scripts/jsbuild}/dev/client.js +0 -0
- /package/{lib/app/services/extension-build/plugins → scripts/jsbuild/plugin}/vite-plugin-transform-extension-html.js +0 -0
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
<div class="container container-gap">
|
|
2
|
-
{% if section.settings.title %}
|
|
3
|
-
<div id="blog-{{section.id}}-title" {% if shop.env == 0 %} style="display:none" {% endif %} >
|
|
4
|
-
{% include 'card_title',
|
|
5
|
-
title: section.settings.title,
|
|
6
|
-
titlePath: 'title'
|
|
7
|
-
%}
|
|
8
|
-
</div>
|
|
9
|
-
{% endif %}
|
|
10
|
-
<div id="blog-{{section.id}}-articles" class="row"></div>
|
|
11
|
-
<div style="margin:3.5rem 0;text-align:center;display:none;" id="blog-{{section.id}}-viewall">
|
|
12
|
-
<a href="{{section.settings.blog.url}}" class="btn btn-primary dj_skin_title_font">{{ 'i18n.general.view.view_all' | t }}</a>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
{% use 'blog.css' %}
|
|
16
|
-
{% javascript %}
|
|
17
|
-
$(function(){
|
|
18
|
-
var settings = {{ section.settings | json }};
|
|
19
|
-
var sectionId = "{{section.id}}";
|
|
20
|
-
(function(callback){
|
|
21
|
-
if(settings.blog && settings.blog.id && settings.blog.url){
|
|
22
|
-
$.get('/api/front' + settings.blog.url + '/articles?per_page=' + settings.size + '&page=1').then(function(res){
|
|
23
|
-
$("#blog-{{section.id}}-viewall")[res.count > settings.size?"show":"hide"]();
|
|
24
|
-
callback(res.articles);
|
|
25
|
-
})
|
|
26
|
-
}else{
|
|
27
|
-
callback([]);
|
|
28
|
-
}
|
|
29
|
-
})(function(arr){
|
|
30
|
-
{% if shop.env == 1 %}
|
|
31
|
-
arr = arr.concat(Array.apply(null, Array(settings.size-arr.length)).map(function(){
|
|
32
|
-
return {url:"javascript:$.toast.show({content:'请添加博客专辑'});",published_at:"2019-06-14T00:30:47Z",author:"{{shop.name}}",title:"New Pattern Spotlight: The Micro-Stripe",excerpt:"With an expansive collection of solid and heather colors in our line, the idea of adding a pattern to our collection has naturally been for years",blogs:[{title:"category1"},{title:"category2"}]};
|
|
33
|
-
}));
|
|
34
|
-
{% endif %}
|
|
35
|
-
arr.length && ($("#blog-{{section.id}}-title").show());
|
|
36
|
-
$("#blog-{{section.id}}-articles").html(arr.map(function(a){
|
|
37
|
-
return window.template("blogs-tpl", { article: a });
|
|
38
|
-
}).join(""));
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
{% endjavascript %}
|
|
42
|
-
|
|
43
|
-
<script id="blogs-tpl" type="text/html">
|
|
44
|
-
<div class="col-12 col-md-6">
|
|
45
|
-
<a href="<%= article.url %>" class="article__img">
|
|
46
|
-
<div class="common__img-wrapper_lazy" style="padding-bottom: 57%;overflow:hidden;">
|
|
47
|
-
{% assign defaultImg = 'oss/operation/1468cb0e248c143782cd5161c2a81455.png' | img_url: '1080x' %}
|
|
48
|
-
<% var src = article.image && article.image.src ? article.image.src : '{{defaultImg}}'; %>
|
|
49
|
-
<img src="{{shop.default_img}}" data-src="<%= src %>"
|
|
50
|
-
style="width: 100%;max-height: unset;"
|
|
51
|
-
alt="<%= (article.image && article.image.alt) || article.title %>" class="lazy lazyload">
|
|
52
|
-
</div>
|
|
53
|
-
</a>
|
|
54
|
-
<div class="article__date">
|
|
55
|
-
<% if (article.published_at) { %>
|
|
56
|
-
<span><%= $imports.dateFormat($imports.toTimestamp(article.published_at), 'MM.dd.yyyy') %></span>
|
|
57
|
-
<% } %>
|
|
58
|
-
<% if (article.published_at && article.author) { %>
|
|
59
|
-
<span style='margin:0 10px;'>|</span>
|
|
60
|
-
<% } %>
|
|
61
|
-
<% if (article.author) { %>
|
|
62
|
-
<span><%= article.author %></span>
|
|
63
|
-
<% } %>
|
|
64
|
-
</div>
|
|
65
|
-
<a href="<%= article.url %>" class="article__title two_line_text_truncate"><%= article.title %></a>
|
|
66
|
-
<% if (article.excerpt) { %><div class="article__excerpt"><%= article.excerpt %></div><% } %>
|
|
67
|
-
<hr>
|
|
68
|
-
<div class="d-flex justify-content-between article__readline">
|
|
69
|
-
<a href="<%= article.url %>" class="article__read">{{ 'i18n.blog.general.blog_read' | t }}</a>
|
|
70
|
-
<span class="article__blogs two_line_text_truncate">
|
|
71
|
-
<% for (var i = 0; i < article.blogs.length; i++) { %>
|
|
72
|
-
<%= article.blogs[i].title %><% if (i < article.blogs.length - 1) { %>,<% } %>
|
|
73
|
-
<% } %>
|
|
74
|
-
</span>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</script>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{% schema %}
|
|
81
|
-
{
|
|
82
|
-
"name": "blog",
|
|
83
|
-
"settings": [
|
|
84
|
-
{
|
|
85
|
-
"type": "text",
|
|
86
|
-
"id": "title",
|
|
87
|
-
"label": {
|
|
88
|
-
"en-US": "Heading",
|
|
89
|
-
"zh-CN": "标题"
|
|
90
|
-
},
|
|
91
|
-
"default": "Blog",
|
|
92
|
-
"placeholder": "Blog"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"type": "range",
|
|
96
|
-
"label": {
|
|
97
|
-
"zh-CN": "博客显示数量",
|
|
98
|
-
"en-US": "Show blog posts"
|
|
99
|
-
},
|
|
100
|
-
"id": "size",
|
|
101
|
-
"min": 1,
|
|
102
|
-
"max": 8,
|
|
103
|
-
"step": 1,
|
|
104
|
-
"default": 8
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"type": "blog",
|
|
108
|
-
"id": "blog",
|
|
109
|
-
"label": {
|
|
110
|
-
"en-US": "Blog posts",
|
|
111
|
-
"zh-CN": "博客专辑"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
"blocks": [],
|
|
116
|
-
"presets": [
|
|
117
|
-
{
|
|
118
|
-
"name": "blog",
|
|
119
|
-
"cname": {
|
|
120
|
-
"zh-CN": "博客专辑",
|
|
121
|
-
"en-US": "Blogs"
|
|
122
|
-
},
|
|
123
|
-
"category": {
|
|
124
|
-
"en-US": "Material",
|
|
125
|
-
"zh-CN": "素材"
|
|
126
|
-
},
|
|
127
|
-
"ccategory": {
|
|
128
|
-
"en-US": "Material",
|
|
129
|
-
"zh-CN": "素材"
|
|
130
|
-
},
|
|
131
|
-
"display": true,
|
|
132
|
-
"blocks": [],
|
|
133
|
-
"icon": "oss/operation/a2a64b5c6aed6f57a53dcf82935520ae.svg"
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
{% endschema %}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{% if collection.description %}
|
|
2
|
-
<div class="container container-gap collection__container">
|
|
3
|
-
<div class="row">
|
|
4
|
-
<div class="collection__desc col-12 dj-mce-view">{{collection.description}}</div>
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
{% endif %}
|
|
8
|
-
|
|
9
|
-
{% schema %}
|
|
10
|
-
{
|
|
11
|
-
"name": "collection_desc",
|
|
12
|
-
"templates": ["collection"],
|
|
13
|
-
"limit": 1,
|
|
14
|
-
"settings": [],
|
|
15
|
-
"presets": [
|
|
16
|
-
{
|
|
17
|
-
"name": "collection_desc",
|
|
18
|
-
"cname": {
|
|
19
|
-
"en-US": "Collection description",
|
|
20
|
-
"zh-CN": "专辑描述"
|
|
21
|
-
},
|
|
22
|
-
"category": {
|
|
23
|
-
"en-US": "Page",
|
|
24
|
-
"zh-CN": "页面"
|
|
25
|
-
},
|
|
26
|
-
"ccategory": {
|
|
27
|
-
"en-US": "Page",
|
|
28
|
-
"zh-CN": "页面"
|
|
29
|
-
},
|
|
30
|
-
"display": true
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
{% endschema %}
|
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
{% use 'collection_detail.css' %}
|
|
2
|
-
{% assign limit = section.settings.limit | default: 40 %}
|
|
3
|
-
{% if section.settings.is_pagination_show == nil %}
|
|
4
|
-
{% assign is_pagination_show = false %}
|
|
5
|
-
{% else %}
|
|
6
|
-
{% assign is_pagination_show = section.settings.is_pagination_show %}
|
|
7
|
-
{% endif %}
|
|
8
|
-
|
|
9
|
-
{% paginate collection.products by limit %}
|
|
10
|
-
|
|
11
|
-
<div class="container container-gap collection__container">
|
|
12
|
-
{% comment %} 专辑商品列表 {% endcomment %}
|
|
13
|
-
<div class="row">
|
|
14
|
-
{% assign content_col = 'col-12 col-md-12' %}
|
|
15
|
-
{% assign product_col = 'col-6 col-md-3' %}
|
|
16
|
-
{% if section.settings.filter %}
|
|
17
|
-
{% include 'collection_filter_modal' %}
|
|
18
|
-
{% endif %}
|
|
19
|
-
<div class="{{content_col}}">
|
|
20
|
-
{% comment %} 排序部分 {% endcomment %}
|
|
21
|
-
<div class="collection__sort d-flex align-items-center justify-content-between" style="flex-wrap:wrap;">
|
|
22
|
-
<span class="collection__number">{{ 'i18n.collection.collection_detail.products' | t: count: collection.products_count }}</span>
|
|
23
|
-
{% if section.settings.sort or section.settings.sort == nil %}
|
|
24
|
-
{% assign show_sort = true %}
|
|
25
|
-
{% endif %}
|
|
26
|
-
<div class="d-flex justify-content-between collection__filter-buttons {% if section.settings.filter %}collection__filter-buttons_has-filter{% endif %}">
|
|
27
|
-
{% if section.settings.filter %}
|
|
28
|
-
<button
|
|
29
|
-
class="d-md-none form-control btn btn-primary collection__filter-by"
|
|
30
|
-
{% if show_sort %}
|
|
31
|
-
style="margin-right: 8px;"
|
|
32
|
-
{% endif %}>
|
|
33
|
-
{{ 'i18n.collection.collection_detail.filter_by' | t }}
|
|
34
|
-
</button>
|
|
35
|
-
{% endif %}
|
|
36
|
-
{% if show_sort %}
|
|
37
|
-
<span class="collection__sort-select d-flex align-items-center" style="margin-left: 8px;">
|
|
38
|
-
{% if collection.products_count > 0 %}
|
|
39
|
-
{% assign recomend = 'i18n.collection.collection_detail.recommend' | t %}
|
|
40
|
-
{% assign low_to_high = 'i18n.collection.collection_detail.low_to_high' | t %}
|
|
41
|
-
{% assign high_to_low = 'i18n.collection.collection_detail.high_to_low' | t %}
|
|
42
|
-
{% assign best_selling = 'i18n.collection.collection_detail.best_selling' | t %}
|
|
43
|
-
{% assign newest = 'i18n.collection.collection_detail.newest' | t %}
|
|
44
|
-
{% assign sales_descending = 'i18n.collection.collection_detail.sales_descending' | t %}
|
|
45
|
-
{% assign add_to_cart_count_descending = 'i18n.collection.collection_detail.add_to_cart_count_descending' | t %}
|
|
46
|
-
{% assign views_descending = 'i18n.collection.collection_detail.views_descending' | t %}
|
|
47
|
-
|
|
48
|
-
{% assign manual = "@manual|" %}
|
|
49
|
-
{% assign price_ascending = "@price-ascending|" %}
|
|
50
|
-
{% assign price_descending = "@price-descending|" %}
|
|
51
|
-
{% assign best_selling_tag = "@best-selling|" %}
|
|
52
|
-
{% assign published_descending = "@published-descending|" %}
|
|
53
|
-
{% assign sales_descending_value = '@best-selling|' %}
|
|
54
|
-
{% assign add_to_cart_count_descending_value = '@add_to_cart_count|' %}
|
|
55
|
-
{% assign views_descending_value = '@views' %}
|
|
56
|
-
{% comment %} {% assign options = recomend | append: manual | append: low_to_high | append: price_ascending | append: high_to_low | append: price_descending | append: best_selling | append: best_selling_tag | append: newest | append: published_descending | append: sales_descending | append: sales_descending_value | append: add_to_cart_count_descending_value | append: add_to_cart_count_descending | append: views_descending_value | append: views_descending %} {% endcomment %}
|
|
57
|
-
{% assign options = recomend | append: manual | append: low_to_high | append: price_ascending | append: high_to_low | append: price_descending | append: newest | append: published_descending | append: sales_descending | append: sales_descending_value | append: add_to_cart_count_descending | append: add_to_cart_count_descending_value | append: views_descending | append: views_descending_value %}
|
|
58
|
-
<span class="d-none d-md-block collection__sort-label" style="margin-right: 16px;">{{ 'i18n.collection.collection_detail.sort_by' | t }}</span>
|
|
59
|
-
{% assign price = product.price %}
|
|
60
|
-
{% assign compareAtPrice = product.compare_at_price %}
|
|
61
|
-
{% assign title = product.title %}
|
|
62
|
-
{% assign id = product.id %}
|
|
63
|
-
{% assign type = product.type %}
|
|
64
|
-
{% assign option = options | split: "|" %}
|
|
65
|
-
<span class="common__select">
|
|
66
|
-
<select class ="form-control">
|
|
67
|
-
{% for item in option %}
|
|
68
|
-
{% assign i = item | split: "@" %}
|
|
69
|
-
<option value="{{i[1]}}">{{i[0]}}</option>
|
|
70
|
-
{% endfor %}
|
|
71
|
-
</select>
|
|
72
|
-
</span>
|
|
73
|
-
{% javascript %}
|
|
74
|
-
$(function () {
|
|
75
|
-
var dom = $('[data-section-id={{section.id}}] .common__select');
|
|
76
|
-
dom.find('select').change(function () {
|
|
77
|
-
var select = dom.find('option:selected');
|
|
78
|
-
$(document).trigger('dj.common.sort_select.change', {
|
|
79
|
-
value: select.val(),
|
|
80
|
-
name: select.text(),
|
|
81
|
-
sectionId: '{{section.id}}'
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
|
-
})
|
|
85
|
-
{% endjavascript %}
|
|
86
|
-
{% endif %}
|
|
87
|
-
</span>
|
|
88
|
-
{% endif %}
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
<div class="row collection-product__wrapper" data-top-products-flag="enabled">
|
|
92
|
-
{% comment %} 置顶商品 {% endcomment %}
|
|
93
|
-
{% assign top_product_ids = "" %}
|
|
94
|
-
{% assign has_valid_top_product = false %}
|
|
95
|
-
{% assign params = REQUEST_URI | split: "?" | last | split: "&" %}
|
|
96
|
-
{% for p in params %}
|
|
97
|
-
{% assign pair = p | split: "=" %}
|
|
98
|
-
{% if pair[0] == "page" and pair[1] != "1" and REQUEST_URI contains 'show_page=first_page' %}
|
|
99
|
-
{% assign top_product_ids = "" %}
|
|
100
|
-
{% break %}
|
|
101
|
-
{% endif %}
|
|
102
|
-
{% if pair[0] == "ids" and pair[1] != '' %}
|
|
103
|
-
{% assign top_product_ids = pair[1] %}
|
|
104
|
-
{% endif %}
|
|
105
|
-
{% endfor %}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{% if top_product_ids != "" %}
|
|
109
|
-
{% assign top_product_ids_arr = top_product_ids | url_decode | split: "," %}
|
|
110
|
-
{% for product_id in top_product_ids_arr %}
|
|
111
|
-
{% if product_id != "" %}
|
|
112
|
-
{% assign product = all_products[product_id] %}
|
|
113
|
-
{% if product.published %}
|
|
114
|
-
{% assign has_valid_top_product = true %}
|
|
115
|
-
<div class="{{product_col}} common__product-gap top-product">
|
|
116
|
-
{% include 'product', product: product %}
|
|
117
|
-
</div>
|
|
118
|
-
{% endif %}
|
|
119
|
-
{% endif %}
|
|
120
|
-
{% endfor %}
|
|
121
|
-
{% endif %}
|
|
122
|
-
|
|
123
|
-
{% for product in collection.products %}
|
|
124
|
-
{% if product.published %}
|
|
125
|
-
{% unless top_product_ids contains product.id %}
|
|
126
|
-
<div class="{{product_col}} common__product-gap">
|
|
127
|
-
{% include 'product', product: product %}
|
|
128
|
-
</div>
|
|
129
|
-
{% endunless %}
|
|
130
|
-
{% endif %}
|
|
131
|
-
{% endfor %}
|
|
132
|
-
{% comment %} 列表空 {% endcomment %}
|
|
133
|
-
{% if collection.products_count == 0 and has_valid_top_product != true %}
|
|
134
|
-
<div class="col-12 text-center collection__none">{{ 'i18n.collection.collection_detail.coming_soon' | t }}</div>
|
|
135
|
-
<div class="col-12 text-center collection__none-btn"><a href="/" class="btn btn-primary col-12">{{ 'i18n.collection.collection_detail.continue_shopping' | t }}</a></div>
|
|
136
|
-
{% endif %}
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
{% comment %} 加载更多 {% endcomment %}
|
|
141
|
-
{% comment %} 分页 {% endcomment %}
|
|
142
|
-
{% if is_pagination_show and collection.products_count != 0 %}
|
|
143
|
-
<div class="row collection__pagination">
|
|
144
|
-
<div id="pagination" class="col-12"></div>
|
|
145
|
-
</div>
|
|
146
|
-
{% endif %}
|
|
147
|
-
</div>
|
|
148
|
-
|
|
149
|
-
{% comment %} 定义前端模板 {% endcomment %}
|
|
150
|
-
<script id="collection-art-tpl" type="text/html">
|
|
151
|
-
<% var col = 'col-6 col-md-3' %>
|
|
152
|
-
<% if (filter == 'true') { %>
|
|
153
|
-
<% col = 'col-6 col-md-4' %>
|
|
154
|
-
<% } %>
|
|
155
|
-
<% for(var i = 0; i < products.length; i++) { %>
|
|
156
|
-
<div class="<%= col %> common__product-gap">
|
|
157
|
-
<% include ('product_art_tpl', {
|
|
158
|
-
product: products[i]
|
|
159
|
-
}) %>
|
|
160
|
-
</div>
|
|
161
|
-
<% } %>
|
|
162
|
-
</script>
|
|
163
|
-
{% comment %} 定义搜索结果空模板 {% endcomment %}
|
|
164
|
-
<script id="collection-empty-art-tpl" type="text/html">
|
|
165
|
-
<div style="margin: 100px auto;color: #999;font-size: 14px;" class="collection-empty-art-tpl">{{ 'i18n.collection.collection_detail.no_result' | t }}</div>
|
|
166
|
-
</script>
|
|
167
|
-
{% include 'pagination' %}
|
|
168
|
-
{% javascript %}
|
|
169
|
-
|
|
170
|
-
$(function () {
|
|
171
|
-
$.collectionDetail && $.collectionDetail({
|
|
172
|
-
filter: '{{section.settings.filter}}',
|
|
173
|
-
id: '{{ section.id }}',
|
|
174
|
-
env: '{{ shop.env }}',
|
|
175
|
-
collection_id: '{{ collection.id }}',
|
|
176
|
-
lang: {{ 'i18n.collection.collection_detail' | t | json }},
|
|
177
|
-
products_count: {{ collection.products_count }},
|
|
178
|
-
is_pagination_show: {{ is_pagination_show }},
|
|
179
|
-
limit: {{ limit }},
|
|
180
|
-
current_tags:{{ current_tags | json }},
|
|
181
|
-
current_page: {{ paginate.current_page }},
|
|
182
|
-
pages: {{ paginate.pages }},
|
|
183
|
-
handle: "{{ collection.handle }}"
|
|
184
|
-
});
|
|
185
|
-
})
|
|
186
|
-
{% endjavascript %}
|
|
187
|
-
|
|
188
|
-
{% endpaginate %}
|
|
189
|
-
|
|
190
|
-
{% schema %}
|
|
191
|
-
{
|
|
192
|
-
"name": "collection_detail",
|
|
193
|
-
"templates": ["collection"],
|
|
194
|
-
"limit": 1,
|
|
195
|
-
"contentType": [
|
|
196
|
-
"collection"
|
|
197
|
-
],
|
|
198
|
-
"max_blocks": 10,
|
|
199
|
-
"settings": [
|
|
200
|
-
{
|
|
201
|
-
"type": "select",
|
|
202
|
-
"id": "limit",
|
|
203
|
-
"label": {
|
|
204
|
-
"zh-CN": "每页商品数",
|
|
205
|
-
"en-US": "Number of products per page"
|
|
206
|
-
},
|
|
207
|
-
"default": 48,
|
|
208
|
-
"options": [
|
|
209
|
-
{
|
|
210
|
-
"value": 8,
|
|
211
|
-
"label": "8"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"value": 12,
|
|
215
|
-
"label": "12"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"value": 16,
|
|
219
|
-
"label": "16"
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
"value": 24,
|
|
223
|
-
"label": "24"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"value": 40,
|
|
227
|
-
"label": "40"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"value": 48,
|
|
231
|
-
"label": "48"
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
"value": 60,
|
|
235
|
-
"label": "60"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"value": 72,
|
|
239
|
-
"label": "72"
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"value": 80,
|
|
243
|
-
"label": "80"
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
"value": 84,
|
|
247
|
-
"label": "84"
|
|
248
|
-
}
|
|
249
|
-
]
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"type": "checkbox",
|
|
253
|
-
"id": "is_pagination_show",
|
|
254
|
-
"label": {
|
|
255
|
-
"en-US": "Pagination",
|
|
256
|
-
"zh-CN": "分页"
|
|
257
|
-
},
|
|
258
|
-
"desc": {
|
|
259
|
-
"zh-CN": "开启后将会展示在PC端列表底部",
|
|
260
|
-
"en-US": "It will be displayed on the bottom of the desktop list after being activated"
|
|
261
|
-
},
|
|
262
|
-
"default": false
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
"type": "checkbox",
|
|
266
|
-
"id": "sort",
|
|
267
|
-
"label": {
|
|
268
|
-
"zh-CN": "开启排序",
|
|
269
|
-
"en-US": "Show Sort by"
|
|
270
|
-
},
|
|
271
|
-
"default": true
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"type": "checkbox",
|
|
275
|
-
"id": "filter",
|
|
276
|
-
"label": {
|
|
277
|
-
"en-US": "Enable filter",
|
|
278
|
-
"zh-CN": "开启筛选"
|
|
279
|
-
},
|
|
280
|
-
"default": false
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
"content": {
|
|
284
|
-
"zh-CN": "筛选维度",
|
|
285
|
-
"en-US": "Filter dimension"
|
|
286
|
-
},
|
|
287
|
-
"type": "header"
|
|
288
|
-
}
|
|
289
|
-
],
|
|
290
|
-
"blocks": [
|
|
291
|
-
{
|
|
292
|
-
"type": "@app"
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"type": "tag_filter",
|
|
296
|
-
"name": {
|
|
297
|
-
"zh-CN": "标签筛选",
|
|
298
|
-
"en-US": "Label"
|
|
299
|
-
},
|
|
300
|
-
"info": {
|
|
301
|
-
"zh-CN": "商品标签可在后台<a href='/admin/products' style='text-decoration: underline;' target='_blank'>商品管理</a>模块设置",
|
|
302
|
-
"en-US": "Product tags can be setted up at product module"
|
|
303
|
-
},
|
|
304
|
-
"settings": [
|
|
305
|
-
{
|
|
306
|
-
"type": "text",
|
|
307
|
-
"id": "title",
|
|
308
|
-
"label": {
|
|
309
|
-
"en-US": "Heading",
|
|
310
|
-
"zh-CN": "标题"
|
|
311
|
-
},
|
|
312
|
-
"default": "Tags",
|
|
313
|
-
"placeholder": {
|
|
314
|
-
"zh-CN": "输入标题",
|
|
315
|
-
"en-US": "Input heading"
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"type": "checkbox",
|
|
320
|
-
"id": "is_all_tags_show",
|
|
321
|
-
"label": {
|
|
322
|
-
"en-US": "Show all tags",
|
|
323
|
-
"zh-CN": "显示所有标签"
|
|
324
|
-
},
|
|
325
|
-
"info": {
|
|
326
|
-
"zh-CN": "自动隐藏筛选结果为空的标签",
|
|
327
|
-
"en-US": "Automatically hides tags with empty filter results"
|
|
328
|
-
},
|
|
329
|
-
"default": true
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
"type": "text",
|
|
333
|
-
"id": "tags",
|
|
334
|
-
"label": {
|
|
335
|
-
"zh-CN": "显示部分标签",
|
|
336
|
-
"en-US": "Show partial tags"
|
|
337
|
-
},
|
|
338
|
-
"info": {
|
|
339
|
-
"zh-CN": "仅当“显示所有标签”关闭时,才会显示此处设置的标签,多个标签以英文逗号隔开。",
|
|
340
|
-
"en-US": "The tags setted will be displayed only when 'Show all tags' is disabled. Multiple tags are separated by commas."
|
|
341
|
-
},
|
|
342
|
-
"placeholder": {
|
|
343
|
-
"zh-CN": "示例:Tag1,Tag2,Tag3",
|
|
344
|
-
"en-US": "Example:Tag1,Tag2,Tag3"
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
]
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"type": "price_filter",
|
|
351
|
-
"name": {
|
|
352
|
-
"zh-CN": "价格筛选",
|
|
353
|
-
"en-US": "Price"
|
|
354
|
-
},
|
|
355
|
-
"limit": 1,
|
|
356
|
-
"settings": [
|
|
357
|
-
{
|
|
358
|
-
"type": "text",
|
|
359
|
-
"id": "title",
|
|
360
|
-
"label": {
|
|
361
|
-
"en-US": "Heading",
|
|
362
|
-
"zh-CN": "标题"
|
|
363
|
-
},
|
|
364
|
-
"default": "Price",
|
|
365
|
-
"placeholder": {
|
|
366
|
-
"zh-CN": "输入标题",
|
|
367
|
-
"en-US": "Input heading"
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
"type": "text",
|
|
372
|
-
"id": "tags",
|
|
373
|
-
"label": {
|
|
374
|
-
"en-US": "Price ranges",
|
|
375
|
-
"zh-CN": "价格区间的边界值"
|
|
376
|
-
},
|
|
377
|
-
"info": {
|
|
378
|
-
"zh-CN": "设置不同价格区间的边界值,多个值以英文逗号隔开。ps. 货币单位取店铺的结算货币。",
|
|
379
|
-
"en-US": "Set the boundary values of different price ranges, separated by commas. eg. Unit of currency adopt the settlement currency of the store."
|
|
380
|
-
},
|
|
381
|
-
"default": "0,50,100",
|
|
382
|
-
"placeholder": {
|
|
383
|
-
"zh-CN": "示例:0,50,100",
|
|
384
|
-
"en-US": "Example:0,50,100"
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
"type": "checkbox",
|
|
389
|
-
"id": "is_last_price_show",
|
|
390
|
-
"label": {
|
|
391
|
-
"en-US": "Show the last price range",
|
|
392
|
-
"zh-CN": "显示最后一个价格区间"
|
|
393
|
-
},
|
|
394
|
-
"default": true
|
|
395
|
-
}
|
|
396
|
-
]
|
|
397
|
-
}
|
|
398
|
-
],
|
|
399
|
-
"presets": [
|
|
400
|
-
{
|
|
401
|
-
"name": "collection_detail",
|
|
402
|
-
"cname": {
|
|
403
|
-
"zh-CN": "专辑详情",
|
|
404
|
-
"en-US": "Collection pages"
|
|
405
|
-
},
|
|
406
|
-
"category": {
|
|
407
|
-
"en-US": "Page",
|
|
408
|
-
"zh-CN": "页面"
|
|
409
|
-
},
|
|
410
|
-
"ccategory": {
|
|
411
|
-
"en-US": "Page",
|
|
412
|
-
"zh-CN": "页面"
|
|
413
|
-
},
|
|
414
|
-
"display": true,
|
|
415
|
-
"blocks": [
|
|
416
|
-
{
|
|
417
|
-
"type": "tag_filter",
|
|
418
|
-
"settings": {
|
|
419
|
-
"title": "Color",
|
|
420
|
-
"is_all_tags_show": true,
|
|
421
|
-
"tags": "red,yellow,blue"
|
|
422
|
-
}
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
"type": "price_filter",
|
|
426
|
-
"settings": {
|
|
427
|
-
"title": "Price",
|
|
428
|
-
"is_last_price_show": true,
|
|
429
|
-
"tags": "0,50,100"
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
]
|
|
433
|
-
}
|
|
434
|
-
]
|
|
435
|
-
}
|
|
436
|
-
{% endschema %}
|