@tiddh/brave-vue 1.93.268 → 1.93.270
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/README.md +23 -23
- package/dist/brave-vue.esm.css +1 -0
- package/dist/brave-vue.esm.js +831 -1312
- package/dist/brave-vue.min.js +2 -2
- package/dist/brave-vue.ssr.css +1 -0
- package/dist/brave-vue.ssr.js +795 -1271
- package/dist/src/App.vue +28 -28
- package/dist/src/Avatar/Avatar.stories.js +236 -238
- package/dist/src/Avatar/Avatar.vue +427 -500
- package/dist/src/Avatar/elements/CategoryCustomizations.vue +554 -558
- package/dist/src/Avatar/elements/CustomizationPanel.vue +1301 -1327
- package/dist/src/Avatar/elements/CustomizationPreview.vue +180 -180
- package/dist/src/Avatar/elements/CustomizationView.vue +850 -846
- package/dist/src/Avatar/elements/ToggleColor.vue +128 -128
- package/dist/src/Avatar/elements/ToggleSubcategory.vue +154 -155
- package/dist/src/Avatar/elements/scss/avatar-vfx.scss +717 -717
- package/dist/src/Avatar/utils.js +20 -149
- package/dist/src/Avatar.stories.js +236 -238
- package/dist/src/Avatar.vue +427 -500
- package/dist/src/Book/Preview.vue +1311 -1291
- package/dist/src/Book/PreviewBook.vue +484 -484
- package/dist/src/Book/PreviewFull.vue +196 -195
- package/dist/src/Book/PreviewMobile.vue +1271 -1271
- package/dist/src/Book/PreviewTools.vue +3892 -3937
- package/dist/src/Book/css/flipbook.scss +166 -166
- package/dist/src/Book/flipbook.js +47 -0
- package/dist/src/Book/js/turn.min.js +68 -68
- package/dist/src/Book/js/zoom.min.js +26 -26
- package/dist/src/BottomBar.vue +445 -443
- package/dist/src/Brand.stories.js +275 -275
- package/dist/src/Brand.vue +364 -364
- package/dist/src/Brands/Brand.stories.js +275 -275
- package/dist/src/Brands/Brand.vue +364 -364
- package/dist/src/Breadcrumb.stories.js +82 -82
- package/dist/src/Breadcrumb.vue +206 -206
- package/dist/src/Button.vue +1886 -1886
- package/dist/src/ButtonWithIcon.stories.js +133 -133
- package/dist/src/Buttons/Button.vue +1886 -1886
- package/dist/src/Buttons/ButtonWithIcon.stories.js +133 -133
- package/dist/src/Buttons/Ghost.stories.js +78 -78
- package/dist/src/Buttons/Link.stories.js +77 -77
- package/dist/src/Buttons/Loading.stories.js +107 -107
- package/dist/src/Buttons/Primary.stories.js +79 -79
- package/dist/src/Buttons/ProgressiveLoading.stories.js +94 -94
- package/dist/src/Buttons/Secondary.stories.js +79 -79
- package/dist/src/Caption.stories.js +27 -27
- package/dist/src/Caption.vue +63 -63
- package/dist/src/Card/Card.stories.js +37 -37
- package/dist/src/Card/Card.vue +131 -131
- package/dist/src/Card/CardLink.stories.js +44 -44
- package/dist/src/Card/CardLink.vue +233 -233
- package/dist/src/Card/CardOption.stories.js +47 -47
- package/dist/src/Card/CardOption.vue +274 -274
- package/dist/src/Card/CardProduct.stories.js +133 -133
- package/dist/src/Card/CardProduct.vue +1031 -1031
- package/dist/src/Card/CatalogProduct.stories.js +154 -154
- package/dist/src/Card/CatalogProduct.vue +898 -898
- package/dist/src/Card/CoverProduct.stories.js +134 -134
- package/dist/src/Card/CoverProduct.vue +526 -526
- package/dist/src/Card.stories.js +37 -37
- package/dist/src/Card.vue +131 -131
- package/dist/src/CardLink.stories.js +44 -44
- package/dist/src/CardLink.vue +233 -233
- package/dist/src/CardOption.stories.js +47 -47
- package/dist/src/CardOption.vue +274 -274
- package/dist/src/CardProduct.stories.js +133 -133
- package/dist/src/CardProduct.vue +1031 -1031
- package/dist/src/CatalogProduct.stories.js +154 -154
- package/dist/src/CatalogProduct.vue +898 -898
- package/dist/src/CategoryCustomizations.vue +554 -558
- package/dist/src/Checkbox.stories.js +39 -39
- package/dist/src/Checkbox.vue +205 -205
- package/dist/src/CoverProduct.stories.js +134 -134
- package/dist/src/CoverProduct.vue +526 -526
- package/dist/src/CustomizationPanel.vue +1301 -1327
- package/dist/src/CustomizationPreview.vue +180 -180
- package/dist/src/CustomizationView.vue +850 -846
- package/dist/src/Feedback.vue +320 -320
- package/dist/src/Form/Checkbox.stories.js +39 -39
- package/dist/src/Form/Checkbox.vue +205 -205
- package/dist/src/Form/GenderSelect.stories.js +61 -60
- package/dist/src/Form/GenderSelect.vue +302 -302
- package/dist/src/Form/Input.stories.js +555 -555
- package/dist/src/Form/Input.vue +951 -951
- package/dist/src/Form/InputAddress.vue +702 -702
- package/dist/src/Form/InputAddressBilling.vue +633 -633
- package/dist/src/Form/InputAddressNumber.vue +634 -634
- package/dist/src/Form/InputCardNumber.vue +653 -653
- package/dist/src/Form/InputEdit.vue +235 -235
- package/dist/src/Form/InputEmail.vue +240 -240
- package/dist/src/Form/InputName.vue +352 -352
- package/dist/src/Form/Options.stories.js +94 -94
- package/dist/src/Form/Options.vue +398 -398
- package/dist/src/Form/Picker.stories.js +43 -43
- package/dist/src/Form/PickerBirthday.vue +631 -631
- package/dist/src/Form/Radius.stories.js +49 -49
- package/dist/src/Form/Radius.vue +160 -160
- package/dist/src/Form/Select.stories.js +97 -97
- package/dist/src/Form/Select.vue +404 -404
- package/dist/src/Form/SelectBirthday.vue +419 -419
- package/dist/src/Form/TextArea.stories.js +52 -52
- package/dist/src/Form/TextArea.vue +277 -277
- package/dist/src/GenderSelect.stories.js +61 -60
- package/dist/src/GenderSelect.vue +302 -302
- package/dist/src/Ghost.stories.js +78 -78
- package/dist/src/HR.vue +68 -68
- package/dist/src/Heading.stories.js +34 -34
- package/dist/src/Heading.vue +102 -102
- package/dist/src/HelloWorld.vue +59 -59
- package/dist/src/Icon.stories.js +1155 -1155
- package/dist/src/Icon.vue +364 -364
- package/dist/src/Icons/Icon.stories.js +1155 -1155
- package/dist/src/Icons/Icon.vue +364 -364
- package/dist/src/Images/Images.stories.js +25 -25
- package/dist/src/Images/Images.vue +51 -51
- package/dist/src/Images.stories.js +25 -25
- package/dist/src/Images.vue +51 -51
- package/dist/src/Input.stories.js +555 -555
- package/dist/src/Input.vue +951 -951
- package/dist/src/InputAddress.vue +702 -702
- package/dist/src/InputAddressBilling.vue +633 -633
- package/dist/src/InputAddressNumber.vue +634 -634
- package/dist/src/InputCardNumber.vue +653 -653
- package/dist/src/InputEdit.vue +235 -235
- package/dist/src/InputEmail.vue +240 -240
- package/dist/src/InputName.vue +352 -352
- package/dist/src/Link.stories.js +77 -77
- package/dist/src/Loading/Loading.stories.js +25 -25
- package/dist/src/Loading/Loading.vue +103 -103
- package/dist/src/Loading.stories.js +25 -25
- package/dist/src/Loading.vue +103 -103
- package/dist/src/MenuNavigation.stories.js +87 -87
- package/dist/src/MenuNavigation.vue +227 -227
- package/dist/src/Modal/Modal.stories.js +56 -56
- package/dist/src/Modal/Modal.vue +469 -469
- package/dist/src/Modal/Sidebar.stories.js +64 -64
- package/dist/src/Modal/Sidebar.vue +649 -649
- package/dist/src/Modal.stories.js +56 -56
- package/dist/src/Modal.vue +469 -469
- package/dist/src/Navigation/Breadcrumb.stories.js +82 -82
- package/dist/src/Navigation/Breadcrumb.vue +206 -206
- package/dist/src/Navigation/MenuNavigation.stories.js +87 -87
- package/dist/src/Navigation/MenuNavigation.vue +227 -227
- package/dist/src/Navigation/Stepper.stories.js +82 -82
- package/dist/src/Navigation/Stepper.vue +222 -222
- package/dist/src/Navigation/Tabs.stories.js +124 -124
- package/dist/src/Navigation/Tabs.vue +192 -192
- package/dist/src/Navigation/TabsLine.vue +407 -407
- package/dist/src/Navigation/TopBar.stories.js +217 -217
- package/dist/src/Navigation/TopBar.vue +370 -370
- package/dist/src/Options.stories.js +94 -94
- package/dist/src/Options.vue +398 -398
- package/dist/src/Paragraph.stories.js +33 -33
- package/dist/src/Paragraph.vue +85 -85
- package/dist/src/Picker.stories.js +43 -43
- package/dist/src/PickerBirthday.vue +631 -631
- package/dist/src/Poster/PreviewPoster.vue +740 -740
- package/dist/src/Preview/Book/Preview.vue +1311 -1291
- package/dist/src/Preview/Book/PreviewBook.vue +484 -484
- package/dist/src/Preview/Book/PreviewFull.vue +196 -195
- package/dist/src/Preview/Book/PreviewMobile.vue +1271 -1271
- package/dist/src/Preview/Book/PreviewTools.vue +3892 -3937
- package/dist/src/Preview/Book/css/flipbook.scss +166 -166
- package/dist/src/Preview/Book/flipbook.js +47 -0
- package/dist/src/Preview/Book/js/turn.min.js +68 -68
- package/dist/src/Preview/Book/js/zoom.min.js +26 -26
- package/dist/src/Preview/BottomBar.vue +445 -443
- package/dist/src/Preview/Poster/PreviewPoster.vue +740 -740
- package/dist/src/Preview/Preview.stories.js +518 -678
- package/dist/src/Preview/Preview.vue +633 -619
- package/dist/src/Preview/PreviewStories_bkp.js +588 -588
- package/dist/src/Preview/Snippet/PreviewSnippet.vue +555 -555
- package/dist/src/Preview/Snippet/PreviewSnippetHorizontal.vue +1330 -1310
- package/dist/src/Preview/Snippet/PreviewSnippetVertical.vue +1359 -1339
- package/dist/src/Preview/Wallpaper/PreviewWallpaper.vue +730 -730
- package/dist/src/Preview.stories.js +518 -678
- package/dist/src/Preview.vue +1311 -1291
- package/dist/src/PreviewBook.vue +484 -484
- package/dist/src/PreviewFull.vue +196 -195
- package/dist/src/PreviewMobile.vue +1271 -1271
- package/dist/src/PreviewPoster.vue +740 -740
- package/dist/src/PreviewSnippet.vue +555 -0
- package/dist/src/PreviewSnippetHorizontal.vue +1330 -1310
- package/dist/src/PreviewSnippetVertical.vue +1359 -1339
- package/dist/src/PreviewStories_bkp.js +588 -588
- package/dist/src/PreviewTools.vue +3892 -3937
- package/dist/src/PreviewWallpaper.vue +730 -730
- package/dist/src/Primary.stories.js +79 -79
- package/dist/src/ProgressiveLoading.stories.js +94 -94
- package/dist/src/Radius.stories.js +49 -49
- package/dist/src/Radius.vue +160 -160
- package/dist/src/Secondary.stories.js +79 -79
- package/dist/src/Select.stories.js +97 -97
- package/dist/src/Select.vue +404 -404
- package/dist/src/SelectBirthday.vue +419 -419
- package/dist/src/Sidebar.stories.js +64 -64
- package/dist/src/Sidebar.vue +649 -649
- package/dist/src/Snippet/PreviewSnippet.vue +555 -555
- package/dist/src/Snippet/PreviewSnippetHorizontal.vue +1330 -1310
- package/dist/src/Snippet/PreviewSnippetVertical.vue +1359 -1339
- package/dist/src/Spinner.vue +89 -89
- package/dist/src/Stepper.stories.js +82 -82
- package/dist/src/Stepper.vue +222 -222
- package/dist/src/Tabs.stories.js +124 -124
- package/dist/src/Tabs.vue +192 -192
- package/dist/src/TabsLine.vue +407 -407
- package/dist/src/TextArea.stories.js +52 -52
- package/dist/src/TextArea.vue +277 -277
- package/dist/src/ToggleColor.vue +128 -128
- package/dist/src/ToggleSubcategory.vue +154 -155
- package/dist/src/Tooltip/Tooltip.stories.js +51 -51
- package/dist/src/Tooltip/Tooltip.vue +185 -185
- package/dist/src/Tooltip.stories.js +51 -51
- package/dist/src/Tooltip.vue +185 -185
- package/dist/src/TopBar.stories.js +217 -217
- package/dist/src/TopBar.vue +370 -370
- package/dist/src/Typography/Caption.stories.js +27 -27
- package/dist/src/Typography/Caption.vue +63 -63
- package/dist/src/Typography/Heading.stories.js +34 -34
- package/dist/src/Typography/Heading.vue +102 -102
- package/dist/src/Typography/Paragraph.stories.js +33 -33
- package/dist/src/Typography/Paragraph.vue +85 -85
- package/dist/src/Utils/Feedback.vue +320 -320
- package/dist/src/Utils/HR.vue +68 -68
- package/dist/src/Utils/Spinner.vue +89 -89
- package/dist/src/Utils/feedback.stories.js +44 -44
- package/dist/src/Utils/hr-primary.stories.js +37 -37
- package/dist/src/Utils/spinner.stories.js +23 -23
- package/dist/src/Wallpaper/PreviewWallpaper.vue +730 -730
- package/dist/src/avatar-vfx.scss +717 -717
- package/dist/src/components/Avatar/Avatar.stories.js +236 -238
- package/dist/src/components/Avatar/Avatar.vue +427 -500
- package/dist/src/components/Avatar/elements/CategoryCustomizations.vue +554 -558
- package/dist/src/components/Avatar/elements/CustomizationPanel.vue +1301 -1327
- package/dist/src/components/Avatar/elements/CustomizationPreview.vue +180 -180
- package/dist/src/components/Avatar/elements/CustomizationView.vue +850 -846
- package/dist/src/components/Avatar/elements/ToggleColor.vue +128 -128
- package/dist/src/components/Avatar/elements/ToggleSubcategory.vue +154 -155
- package/dist/src/components/Avatar/elements/scss/avatar-vfx.scss +717 -717
- package/dist/src/components/Avatar/utils.js +20 -149
- package/dist/src/components/Brands/Brand.stories.js +275 -275
- package/dist/src/components/Brands/Brand.vue +364 -364
- package/dist/src/components/Buttons/Button.vue +1886 -1886
- package/dist/src/components/Buttons/ButtonWithIcon.stories.js +133 -133
- package/dist/src/components/Buttons/Ghost.stories.js +78 -78
- package/dist/src/components/Buttons/Link.stories.js +77 -77
- package/dist/src/components/Buttons/Loading.stories.js +107 -107
- package/dist/src/components/Buttons/Primary.stories.js +79 -79
- package/dist/src/components/Buttons/ProgressiveLoading.stories.js +94 -94
- package/dist/src/components/Buttons/Secondary.stories.js +79 -79
- package/dist/src/components/Card/Card.stories.js +37 -37
- package/dist/src/components/Card/Card.vue +131 -131
- package/dist/src/components/Card/CardLink.stories.js +44 -44
- package/dist/src/components/Card/CardLink.vue +233 -233
- package/dist/src/components/Card/CardOption.stories.js +47 -47
- package/dist/src/components/Card/CardOption.vue +274 -274
- package/dist/src/components/Card/CardProduct.stories.js +133 -133
- package/dist/src/components/Card/CardProduct.vue +1031 -1031
- package/dist/src/components/Card/CatalogProduct.stories.js +154 -154
- package/dist/src/components/Card/CatalogProduct.vue +898 -898
- package/dist/src/components/Card/CoverProduct.stories.js +134 -134
- package/dist/src/components/Card/CoverProduct.vue +526 -526
- package/dist/src/components/Form/Checkbox.stories.js +39 -39
- package/dist/src/components/Form/Checkbox.vue +205 -205
- package/dist/src/components/Form/GenderSelect.stories.js +61 -60
- package/dist/src/components/Form/GenderSelect.vue +302 -302
- package/dist/src/components/Form/Input.stories.js +555 -555
- package/dist/src/components/Form/Input.vue +951 -951
- package/dist/src/components/Form/InputAddress.vue +702 -702
- package/dist/src/components/Form/InputAddressBilling.vue +633 -633
- package/dist/src/components/Form/InputAddressNumber.vue +634 -634
- package/dist/src/components/Form/InputCardNumber.vue +653 -653
- package/dist/src/components/Form/InputEdit.vue +235 -235
- package/dist/src/components/Form/InputEmail.vue +240 -240
- package/dist/src/components/Form/InputName.vue +352 -352
- package/dist/src/components/Form/Options.stories.js +94 -94
- package/dist/src/components/Form/Options.vue +398 -398
- package/dist/src/components/Form/Picker.stories.js +43 -43
- package/dist/src/components/Form/PickerBirthday.vue +631 -631
- package/dist/src/components/Form/Radius.stories.js +49 -49
- package/dist/src/components/Form/Radius.vue +160 -160
- package/dist/src/components/Form/Select.stories.js +97 -97
- package/dist/src/components/Form/Select.vue +404 -404
- package/dist/src/components/Form/SelectBirthday.vue +419 -419
- package/dist/src/components/Form/TextArea.stories.js +52 -52
- package/dist/src/components/Form/TextArea.vue +277 -277
- package/dist/src/components/HelloWorld.vue +59 -59
- package/dist/src/components/Icons/Icon.stories.js +1155 -1155
- package/dist/src/components/Icons/Icon.vue +364 -364
- package/dist/src/components/Images/Images.stories.js +25 -25
- package/dist/src/components/Images/Images.vue +51 -51
- package/dist/src/components/Loading/Loading.stories.js +25 -25
- package/dist/src/components/Loading/Loading.vue +103 -103
- package/dist/src/components/Modal/Modal.stories.js +56 -56
- package/dist/src/components/Modal/Modal.vue +469 -469
- package/dist/src/components/Modal/Sidebar.stories.js +64 -64
- package/dist/src/components/Modal/Sidebar.vue +649 -649
- package/dist/src/components/Navigation/Breadcrumb.stories.js +82 -82
- package/dist/src/components/Navigation/Breadcrumb.vue +206 -206
- package/dist/src/components/Navigation/MenuNavigation.stories.js +87 -87
- package/dist/src/components/Navigation/MenuNavigation.vue +227 -227
- package/dist/src/components/Navigation/Stepper.stories.js +82 -82
- package/dist/src/components/Navigation/Stepper.vue +222 -222
- package/dist/src/components/Navigation/Tabs.stories.js +124 -124
- package/dist/src/components/Navigation/Tabs.vue +192 -192
- package/dist/src/components/Navigation/TabsLine.vue +407 -407
- package/dist/src/components/Navigation/TopBar.stories.js +217 -217
- package/dist/src/components/Navigation/TopBar.vue +370 -370
- package/dist/src/components/Preview/Book/Preview.vue +1311 -1291
- package/dist/src/components/Preview/Book/PreviewBook.vue +484 -484
- package/dist/src/components/Preview/Book/PreviewFull.vue +196 -195
- package/dist/src/components/Preview/Book/PreviewMobile.vue +1271 -1271
- package/dist/src/components/Preview/Book/PreviewTools.vue +3892 -3937
- package/dist/src/components/Preview/Book/css/flipbook.scss +166 -166
- package/dist/src/components/Preview/Book/flipbook.js +47 -0
- package/dist/src/components/Preview/Book/js/turn.min.js +68 -68
- package/dist/src/components/Preview/Book/js/zoom.min.js +26 -26
- package/dist/src/components/Preview/BottomBar.vue +445 -443
- package/dist/src/components/Preview/Poster/PreviewPoster.vue +740 -740
- package/dist/src/components/Preview/Preview.stories.js +518 -678
- package/dist/src/components/Preview/Preview.vue +633 -619
- package/dist/src/components/Preview/PreviewStories_bkp.js +588 -588
- package/dist/src/components/Preview/Snippet/PreviewSnippet.vue +555 -555
- package/dist/src/components/Preview/Snippet/PreviewSnippetHorizontal.vue +1330 -1310
- package/dist/src/components/Preview/Snippet/PreviewSnippetVertical.vue +1359 -1339
- package/dist/src/components/Preview/Wallpaper/PreviewWallpaper.vue +730 -730
- package/dist/src/components/Tooltip/Tooltip.stories.js +51 -51
- package/dist/src/components/Tooltip/Tooltip.vue +185 -185
- package/dist/src/components/Typography/Caption.stories.js +27 -27
- package/dist/src/components/Typography/Caption.vue +63 -63
- package/dist/src/components/Typography/Heading.stories.js +34 -34
- package/dist/src/components/Typography/Heading.vue +102 -102
- package/dist/src/components/Typography/Paragraph.stories.js +33 -33
- package/dist/src/components/Typography/Paragraph.vue +85 -85
- package/dist/src/components/Utils/Feedback.vue +320 -320
- package/dist/src/components/Utils/HR.vue +68 -68
- package/dist/src/components/Utils/Spinner.vue +89 -89
- package/dist/src/components/Utils/feedback.stories.js +44 -44
- package/dist/src/components/Utils/hr-primary.stories.js +37 -37
- package/dist/src/components/Utils/spinner.stories.js +23 -23
- package/dist/src/components/index.js +42 -42
- package/dist/src/components/locale/config.js +145 -0
- package/dist/src/components/locale/language.json +686 -317
- package/dist/src/components/locale/storybook-i18n.js +44 -0
- package/dist/src/config.js +145 -0
- package/dist/src/css/flipbook.scss +166 -166
- package/dist/src/elements/CategoryCustomizations.vue +554 -558
- package/dist/src/elements/CustomizationPanel.vue +1301 -1327
- package/dist/src/elements/CustomizationPreview.vue +180 -180
- package/dist/src/elements/CustomizationView.vue +850 -846
- package/dist/src/elements/ToggleColor.vue +128 -128
- package/dist/src/elements/ToggleSubcategory.vue +154 -155
- package/dist/src/elements/scss/avatar-vfx.scss +717 -717
- package/dist/src/entry.js +36 -36
- package/dist/src/feedback.stories.js +44 -44
- package/dist/src/flipbook.js +47 -0
- package/dist/src/flipbook.scss +166 -166
- package/dist/src/hr-primary.stories.js +37 -37
- package/dist/src/index.js +42 -42
- package/dist/src/js/turn.min.js +68 -68
- package/dist/src/js/zoom.min.js +26 -26
- package/dist/src/language.json +686 -317
- package/dist/src/locale/config.js +145 -0
- package/dist/src/locale/language.json +686 -317
- package/dist/src/locale/storybook-i18n.js +44 -0
- package/dist/src/main.js +8 -8
- package/dist/src/scss/avatar-vfx.scss +717 -717
- package/dist/src/serve-dev.js +8 -8
- package/dist/src/serve-dev.vue +17 -17
- package/dist/src/spinner.stories.js +23 -23
- package/dist/src/storybook-i18n.js +44 -0
- package/dist/src/styles/styles.scss +9 -9
- package/dist/src/styles.scss +9 -9
- package/dist/src/turn.min.js +68 -68
- package/dist/src/utils.js +20 -149
- package/dist/src/wrapper.js +69 -69
- package/dist/src/zoom.min.js +26 -26
- package/package.json +126 -125
- package/dist/css/app.fe0bf874.css +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/images/a3-poster-lg.png +0 -0
- package/dist/images/a3-poster-lg@2x.png +0 -0
- package/dist/images/book-cover-overlay.png +0 -0
- package/dist/images/brands/branding.svg +0 -9
- package/dist/images/brands/payment-agiplan.svg +0 -5
- package/dist/images/brands/payment-amex.svg +0 -4
- package/dist/images/brands/payment-boleto.svg +0 -6
- package/dist/images/brands/payment-diners.svg +0 -4
- package/dist/images/brands/payment-elo.svg +0 -11
- package/dist/images/brands/payment-hipercard.svg +0 -11
- package/dist/images/brands/payment-jcb.svg +0 -7
- package/dist/images/brands/payment-mastercard.svg +0 -6
- package/dist/images/brands/payment-pix.svg +0 -4
- package/dist/images/brands/payment-visa.svg +0 -4
- package/dist/images/brands/payment-zcredez.svg +0 -4
- package/dist/images/brands/social-facebook.svg +0 -3
- package/dist/images/brands/social-google.svg +0 -8
- package/dist/images/mochila-biscoito.png +0 -0
- package/dist/images/mochila-biscoito.webp +0 -0
- package/dist/images/mochila-biscoito@2x.png +0 -0
- package/dist/images/mochila-biscoito@2x.webp +0 -0
- package/dist/images/mochila-fofilha.png +0 -0
- package/dist/images/mochila-fofilha.webp +0 -0
- package/dist/images/mochila-fofilha@2x.png +0 -0
- package/dist/images/mochila-fofilha@2x.webp +0 -0
- package/dist/images/placeholder-a4.jpg +0 -0
- package/dist/images/placeholder-load-frame_a3-loading.jpg +0 -0
- package/dist/images/placeholder-poster-loading.jpg +0 -0
- package/dist/images/placeholder-square.jpg +0 -0
- package/dist/images/placeholder-wallpaper-loading.jpg +0 -0
- package/dist/images/product-type-a3-frame-poster@2x.png +0 -0
- package/dist/images/product-type-a3-frame.png +0 -0
- package/dist/images/product-type-a3-frame@2x.png +0 -0
- package/dist/images/product-type-wallpaper-loading-wallpaper@2x.png +0 -0
- package/dist/images/product-type-wallpaper-loading.png +0 -0
- package/dist/images/product-type-wallpaper-placeholder-wallpaper@2x.png +0 -0
- package/dist/images/product-type-wallpaper-wallpaper@2x.png +0 -0
- package/dist/images/wallpaper-preview-lg.png +0 -0
- package/dist/images/wallpaper-preview-lg@2x.jpg +0 -0
- package/dist/images/wallpaper-preview-lg@2x.png +0 -0
- package/dist/images/wallpaper-preview-sm.jpg +0 -0
- package/dist/images/wallpaper-preview-sm.png +0 -0
- package/dist/images/wallpaper-preview-sm@2x.jpg +0 -0
- package/dist/images/wallpaper-preview-sm@2x.png +0 -0
- package/dist/img/logo.82b9c7a5.png +0 -0
- package/dist/index.html +0 -1
- package/dist/js/app.e6b95826.js +0 -2
- package/dist/js/app.e6b95826.js.map +0 -1
- package/dist/js/chunk-vendors.266ecd85.js +0 -8
- package/dist/js/chunk-vendors.266ecd85.js.map +0 -1
|
@@ -1,846 +1,850 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<link
|
|
4
|
-
rel="stylesheet"
|
|
5
|
-
href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
|
|
6
|
-
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
|
|
7
|
-
crossorigin="anonymous"
|
|
8
|
-
/>
|
|
9
|
-
<div class="mobile-tooltip" @click="removeTooltip">
|
|
10
|
-
<div class="tooltip">
|
|
11
|
-
Lorem ipsum dolor sit amet, eum ne sale vidit epicuri, usu populo
|
|
12
|
-
incorrupte ex. His falli intellegebat no.
|
|
13
|
-
<i class="fas fa-times"></i>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
<CustomizationPreview
|
|
17
|
-
:customizations="customizations"
|
|
18
|
-
:selected-character="selectedCharacter"
|
|
19
|
-
:character-height="characterHeight ? characterHeight : null"
|
|
20
|
-
:gradient-colors="gradient_colors"
|
|
21
|
-
:character-slug="custom_properties.slug"
|
|
22
|
-
:characterHeight="1"
|
|
23
|
-
:dir="dir"
|
|
24
|
-
/>
|
|
25
|
-
<CustomizationPanel
|
|
26
|
-
:builder-api="builder_api"
|
|
27
|
-
:selected-character="selectedCharacter"
|
|
28
|
-
:character-name="custom_properties.user_data.properties.nome.value"
|
|
29
|
-
:subscription-id="'1'"
|
|
30
|
-
:stack-id="'1'"
|
|
31
|
-
:character-slug="custom_properties.slug"
|
|
32
|
-
:character-id="characterId"
|
|
33
|
-
:character-type-id="characterTypeId"
|
|
34
|
-
:character-is-male="custom_properties.is_male"
|
|
35
|
-
:categories-assets="categoriesAssets"
|
|
36
|
-
:disabled-categories="disabledCategories"
|
|
37
|
-
:customizations="customizations"
|
|
38
|
-
:builder-product-id="
|
|
39
|
-
builderProductId ? builderProductId : this.custom_properties.product_id
|
|
40
|
-
"
|
|
41
|
-
:userDataProperties="custom_properties.user_data.properties"
|
|
42
|
-
:builderLayoutId="builderLayoutId"
|
|
43
|
-
:language="language"
|
|
44
|
-
:typeLanguage="typeLanguage"
|
|
45
|
-
:dir="dir"
|
|
46
|
-
:builder_apk="builder_apk"
|
|
47
|
-
@update:customization="handleCustomization"
|
|
48
|
-
@startedMethod="startedMethod"
|
|
49
|
-
@completedMethod="completedMethod"
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
|
|
54
|
-
<script>
|
|
55
|
-
const axios = require("axios");
|
|
56
|
-
import sort from "array-sort";
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
.then(this.
|
|
143
|
-
.then(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
success: payload.success,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
this.
|
|
205
|
-
|
|
206
|
-
this.
|
|
207
|
-
this.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
this.
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}&
|
|
254
|
-
this.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
res.data.character_categories_assets.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
this.categoriesAssets.groups
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
subcategory.assets.colors
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
// c.assets.subcategories[0].
|
|
386
|
-
// null
|
|
387
|
-
//
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
c.assets.subcategories[0].
|
|
394
|
-
null,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
customization.
|
|
405
|
-
customization.
|
|
406
|
-
customization.
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
customization.
|
|
419
|
-
customization.
|
|
420
|
-
customization.
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
el.
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
el.
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
el.assets.
|
|
496
|
-
|
|
497
|
-
el.
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
customization.
|
|
527
|
-
customization.
|
|
528
|
-
customization.
|
|
529
|
-
|
|
530
|
-
customization =
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
(
|
|
573
|
-
);
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
relatedCustomizations
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
category.
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
optionId =
|
|
613
|
-
optionName =
|
|
614
|
-
optionAsset =
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
category.
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
if (s.
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
optionId =
|
|
666
|
-
optionName =
|
|
667
|
-
optionAsset =
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
customization.
|
|
711
|
-
customization.
|
|
712
|
-
customization.
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
*
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
this.categoriesAssets.
|
|
780
|
-
id
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
},
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
margin-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
position: absolute;
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<link
|
|
4
|
+
rel="stylesheet"
|
|
5
|
+
href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
|
|
6
|
+
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
|
|
7
|
+
crossorigin="anonymous"
|
|
8
|
+
/>
|
|
9
|
+
<div class="mobile-tooltip" @click="removeTooltip">
|
|
10
|
+
<div class="tooltip">
|
|
11
|
+
Lorem ipsum dolor sit amet, eum ne sale vidit epicuri, usu populo
|
|
12
|
+
incorrupte ex. His falli intellegebat no.
|
|
13
|
+
<i class="fas fa-times"></i>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<CustomizationPreview
|
|
17
|
+
:customizations="customizations"
|
|
18
|
+
:selected-character="selectedCharacter"
|
|
19
|
+
:character-height="characterHeight ? characterHeight : null"
|
|
20
|
+
:gradient-colors="gradient_colors"
|
|
21
|
+
:character-slug="custom_properties.slug"
|
|
22
|
+
:characterHeight="1"
|
|
23
|
+
:dir="dir"
|
|
24
|
+
/>
|
|
25
|
+
<CustomizationPanel
|
|
26
|
+
:builder-api="builder_api"
|
|
27
|
+
:selected-character="selectedCharacter"
|
|
28
|
+
:character-name="custom_properties.user_data.properties.nome.value"
|
|
29
|
+
:subscription-id="'1'"
|
|
30
|
+
:stack-id="'1'"
|
|
31
|
+
:character-slug="custom_properties.slug"
|
|
32
|
+
:character-id="characterId"
|
|
33
|
+
:character-type-id="characterTypeId"
|
|
34
|
+
:character-is-male="custom_properties.is_male"
|
|
35
|
+
:categories-assets="categoriesAssets"
|
|
36
|
+
:disabled-categories="disabledCategories"
|
|
37
|
+
:customizations="customizations"
|
|
38
|
+
:builder-product-id="
|
|
39
|
+
builderProductId ? builderProductId : this.custom_properties.product_id
|
|
40
|
+
"
|
|
41
|
+
:userDataProperties="custom_properties.user_data.properties"
|
|
42
|
+
:builderLayoutId="builderLayoutId"
|
|
43
|
+
:language="language"
|
|
44
|
+
:typeLanguage="typeLanguage"
|
|
45
|
+
:dir="dir"
|
|
46
|
+
:builder_apk="builder_apk"
|
|
47
|
+
@update:customization="handleCustomization"
|
|
48
|
+
@startedMethod="startedMethod"
|
|
49
|
+
@completedMethod="completedMethod"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script>
|
|
55
|
+
const axios = require("axios");
|
|
56
|
+
import sort from "array-sort";
|
|
57
|
+
import { resolveBuilderLanguage, DEFAULT_LOCALE } from "../../locale/config";
|
|
58
|
+
import CustomizationPanel from "./CustomizationPanel.vue";
|
|
59
|
+
import CustomizationPreview from "./CustomizationPreview.vue";
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
name: "CustomizationView",
|
|
63
|
+
components: {
|
|
64
|
+
CustomizationPanel,
|
|
65
|
+
CustomizationPreview,
|
|
66
|
+
},
|
|
67
|
+
props: {
|
|
68
|
+
custom_properties: {
|
|
69
|
+
type: Object,
|
|
70
|
+
required: true,
|
|
71
|
+
},
|
|
72
|
+
builder_api: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: "https://builder.dentrodahistoria.com.br/api",
|
|
75
|
+
},
|
|
76
|
+
is_subscription: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false,
|
|
79
|
+
},
|
|
80
|
+
gradient_colors: {
|
|
81
|
+
type: Object,
|
|
82
|
+
required: false,
|
|
83
|
+
},
|
|
84
|
+
builderLayoutId: {
|
|
85
|
+
type: [Number, String],
|
|
86
|
+
required: false,
|
|
87
|
+
},
|
|
88
|
+
language: {
|
|
89
|
+
type: String,
|
|
90
|
+
required: false,
|
|
91
|
+
},
|
|
92
|
+
typeLanguage: {
|
|
93
|
+
type: String,
|
|
94
|
+
required: false,
|
|
95
|
+
default: DEFAULT_LOCALE,
|
|
96
|
+
},
|
|
97
|
+
dir: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: "ltr",
|
|
100
|
+
required: false,
|
|
101
|
+
},
|
|
102
|
+
builder_apk: {
|
|
103
|
+
type: String,
|
|
104
|
+
required: false,
|
|
105
|
+
//default: "https://builder.dentrodahistoria.com.br/api",
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
data() {
|
|
109
|
+
return {
|
|
110
|
+
categoriesAssets: {},
|
|
111
|
+
customizations: [], // Velho e bom customizations
|
|
112
|
+
requiredCategories: [], // Acumularás as customizações necessárias
|
|
113
|
+
disabledCategories: [], // Acumulara as customizações que não podem ser customizadas
|
|
114
|
+
isIniting: false,
|
|
115
|
+
isLoading: false,
|
|
116
|
+
selectedCharacter: {},
|
|
117
|
+
characterId: "",
|
|
118
|
+
characterTypeId: "",
|
|
119
|
+
characterName: "",
|
|
120
|
+
loadedCustomizations: [],
|
|
121
|
+
characterIsMale: this.custom_properties.is_male,
|
|
122
|
+
builderProductId: false,
|
|
123
|
+
characterHeight: null,
|
|
124
|
+
userDataProperties: this.custom_properties.user_data.properties,
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
computed: {
|
|
128
|
+
apkParameter() {
|
|
129
|
+
return this.builder_apk ? `apk=${this.builder_apk}` : "";
|
|
130
|
+
},
|
|
131
|
+
builderLanguage() {
|
|
132
|
+
return resolveBuilderLanguage(this.typeLanguage, this.language);
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
mounted() {
|
|
136
|
+
this.isIniting = true;
|
|
137
|
+
this.loadCustomizationTreeList()
|
|
138
|
+
.then(() => {
|
|
139
|
+
this.isIniting = false;
|
|
140
|
+
this.isLoading = true;
|
|
141
|
+
})
|
|
142
|
+
// .then(this.fakeData)
|
|
143
|
+
.then(this.parseCollection)
|
|
144
|
+
.then(this.loadCustomizationCharacter)
|
|
145
|
+
.then(this.initCustomizationCharacter)
|
|
146
|
+
.then(this.initDisabledCategories)
|
|
147
|
+
.then(() => {
|
|
148
|
+
this.isLoading = false;
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
methods: {
|
|
152
|
+
startedMethod() {
|
|
153
|
+
this.$emit("startedMethod");
|
|
154
|
+
},
|
|
155
|
+
completedMethod(payload) {
|
|
156
|
+
if (payload.success) {
|
|
157
|
+
this.$emit("completedMethod", {
|
|
158
|
+
updatedCustomizations: payload.updatedCustomizations,
|
|
159
|
+
updatedUuid: payload.updatedUuid,
|
|
160
|
+
characterName: this.characterName,
|
|
161
|
+
characterIsMale: this.custom_properties.is_male, //this.characterIsMale,
|
|
162
|
+
categories: payload.categories,
|
|
163
|
+
success: payload.success,
|
|
164
|
+
});
|
|
165
|
+
} else {
|
|
166
|
+
this.$emit("completedMethod", {
|
|
167
|
+
success: payload.success,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
async loadCustomizationTreeList() {
|
|
172
|
+
let res;
|
|
173
|
+
|
|
174
|
+
//aaaa;
|
|
175
|
+
|
|
176
|
+
if (this.treelist) {
|
|
177
|
+
if (
|
|
178
|
+
this.treelist.character_categories_assets &&
|
|
179
|
+
this.treelist.character_categories_assets.length > 0
|
|
180
|
+
) {
|
|
181
|
+
this.categoriesAssets = this.treelist.character_categories_assets[0];
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (this.custom_properties.uuid) {
|
|
187
|
+
let url = `${this.builder_api}/customs_characters/${this.custom_properties.uuid}`;
|
|
188
|
+
if (this.builder_apk) {
|
|
189
|
+
url += `?apk=${encodeURIComponent(this.builder_apk)}`;
|
|
190
|
+
}
|
|
191
|
+
const { data } = await axios.get(url);
|
|
192
|
+
|
|
193
|
+
res = await axios.get(
|
|
194
|
+
`${this.builder_api}/characters/${
|
|
195
|
+
data.custom.character_id
|
|
196
|
+
}/categories/assets/treelist?character_type_id=${
|
|
197
|
+
data.custom.user_data.type
|
|
198
|
+
}&subscription=${this.is_subscription}${
|
|
199
|
+
this.builderLanguage ? `&language=${this.builderLanguage}` : ""
|
|
200
|
+
}&product_id=${this.custom_properties.product_id}${
|
|
201
|
+
this.builder_apk ? `&${this.apkParameter}` : ""
|
|
202
|
+
}`
|
|
203
|
+
);
|
|
204
|
+
this.selectedCharacter.slug =
|
|
205
|
+
res.data.character_categories_assets[0].type.code;
|
|
206
|
+
this.characterId = data.custom.character_id;
|
|
207
|
+
this.characterName = data.custom.user_data.properties.nome.value;
|
|
208
|
+
this.characterIsMale = this.custom_properties.is_male; //res.data.character_categories_assets[0].type.code === 'menino' ? true : false
|
|
209
|
+
this.builderProductId = this.custom_properties.product_id;
|
|
210
|
+
this.characterTypeId = data.custom.user_data.type;
|
|
211
|
+
this.loadedCustomizations = data.assets;
|
|
212
|
+
|
|
213
|
+
if (
|
|
214
|
+
data.custom.user_data.properties.dedicatoria &&
|
|
215
|
+
data.custom.user_data.properties.dedicatoria.value &&
|
|
216
|
+
data.custom.user_data.properties.dedicatoria.value.length > 0
|
|
217
|
+
) {
|
|
218
|
+
this.userDataProperties.dedicatoria = {
|
|
219
|
+
code: "dedicatoria",
|
|
220
|
+
property_id:
|
|
221
|
+
data.custom.user_data.properties.dedicatoria.property_id,
|
|
222
|
+
value: data.custom.user_data.properties.dedicatoria.value,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
if (
|
|
226
|
+
data.custom.user_data.properties.numero &&
|
|
227
|
+
data.custom.user_data.properties.numero.value &&
|
|
228
|
+
data.custom.user_data.properties.numero.value.length > 0
|
|
229
|
+
) {
|
|
230
|
+
this.userDataProperties.numero = {
|
|
231
|
+
code: "numero",
|
|
232
|
+
property_id: data.custom.user_data.properties.numero.property_id,
|
|
233
|
+
value: data.custom.user_data.properties.numero.value,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
if (
|
|
237
|
+
data.custom.user_data.properties.mes &&
|
|
238
|
+
data.custom.user_data.properties.mes.value &&
|
|
239
|
+
data.custom.user_data.properties.mes.value.length > 0
|
|
240
|
+
) {
|
|
241
|
+
this.userDataProperties.mes = {
|
|
242
|
+
code: "mes",
|
|
243
|
+
property_id: data.custom.user_data.properties.mes.property_id,
|
|
244
|
+
value: data.custom.user_data.properties.mes.value,
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
res = await axios.get(
|
|
249
|
+
`${this.builder_api}/characters/${
|
|
250
|
+
this.custom_properties.character_id
|
|
251
|
+
}/categories/assets/treelist?character_type_id=${
|
|
252
|
+
this.custom_properties.type_id ? this.custom_properties.type_id : ""
|
|
253
|
+
}&subscription=${this.is_subscription}${
|
|
254
|
+
this.builderLanguage
|
|
255
|
+
? `&language=${encodeURIComponent(this.builderLanguage)}`
|
|
256
|
+
: ""
|
|
257
|
+
}&product_id=${this.custom_properties.product_id}${
|
|
258
|
+
this.builder_apk ? `&${this.apkParameter}` : ""
|
|
259
|
+
}`
|
|
260
|
+
);
|
|
261
|
+
this.characterTypeId = this.custom_properties.type_id;
|
|
262
|
+
this.characterId = this.custom_properties.character_id;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
this.selectedCharacter =
|
|
266
|
+
res.data.character_categories_assets[0].character;
|
|
267
|
+
|
|
268
|
+
this.categoriesAssets =
|
|
269
|
+
res.data.character_categories_assets &&
|
|
270
|
+
res.data.character_categories_assets.length
|
|
271
|
+
? res.data.character_categories_assets[0]
|
|
272
|
+
: null;
|
|
273
|
+
},
|
|
274
|
+
/*
|
|
275
|
+
* Essa função também preenche as informações de customização,
|
|
276
|
+
* além do array de categorias obrigatórias e no caso do usuário possuir
|
|
277
|
+
* customizationId ela também preenche as categorias desabilitadas
|
|
278
|
+
*/
|
|
279
|
+
initCustomizationCharacter() {
|
|
280
|
+
this.categoriesAssets.categories.forEach((c) => {
|
|
281
|
+
// Populando a tabela com as customizações necessárias
|
|
282
|
+
if (c.required) {
|
|
283
|
+
this.requiredCategories.push({
|
|
284
|
+
id: c.id,
|
|
285
|
+
name: c.name,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
c.assets.subcategories = sort(c.assets.subcategories, "sort_order");
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
this.categoriesAssets.categories = sort(
|
|
292
|
+
this.categoriesAssets.categories,
|
|
293
|
+
"sort_order"
|
|
294
|
+
);
|
|
295
|
+
|
|
296
|
+
this.categoriesAssets.groups.forEach((g) => {
|
|
297
|
+
g.assets.subcategories = sort(g.assets.subcategories, "sort_order");
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
this.categoriesAssets.groups = sort(
|
|
301
|
+
this.categoriesAssets.groups,
|
|
302
|
+
"sort_order"
|
|
303
|
+
);
|
|
304
|
+
},
|
|
305
|
+
/*
|
|
306
|
+
* Essa função inicializa as categorias desabilitadas
|
|
307
|
+
*/
|
|
308
|
+
initDisabledCategories() {
|
|
309
|
+
this.customizations.forEach((custom) => {
|
|
310
|
+
let comparisonValue;
|
|
311
|
+
let customCategory = this.categoriesAssets.categories.find(
|
|
312
|
+
(c) => c.id === custom.categoryId
|
|
313
|
+
);
|
|
314
|
+
|
|
315
|
+
if (!customCategory) {
|
|
316
|
+
// A diferença entre os objetos de group e categoria
|
|
317
|
+
// não são relevantes para essa função
|
|
318
|
+
customCategory = this.categoriesAssets.groups.find((g) => {
|
|
319
|
+
g.groupedCategories.includes(custom.categoryId);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (customCategory) {
|
|
324
|
+
// Caso a categoria dependa de outra descemos o nível da arvore
|
|
325
|
+
// de assets para pegar apenas as subcategorias e cores dependêntes
|
|
326
|
+
if (customCategory.depends_category) {
|
|
327
|
+
const relatedCustomization = this.getCustomization(
|
|
328
|
+
customCategory.depends_category
|
|
329
|
+
);
|
|
330
|
+
customCategory = customCategory.assets.categories.find((c) => {
|
|
331
|
+
comparisonValue = relatedCustomization.optionId;
|
|
332
|
+
return c.parent_id === comparisonValue;
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// Buscando a subbategoria com as informações a respeito das
|
|
337
|
+
// categorias para desabilitar
|
|
338
|
+
comparisonValue = custom.optionId;
|
|
339
|
+
|
|
340
|
+
const customSubcategory = customCategory.assets.subcategories.find(
|
|
341
|
+
(subcategory) => {
|
|
342
|
+
if (
|
|
343
|
+
subcategory.assets.colors &&
|
|
344
|
+
subcategory.assets.colors.length
|
|
345
|
+
) {
|
|
346
|
+
let found = false;
|
|
347
|
+
subcategory.assets.colors.forEach((color) => {
|
|
348
|
+
if (color.id === comparisonValue) {
|
|
349
|
+
found = true;
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
return found;
|
|
353
|
+
}
|
|
354
|
+
return subcategory.id === comparisonValue;
|
|
355
|
+
}
|
|
356
|
+
);
|
|
357
|
+
|
|
358
|
+
if (customSubcategory)
|
|
359
|
+
this.updateDisabledCategories(custom, customSubcategory.disable);
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
},
|
|
363
|
+
/*
|
|
364
|
+
* Carregando nas customizações as informaçoes de categorias e subcategorias
|
|
365
|
+
* definidas como default no builder
|
|
366
|
+
*/
|
|
367
|
+
initDefaultCustomizationCharacter() {
|
|
368
|
+
let customization;
|
|
369
|
+
const categoriesWithDependency = [];
|
|
370
|
+
|
|
371
|
+
/*
|
|
372
|
+
* Definindo as customizações default das categorias sem
|
|
373
|
+
* dependencia
|
|
374
|
+
*/
|
|
375
|
+
this.categoriesAssets.categories.forEach((c) => {
|
|
376
|
+
if (c.depends_category) {
|
|
377
|
+
categoriesWithDependency.push(c);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
customization = this.getCategoryDefaultCustomization(c);
|
|
381
|
+
|
|
382
|
+
if (c.code.includes("mooner")) {
|
|
383
|
+
console.log(c);
|
|
384
|
+
|
|
385
|
+
// c.assets.subcategories[0].parent_id;
|
|
386
|
+
// null
|
|
387
|
+
// c.assets.subcategories[0].id;
|
|
388
|
+
// c.assets.subcategories[0].name;
|
|
389
|
+
// c.assets.subcategories[0].assets.asset;
|
|
390
|
+
// null,
|
|
391
|
+
// null,
|
|
392
|
+
this.updateCustomizations(
|
|
393
|
+
c.assets.subcategories[0].parent_id,
|
|
394
|
+
null,
|
|
395
|
+
c.assets.subcategories[0].id,
|
|
396
|
+
c.assets.subcategories[0].name,
|
|
397
|
+
c.assets.subcategories[0].assets.asset,
|
|
398
|
+
null,
|
|
399
|
+
null
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
if (customization)
|
|
403
|
+
this.updateCustomizations(
|
|
404
|
+
customization.categoryId,
|
|
405
|
+
customization.relatedCategoryId,
|
|
406
|
+
customization.optionId,
|
|
407
|
+
customization.optionName,
|
|
408
|
+
customization.optionAsset,
|
|
409
|
+
customization.optionZIndex,
|
|
410
|
+
customization.categoryZIndex
|
|
411
|
+
);
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
categoriesWithDependency.forEach((c) => {
|
|
415
|
+
customization = this.getRelatedCategoryDefaultCustomization(c);
|
|
416
|
+
if (customization)
|
|
417
|
+
this.updateCustomizations(
|
|
418
|
+
customization.categoryId,
|
|
419
|
+
customization.relatedCategoryId,
|
|
420
|
+
customization.optionId,
|
|
421
|
+
customization.optionName,
|
|
422
|
+
customization.optionAsset,
|
|
423
|
+
customization.optionZIndex,
|
|
424
|
+
customization.categoryZIndex
|
|
425
|
+
);
|
|
426
|
+
});
|
|
427
|
+
},
|
|
428
|
+
/*
|
|
429
|
+
* Essa função carrega as informações de personalização do personagem
|
|
430
|
+
* Caso a subscription já possui um customizationId ele vai no serviço
|
|
431
|
+
* buscar tal informação, caso contrário ele seta as informações
|
|
432
|
+
* default das categorias na personalização
|
|
433
|
+
*/
|
|
434
|
+
async loadCustomizationCharacter() {
|
|
435
|
+
this.initDefaultCustomizationCharacter();
|
|
436
|
+
|
|
437
|
+
if (this.custom_properties.uuid) {
|
|
438
|
+
this.customizations.forEach((custom) => {
|
|
439
|
+
this.loadedCustomizations.forEach((el) => {
|
|
440
|
+
if (
|
|
441
|
+
custom.relatedCategoryId &&
|
|
442
|
+
custom.categoryId === el.assets.category_id
|
|
443
|
+
) {
|
|
444
|
+
let relatedCustomizationCategory = this.loadedCustomizations.find(
|
|
445
|
+
(cr) => {
|
|
446
|
+
return cr.id === custom.relatedCategoryId;
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
|
|
450
|
+
this.categoriesAssets.categories.forEach((category) => {
|
|
451
|
+
if (category.id === el.id) {
|
|
452
|
+
category.assets.categories.forEach((c) => {
|
|
453
|
+
if (
|
|
454
|
+
c.parent_id === relatedCustomizationCategory.assets.id
|
|
455
|
+
) {
|
|
456
|
+
c.assets.subcategories.forEach((s) => {
|
|
457
|
+
s.assets.colors.forEach((color) => {
|
|
458
|
+
if (el.assets.id === color.id) {
|
|
459
|
+
this.updateCustomizations(
|
|
460
|
+
custom.categoryId,
|
|
461
|
+
custom.relatedCategoryId,
|
|
462
|
+
el.assets.id,
|
|
463
|
+
color.hexa,
|
|
464
|
+
color.assets.asset,
|
|
465
|
+
el.z_index,
|
|
466
|
+
el.z_index
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
} else if (custom.categoryId === el.assets.category_id) {
|
|
476
|
+
this.updateCustomizations(
|
|
477
|
+
custom.categoryId,
|
|
478
|
+
custom.relatedCategoryId,
|
|
479
|
+
el.assets.id,
|
|
480
|
+
custom.name,
|
|
481
|
+
el.assets.asset,
|
|
482
|
+
el.z_index,
|
|
483
|
+
el.z_index
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
this.loadedCustomizations.forEach((el) => {
|
|
490
|
+
let customCategory = this.customizations.find(
|
|
491
|
+
(c) => c.categoryId === el.id
|
|
492
|
+
);
|
|
493
|
+
if (!customCategory) {
|
|
494
|
+
this.updateCustomizations(
|
|
495
|
+
el.assets.category_id,
|
|
496
|
+
null,
|
|
497
|
+
el.assets.id,
|
|
498
|
+
el.name,
|
|
499
|
+
el.assets.asset,
|
|
500
|
+
el.z_index,
|
|
501
|
+
el.z_index
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
loadRelatedSubcategory(customization) {},
|
|
508
|
+
|
|
509
|
+
updateCustomizations(
|
|
510
|
+
categoryId,
|
|
511
|
+
relatedCategoryId,
|
|
512
|
+
optionId,
|
|
513
|
+
optionName,
|
|
514
|
+
optionAsset,
|
|
515
|
+
optionZIndex,
|
|
516
|
+
categoryZIndex,
|
|
517
|
+
removeGroup = false,
|
|
518
|
+
firstGroup = false,
|
|
519
|
+
removableCategory = false
|
|
520
|
+
) {
|
|
521
|
+
let customization = this.customizations.find(
|
|
522
|
+
(c) => c.categoryId === categoryId
|
|
523
|
+
);
|
|
524
|
+
if (!removeGroup) {
|
|
525
|
+
if (customization) {
|
|
526
|
+
customization.categoryId = categoryId;
|
|
527
|
+
customization.relatedCategoryId = relatedCategoryId;
|
|
528
|
+
customization.optionId = optionId;
|
|
529
|
+
customization.optionName = optionName;
|
|
530
|
+
customization.optionAsset = optionAsset;
|
|
531
|
+
customization.optionZIndex = optionZIndex;
|
|
532
|
+
customization.categoryZIndex = categoryZIndex;
|
|
533
|
+
} else {
|
|
534
|
+
customization = {
|
|
535
|
+
categoryId: categoryId,
|
|
536
|
+
relatedCategoryId: relatedCategoryId,
|
|
537
|
+
optionId: optionId,
|
|
538
|
+
optionName: optionName,
|
|
539
|
+
optionAsset: optionAsset,
|
|
540
|
+
optionZIndex: optionZIndex,
|
|
541
|
+
categoryZIndex: categoryZIndex,
|
|
542
|
+
firstGroup: firstGroup ? true : null,
|
|
543
|
+
};
|
|
544
|
+
this.customizations.push(customization);
|
|
545
|
+
}
|
|
546
|
+
return customization;
|
|
547
|
+
} else {
|
|
548
|
+
customization = this.customizations.find(
|
|
549
|
+
(c) => c.categoryId === categoryId
|
|
550
|
+
);
|
|
551
|
+
this.customizations.forEach((obj, index) => {
|
|
552
|
+
if (obj.categoryId === customization.categoryId) {
|
|
553
|
+
this.customizations.splice(index, 1);
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
updateDisabledCategories(customization, categoriesToDisable) {
|
|
559
|
+
if (categoriesToDisable) {
|
|
560
|
+
categoriesToDisable.forEach((idToDisable) => {
|
|
561
|
+
this.customizations.forEach((el, index) => {
|
|
562
|
+
if (idToDisable === el.categoryId) {
|
|
563
|
+
this.customizations.splice(index, 1);
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
if (!categoriesToDisable || categoriesToDisable.length === 0) {
|
|
570
|
+
this.disabledCategories.forEach((dc) => {
|
|
571
|
+
const i = dc.relatedCustomizations.indexOf(customization);
|
|
572
|
+
if (i > -1) dc.relatedCustomizations.splice(i, 1);
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
this.disabledCategories = this.disabledCategories.filter(
|
|
576
|
+
(dc) => dc.relatedCustomizations.length !== 0
|
|
577
|
+
);
|
|
578
|
+
} else {
|
|
579
|
+
categoriesToDisable.forEach((categoryToDisableId) => {
|
|
580
|
+
let dc = this.disabledCategories.find((dc) => {
|
|
581
|
+
return dc.categoryId === categoryToDisableId;
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
if (dc) {
|
|
585
|
+
if (!dc.relatedCustomizations.includes(customization))
|
|
586
|
+
dc.relatedCustomizations.push(customization);
|
|
587
|
+
} else {
|
|
588
|
+
dc = {
|
|
589
|
+
categoryId: categoryToDisableId,
|
|
590
|
+
relatedCustomizations: [customization],
|
|
591
|
+
};
|
|
592
|
+
this.disabledCategories.push(dc);
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
getCategoryDefaultCustomization(category) {
|
|
598
|
+
const categoryId = category.id;
|
|
599
|
+
const categoryZIndex = category.z_index;
|
|
600
|
+
let optionId, optionName, optionAsset, optionZIndex, relatedCategoryId;
|
|
601
|
+
|
|
602
|
+
category.assets.subcategories.forEach((s) => {
|
|
603
|
+
if (s.is_default) {
|
|
604
|
+
optionId = s.id;
|
|
605
|
+
optionName = s.name;
|
|
606
|
+
|
|
607
|
+
if (s.z_index != null && s.z_index >= 0) optionZIndex = s.z_index;
|
|
608
|
+
|
|
609
|
+
if (s.assets.colors.length > 0) {
|
|
610
|
+
const defaultColor = s.assets.colors.find((c) => c.is_default);
|
|
611
|
+
if (defaultColor) {
|
|
612
|
+
optionId = defaultColor.id;
|
|
613
|
+
optionName = defaultColor.hexa;
|
|
614
|
+
optionAsset = defaultColor.assets.asset;
|
|
615
|
+
} else {
|
|
616
|
+
optionId = s.assets.colors[0].id;
|
|
617
|
+
optionName = s.assets.colors[0].hexa;
|
|
618
|
+
optionAsset = s.assets.colors[0].assets.asset;
|
|
619
|
+
}
|
|
620
|
+
} else {
|
|
621
|
+
optionAsset = s.assets.asset;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
return optionAsset
|
|
627
|
+
? {
|
|
628
|
+
categoryId,
|
|
629
|
+
relatedCategoryId,
|
|
630
|
+
optionId,
|
|
631
|
+
optionName,
|
|
632
|
+
optionAsset,
|
|
633
|
+
categoryZIndex,
|
|
634
|
+
optionZIndex,
|
|
635
|
+
}
|
|
636
|
+
: null;
|
|
637
|
+
},
|
|
638
|
+
getRelatedCategoryDefaultCustomization(category) {
|
|
639
|
+
const categoryId = category.id;
|
|
640
|
+
const relatedCategoryId = category.depends_category;
|
|
641
|
+
const categoryZIndex = category.z_index;
|
|
642
|
+
let optionId,
|
|
643
|
+
optionName,
|
|
644
|
+
optionAsset,
|
|
645
|
+
optionZIndex,
|
|
646
|
+
selectedRelatedSubCategory;
|
|
647
|
+
|
|
648
|
+
const customization = this.getCustomization(category.depends_category);
|
|
649
|
+
if (customization) selectedRelatedSubCategory = customization.optionId;
|
|
650
|
+
else selectedRelatedSubCategory = "";
|
|
651
|
+
|
|
652
|
+
category.assets.categories.forEach((rc) => {
|
|
653
|
+
if (rc.parent_id === selectedRelatedSubCategory) {
|
|
654
|
+
rc.assets.subcategories.forEach((s) => {
|
|
655
|
+
if (s.is_default) {
|
|
656
|
+
optionId = s.id;
|
|
657
|
+
optionName = s.name;
|
|
658
|
+
if (s.z_index != null && s.z_index >= 0) {
|
|
659
|
+
optionZIndex = s.z_index;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
if (s.assets.colors.length > 0) {
|
|
663
|
+
const defaultColor = s.assets.colors.find((c) => c.is_default);
|
|
664
|
+
if (defaultColor) {
|
|
665
|
+
optionId = defaultColor.id;
|
|
666
|
+
optionName = defaultColor.hexa;
|
|
667
|
+
optionAsset = defaultColor.assets.asset;
|
|
668
|
+
} else {
|
|
669
|
+
optionId = s.assets.colors[0].id;
|
|
670
|
+
optionName = s.assets.colors[0].hexa;
|
|
671
|
+
optionAsset = s.assets.colors[0].assets.asset;
|
|
672
|
+
}
|
|
673
|
+
} else {
|
|
674
|
+
optionAsset = s.assets.asset;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
return false;
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
return optionAsset
|
|
682
|
+
? {
|
|
683
|
+
categoryId,
|
|
684
|
+
relatedCategoryId,
|
|
685
|
+
optionId,
|
|
686
|
+
optionName,
|
|
687
|
+
optionAsset,
|
|
688
|
+
categoryZIndex,
|
|
689
|
+
optionZIndex,
|
|
690
|
+
}
|
|
691
|
+
: null;
|
|
692
|
+
},
|
|
693
|
+
getCustomization(categoryId) {
|
|
694
|
+
return this.customizations.find((c) => c.categoryId === categoryId);
|
|
695
|
+
},
|
|
696
|
+
handleCustomization({
|
|
697
|
+
customization,
|
|
698
|
+
categoriesToDisable,
|
|
699
|
+
removeGroup = false,
|
|
700
|
+
firstGroup = false,
|
|
701
|
+
removableCategory = false,
|
|
702
|
+
}) {
|
|
703
|
+
// Verifica se há outra customização que deve ser atualizada
|
|
704
|
+
// em função dessa atualização e atualiza essa customização
|
|
705
|
+
// antes
|
|
706
|
+
|
|
707
|
+
this.handleUpdateRelatedCategories(customization);
|
|
708
|
+
|
|
709
|
+
const c = this.updateCustomizations(
|
|
710
|
+
customization.categoryId,
|
|
711
|
+
customization.relatedCategoryId,
|
|
712
|
+
customization.optionId,
|
|
713
|
+
customization.optionName,
|
|
714
|
+
customization.optionAsset,
|
|
715
|
+
customization.optionZIndex,
|
|
716
|
+
customization.categoryZIndex,
|
|
717
|
+
removeGroup,
|
|
718
|
+
firstGroup,
|
|
719
|
+
removableCategory
|
|
720
|
+
);
|
|
721
|
+
// Desabilitando categorias associadas a customização
|
|
722
|
+
this.updateDisabledCategories(c, categoriesToDisable);
|
|
723
|
+
},
|
|
724
|
+
/**
|
|
725
|
+
* Essa funçaão recebe a customização da categoria pai
|
|
726
|
+
* e que por influência altera outras categorias. EX:
|
|
727
|
+
* Essa função poderia receber as customizações de cor de pele
|
|
728
|
+
* e automaticamente altera todos as outras categorias que
|
|
729
|
+
* dependem da mesma
|
|
730
|
+
*/
|
|
731
|
+
handleUpdateRelatedCategories(customization) {
|
|
732
|
+
this.categoriesAssets.categories.forEach((c) => {
|
|
733
|
+
if (c.depends_category === customization.categoryId) {
|
|
734
|
+
// Pegando a customização da categoria relacionada
|
|
735
|
+
// e recuperando a subcategoryId para atualizar depois
|
|
736
|
+
// as informações de customização da categoria relacionada
|
|
737
|
+
const relatedCustomization = this.getCustomization(c.id);
|
|
738
|
+
let relatedCustomizationSubcategory = null;
|
|
739
|
+
let relatedCustomizationCategory = null;
|
|
740
|
+
|
|
741
|
+
if (!relatedCustomization) return;
|
|
742
|
+
c.assets.categories.forEach((cr) => {
|
|
743
|
+
cr.assets.subcategories.forEach((s) => {
|
|
744
|
+
s.assets.colors.forEach((c) => {
|
|
745
|
+
if (c.id === relatedCustomization.optionId) {
|
|
746
|
+
relatedCustomizationSubcategory = s;
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
|
|
752
|
+
// Procurando a nova subcategoria
|
|
753
|
+
// já com a referência correta da categoria
|
|
754
|
+
relatedCustomizationCategory = c.assets.categories.find((cr) => {
|
|
755
|
+
return cr.parent_id === customization.optionId;
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
if (relatedCustomizationCategory) {
|
|
759
|
+
relatedCustomizationCategory.assets.subcategories.forEach((s) => {
|
|
760
|
+
if (s.id === relatedCustomizationSubcategory.id) {
|
|
761
|
+
s.assets.colors.forEach((c) => {
|
|
762
|
+
if (c.hexa === relatedCustomization.optionName) {
|
|
763
|
+
relatedCustomization.optionId = c.id;
|
|
764
|
+
relatedCustomization.optionName = c.hexa;
|
|
765
|
+
relatedCustomization.optionAsset = c.assets.asset;
|
|
766
|
+
relatedCustomization.optionZIndex = s.z_index;
|
|
767
|
+
}
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
});
|
|
774
|
+
},
|
|
775
|
+
fakeData() {
|
|
776
|
+
const categoryId = this.categoriesAssets.categories[0]
|
|
777
|
+
? this.categoriesAssets.categories[0].id
|
|
778
|
+
: 0;
|
|
779
|
+
const categoryId2 = this.categoriesAssets.categories[1]
|
|
780
|
+
? this.categoriesAssets.categories[1].id
|
|
781
|
+
: 0;
|
|
782
|
+
this.categoriesAssets.collections = [];
|
|
783
|
+
this.categoriesAssets.collections.push({
|
|
784
|
+
id: 10000,
|
|
785
|
+
name: "Vestuario",
|
|
786
|
+
icon: "https://dka04237waacy.cloudfront.net/uploads/turma-da-monica/tp-corpo-branco-3.png",
|
|
787
|
+
categories: [categoryId, categoryId2],
|
|
788
|
+
});
|
|
789
|
+
},
|
|
790
|
+
parseCollection() {
|
|
791
|
+
if (
|
|
792
|
+
this.categoriesAssets.collections &&
|
|
793
|
+
this.categoriesAssets.collections[0]
|
|
794
|
+
) {
|
|
795
|
+
this.categoriesAssets.collections[0].categories.forEach((el, index) => {
|
|
796
|
+
this.categoriesAssets.collections[0].categories[index] = parseInt(el);
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
removeTooltip() {
|
|
801
|
+
const tooltip = document.getElementsByClassName("mobile-tooltip")[0];
|
|
802
|
+
tooltip.parentNode.removeChild(tooltip);
|
|
803
|
+
},
|
|
804
|
+
},
|
|
805
|
+
};
|
|
806
|
+
</script>
|
|
807
|
+
|
|
808
|
+
<style lang="scss">
|
|
809
|
+
@import "./node_modules/@tiddh/brave-tokens/dist/styles/style.scss";
|
|
810
|
+
|
|
811
|
+
.mobile-tooltip {
|
|
812
|
+
display: none;
|
|
813
|
+
@media (max-width: 992px) {
|
|
814
|
+
// display: flex;
|
|
815
|
+
display: none;
|
|
816
|
+
position: absolute;
|
|
817
|
+
z-index: 90000000;
|
|
818
|
+
height: calc(100vh - 59px);
|
|
819
|
+
width: 100%;
|
|
820
|
+
transition: all 0.3s;
|
|
821
|
+
bottom: 0;
|
|
822
|
+
.tooltip {
|
|
823
|
+
border-radius: 5px;
|
|
824
|
+
color: white;
|
|
825
|
+
font-size: 14px;
|
|
826
|
+
padding: 10px 36px 10px 16px;
|
|
827
|
+
width: 350px;
|
|
828
|
+
margin-left: 15px;
|
|
829
|
+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.31);
|
|
830
|
+
line-height: 1.5;
|
|
831
|
+
position: relative;
|
|
832
|
+
margin-top: auto;
|
|
833
|
+
bottom: calc(var(--cp) + 25px);
|
|
834
|
+
&:after {
|
|
835
|
+
top: 100%;
|
|
836
|
+
left: 5%;
|
|
837
|
+
border: solid transparent;
|
|
838
|
+
content: " ";
|
|
839
|
+
position: absolute;
|
|
840
|
+
border-width: 10px;
|
|
841
|
+
}
|
|
842
|
+
i {
|
|
843
|
+
position: absolute;
|
|
844
|
+
right: 10px;
|
|
845
|
+
top: 10px;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
</style>
|