@brilo/base-blocks 0.1.41 → 0.1.43
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/build/.tsbuildinfo +1 -1
- package/build/blocks/compare/compare-group/types.d.ts +1 -1
- package/build/blocks/compare/compare-group/types.d.ts.map +1 -1
- package/build/blocks/compare/compare-option/types.d.ts +1 -1
- package/build/blocks/compare/compare-option/types.d.ts.map +1 -1
- package/build/blocks/core/basic-button/edit.d.ts.map +1 -1
- package/build/blocks/core/basic-button/edit.js +3 -3
- package/build/blocks/core/basic-button/factory.d.ts.map +1 -1
- package/build/blocks/core/basic-button/factory.js +1 -0
- package/build/blocks/core/basic-button/types.d.ts +1 -0
- package/build/blocks/core/basic-button/types.d.ts.map +1 -1
- package/build/blocks/core/basic-overline/edit.d.ts.map +1 -1
- package/build/blocks/core/basic-overline/edit.js +6 -1
- package/build/blocks/core/basic-overline/factory.d.ts.map +1 -1
- package/build/blocks/core/basic-overline/factory.js +2 -0
- package/build/blocks/core/basic-overline/types.d.ts +3 -1
- package/build/blocks/core/basic-overline/types.d.ts.map +1 -1
- package/build/blocks/form/form-field/edit.d.ts +1 -1
- package/build/blocks/form/form-field/edit.d.ts.map +1 -1
- package/build/blocks/form/form-field/types.d.ts +1 -1
- package/build/blocks/form/form-field/types.d.ts.map +1 -1
- package/build/blocks/gallery/gallery-item/index.d.ts +1 -1
- package/build/blocks/gallery/gallery-item/index.d.ts.map +1 -1
- package/build/blocks/groups/banner-group/index.d.ts +1 -1
- package/build/blocks/groups/banner-group/index.d.ts.map +1 -1
- package/build/blocks/groups/banner-group/types.d.ts +2 -2
- package/build/blocks/groups/banner-group/types.d.ts.map +1 -1
- package/build/blocks/groups/basic-header-group/edit.d.ts.map +1 -1
- package/build/blocks/groups/basic-header-group/edit.js +8 -3
- package/build/blocks/groups/basic-header-group/factory.js +1 -1
- package/build/blocks/groups/basic-header-group/types.d.ts +2 -0
- package/build/blocks/groups/basic-header-group/types.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/constants.d.ts +25 -0
- package/build/blocks/groups/text-and-media-group/constants.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/constants.js +10 -0
- package/build/blocks/groups/text-and-media-group/edit.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/edit.js +16 -9
- package/build/blocks/groups/text-and-media-group/factory.d.ts +2 -2
- package/build/blocks/groups/text-and-media-group/factory.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/factory.js +12 -10
- package/build/blocks/groups/text-and-media-group/types.d.ts +8 -3
- package/build/blocks/groups/text-and-media-group/types.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/constants.d.ts +16 -0
- package/build/blocks/hero/hero-group/constants.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/constants.js +7 -0
- package/build/blocks/hero/hero-group/edit.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/edit.js +6 -5
- package/build/blocks/hero/hero-group/factory.d.ts +2 -2
- package/build/blocks/hero/hero-group/factory.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/factory.js +11 -5
- package/build/blocks/hero/hero-group/types.d.ts +7 -4
- package/build/blocks/hero/hero-group/types.d.ts.map +1 -1
- package/build/blocks/hero/hero-item/edit.d.ts.map +1 -1
- package/build/blocks/hero/hero-item/edit.js +7 -2
- package/build/blocks/hero/hero-item/factory.d.ts.map +1 -1
- package/build/blocks/hero/hero-item/factory.js +1 -0
- package/build/blocks/hero/hero-item/types.d.ts +12 -2
- package/build/blocks/hero/hero-item/types.d.ts.map +1 -1
- package/build/blocks/link/link-item/factory.d.ts +1 -1
- package/build/blocks/link/link-item/factory.d.ts.map +1 -1
- package/build/blocks/map/map-group/types.d.ts +3 -3
- package/build/blocks/map/map-group/types.d.ts.map +1 -1
- package/build/blocks/newsletter/newsletter-form/types.d.ts +1 -1
- package/build/blocks/newsletter/newsletter-form/types.d.ts.map +1 -1
- package/build/blocks/person/person-group/types.d.ts +1 -1
- package/build/blocks/person/person-group/types.d.ts.map +1 -1
- package/build/blocks/person/person-item/constants.d.ts.map +1 -1
- package/build/blocks/person/person-item/types.d.ts +2 -2
- package/build/blocks/person/person-item/types.d.ts.map +1 -1
- package/build/blocks/priceplan/priceplan-group/constants.d.ts +2 -0
- package/build/blocks/priceplan/priceplan-group/constants.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/constants.js +1 -0
- package/build/blocks/priceplan/priceplan-group/edit.d.ts +3 -0
- package/build/blocks/priceplan/priceplan-group/edit.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/edit.js +16 -0
- package/build/blocks/priceplan/priceplan-group/factory.d.ts +5 -0
- package/build/blocks/priceplan/priceplan-group/factory.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/factory.js +20 -0
- package/build/blocks/priceplan/priceplan-group/icon.d.ts +2 -0
- package/build/blocks/priceplan/priceplan-group/icon.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/icon.js +2 -0
- package/build/blocks/priceplan/priceplan-group/index.d.ts +5 -0
- package/build/blocks/priceplan/priceplan-group/index.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/index.js +11 -0
- package/build/blocks/priceplan/priceplan-group/types.d.ts +7 -0
- package/build/blocks/priceplan/priceplan-group/types.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-group/types.js +1 -0
- package/build/blocks/priceplan/priceplan-item/constants.d.ts +15 -0
- package/build/blocks/priceplan/priceplan-item/constants.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/constants.js +9 -0
- package/build/blocks/priceplan/priceplan-item/edit.d.ts +6 -0
- package/build/blocks/priceplan/priceplan-item/edit.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/edit.js +30 -0
- package/build/blocks/priceplan/priceplan-item/factory.d.ts +7 -0
- package/build/blocks/priceplan/priceplan-item/factory.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/factory.js +70 -0
- package/build/blocks/priceplan/priceplan-item/icon.d.ts +2 -0
- package/build/blocks/priceplan/priceplan-item/icon.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/icon.js +2 -0
- package/build/blocks/priceplan/priceplan-item/index.d.ts +5 -0
- package/build/blocks/priceplan/priceplan-item/index.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/index.js +12 -0
- package/build/blocks/priceplan/priceplan-item/types.d.ts +28 -0
- package/build/blocks/priceplan/priceplan-item/types.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-item/types.js +1 -0
- package/build/blocks/priceplan/priceplan-list-item/constants.d.ts +8 -0
- package/build/blocks/priceplan/priceplan-list-item/constants.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/constants.js +5 -0
- package/build/blocks/priceplan/priceplan-list-item/edit.d.ts +6 -0
- package/build/blocks/priceplan/priceplan-list-item/edit.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/edit.js +17 -0
- package/build/blocks/priceplan/priceplan-list-item/factory.d.ts +7 -0
- package/build/blocks/priceplan/priceplan-list-item/factory.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/factory.js +30 -0
- package/build/blocks/priceplan/priceplan-list-item/icon.d.ts +2 -0
- package/build/blocks/priceplan/priceplan-list-item/icon.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/icon.js +2 -0
- package/build/blocks/priceplan/priceplan-list-item/index.d.ts +5 -0
- package/build/blocks/priceplan/priceplan-list-item/index.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/index.js +5 -0
- package/build/blocks/priceplan/priceplan-list-item/types.d.ts +11 -0
- package/build/blocks/priceplan/priceplan-list-item/types.d.ts.map +1 -0
- package/build/blocks/priceplan/priceplan-list-item/types.js +1 -0
- package/build/blocks/review/review-group/constants.d.ts +16 -0
- package/build/blocks/review/review-group/constants.d.ts.map +1 -0
- package/build/blocks/review/review-group/constants.js +16 -0
- package/build/blocks/review/review-group/edit.d.ts +4 -0
- package/build/blocks/review/review-group/edit.d.ts.map +1 -0
- package/build/blocks/review/review-group/edit.js +28 -0
- package/build/blocks/review/review-group/factory.d.ts +7 -0
- package/build/blocks/review/review-group/factory.d.ts.map +1 -0
- package/build/blocks/review/review-group/factory.js +36 -0
- package/build/blocks/review/review-group/icon.d.ts +2 -0
- package/build/blocks/review/review-group/icon.d.ts.map +1 -0
- package/build/blocks/review/review-group/icon.js +2 -0
- package/build/blocks/review/review-group/index.d.ts +5 -0
- package/build/blocks/review/review-group/index.d.ts.map +1 -0
- package/build/blocks/review/review-group/index.js +6 -0
- package/build/blocks/review/review-group/types.d.ts +15 -0
- package/build/blocks/review/review-group/types.d.ts.map +1 -0
- package/build/blocks/review/review-group/types.js +1 -0
- package/build/blocks/review/review-item/constants.d.ts +2 -0
- package/build/blocks/review/review-item/constants.d.ts.map +1 -0
- package/build/blocks/review/review-item/constants.js +1 -0
- package/build/blocks/review/review-item/edit.d.ts +4 -0
- package/build/blocks/review/review-item/edit.d.ts.map +1 -0
- package/build/blocks/review/review-item/edit.js +29 -0
- package/build/blocks/review/review-item/factory.d.ts +5 -0
- package/build/blocks/review/review-item/factory.d.ts.map +1 -0
- package/build/blocks/review/review-item/factory.js +36 -0
- package/build/blocks/review/review-item/icon.d.ts +2 -0
- package/build/blocks/review/review-item/icon.d.ts.map +1 -0
- package/build/blocks/review/review-item/icon.js +2 -0
- package/build/blocks/review/review-item/index.d.ts +5 -0
- package/build/blocks/review/review-item/index.d.ts.map +1 -0
- package/build/blocks/review/review-item/index.js +5 -0
- package/build/blocks/review/review-item/types.d.ts +17 -0
- package/build/blocks/review/review-item/types.d.ts.map +1 -0
- package/build/blocks/review/review-item/types.js +1 -0
- package/build/blocks/sections/base-section/attributes.d.ts +25 -0
- package/build/blocks/sections/base-section/attributes.d.ts.map +1 -1
- package/build/blocks/sections/base-section/attributes.js +9 -0
- package/build/blocks/sections/base-section/controls.d.ts.map +1 -1
- package/build/blocks/sections/base-section/controls.js +46 -2
- package/build/blocks/sections/base-section/types.d.ts +24 -1
- package/build/blocks/sections/base-section/types.d.ts.map +1 -1
- package/build/blocks/share/share/index.d.ts.map +1 -1
- package/build/blocks/share/share/index.js +1 -0
- package/build/blocks/signpost/signpost-group/constants.d.ts +26 -0
- package/build/blocks/signpost/signpost-group/constants.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/constants.js +21 -0
- package/build/blocks/signpost/signpost-group/edit.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/edit.js +13 -8
- package/build/blocks/signpost/signpost-group/factory.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/factory.js +5 -1
- package/build/blocks/signpost/signpost-group/types.d.ts +5 -1
- package/build/blocks/signpost/signpost-group/types.d.ts.map +1 -1
- package/build/blocks/step/step-group/edit.d.ts +1 -1
- package/build/blocks/step/step-group/edit.d.ts.map +1 -1
- package/build/blocks/step/step-group/factory.d.ts +1 -1
- package/build/blocks/step/step-group/factory.d.ts.map +1 -1
- package/build/blocks/step/step-group/types.d.ts +2 -2
- package/build/blocks/step/step-group/types.d.ts.map +1 -1
- package/build/blocks/step/step-item/types.d.ts +1 -1
- package/build/blocks/step/step-item/types.d.ts.map +1 -1
- package/build/blocks/testimonial/testimonial-group/index.d.ts +1 -1
- package/build/blocks/testimonial/testimonial-group/index.d.ts.map +1 -1
- package/build/blocks/testimonial/testimonial-group/types.d.ts +1 -1
- package/build/blocks/testimonial/testimonial-group/types.d.ts.map +1 -1
- package/build/blocks/text-and-form/text-and-form-text-column/edit.d.ts.map +1 -1
- package/build/blocks/text-and-form/text-and-form-text-column/edit.js +9 -2
- package/build/blocks/text-and-form/text-and-form-text-column/factory.js +1 -1
- package/build/blocks/text-and-form/text-and-form-text-column/types.d.ts +2 -0
- package/build/blocks/text-and-form/text-and-form-text-column/types.d.ts.map +1 -1
- package/build/blocks/usp/usp-item/types.d.ts +1 -1
- package/build/blocks/usp/usp-item/types.d.ts.map +1 -1
- package/build/blocks/video/video-group/constants.d.ts +15 -0
- package/build/blocks/video/video-group/constants.d.ts.map +1 -0
- package/build/blocks/video/video-group/constants.js +9 -0
- package/build/blocks/video/video-group/edit.d.ts +4 -0
- package/build/blocks/video/video-group/edit.d.ts.map +1 -0
- package/build/blocks/video/video-group/edit.js +23 -0
- package/build/blocks/video/video-group/factory.d.ts +5 -0
- package/build/blocks/video/video-group/factory.d.ts.map +1 -0
- package/build/blocks/video/video-group/factory.js +47 -0
- package/build/blocks/video/video-group/icon.d.ts +2 -0
- package/build/blocks/video/video-group/icon.d.ts.map +1 -0
- package/build/blocks/video/video-group/icon.js +2 -0
- package/build/blocks/video/video-group/index.d.ts +5 -0
- package/build/blocks/video/video-group/index.d.ts.map +1 -0
- package/build/blocks/video/video-group/index.js +5 -0
- package/build/blocks/video/video-group/types.d.ts +19 -0
- package/build/blocks/video/video-group/types.d.ts.map +1 -0
- package/build/blocks/video/video-group/types.js +1 -0
- package/build/components/Document/DocumentTermSelectModal.js +1 -1
- package/build/components/EntitySelectModal/EntitySelectModal.d.ts.map +1 -0
- package/build/components/Event/EventSelectModal.js +1 -1
- package/build/components/Event/EventTermSelectModal.js +1 -1
- package/build/components/Post/PostSelectModal.js +1 -1
- package/build/components/Post/PostTermSelectModal.js +1 -1
- package/build/index.d.ts +12 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +6 -0
- package/build/types.d.ts +1 -1
- package/build/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blocks/compare/compare-group/types.ts +1 -1
- package/src/blocks/compare/compare-option/types.ts +1 -1
- package/src/blocks/core/basic-button/edit.tsx +29 -18
- package/src/blocks/core/basic-button/factory.tsx +1 -0
- package/src/blocks/core/basic-button/types.ts +1 -0
- package/src/blocks/core/basic-overline/edit.tsx +8 -0
- package/src/blocks/core/basic-overline/factory.tsx +2 -0
- package/src/blocks/core/basic-overline/types.ts +3 -1
- package/src/blocks/form/form-field/edit.tsx +1 -1
- package/src/blocks/form/form-field/types.ts +4 -4
- package/src/blocks/form/form-group/editor.scss +1 -0
- package/src/blocks/gallery/gallery-item/index.ts +1 -1
- package/src/blocks/groups/banner-group/index.ts +1 -1
- package/src/blocks/groups/banner-group/types.ts +2 -2
- package/src/blocks/groups/basic-header-group/edit.tsx +25 -1
- package/src/blocks/groups/basic-header-group/factory.tsx +1 -1
- package/src/blocks/groups/basic-header-group/types.ts +1 -1
- package/src/blocks/groups/text-and-media-group/constants.ts +11 -0
- package/src/blocks/groups/text-and-media-group/edit.tsx +37 -2
- package/src/blocks/groups/text-and-media-group/editor.scss +50 -4
- package/src/blocks/groups/text-and-media-group/factory.tsx +10 -4
- package/src/blocks/groups/text-and-media-group/types.ts +7 -1
- package/src/blocks/hero/hero-group/constants.ts +8 -0
- package/src/blocks/hero/hero-group/edit.tsx +16 -4
- package/src/blocks/hero/hero-group/factory.tsx +13 -4
- package/src/blocks/hero/hero-group/types.ts +15 -3
- package/src/blocks/hero/hero-item/edit.tsx +42 -2
- package/src/blocks/hero/hero-item/editor.scss +13 -0
- package/src/blocks/hero/hero-item/factory.tsx +1 -0
- package/src/blocks/hero/hero-item/types.ts +4 -2
- package/src/blocks/link/link-item/factory.tsx +1 -1
- package/src/blocks/map/map-group/types.ts +3 -3
- package/src/blocks/newsletter/newsletter-form/types.ts +1 -1
- package/src/blocks/person/person-group/types.ts +1 -1
- package/src/blocks/person/person-item/constants.ts +0 -3
- package/src/blocks/person/person-item/types.ts +2 -2
- package/src/blocks/priceplan/priceplan-group/constants.ts +1 -0
- package/src/blocks/priceplan/priceplan-group/edit.tsx +21 -0
- package/src/blocks/priceplan/priceplan-group/editor.scss +3 -0
- package/src/blocks/priceplan/priceplan-group/factory.tsx +23 -0
- package/src/blocks/priceplan/priceplan-group/icon.tsx +36 -0
- package/src/blocks/priceplan/priceplan-group/index.ts +15 -0
- package/src/blocks/priceplan/priceplan-group/types.ts +7 -0
- package/src/blocks/priceplan/priceplan-item/constants.ts +11 -0
- package/src/blocks/priceplan/priceplan-item/edit.tsx +158 -0
- package/src/blocks/priceplan/priceplan-item/editor.scss +131 -0
- package/src/blocks/priceplan/priceplan-item/factory.tsx +80 -0
- package/src/blocks/priceplan/priceplan-item/icon.tsx +9 -0
- package/src/blocks/priceplan/priceplan-item/index.ts +16 -0
- package/src/blocks/priceplan/priceplan-item/types.ts +34 -0
- package/src/blocks/priceplan/priceplan-list-item/constants.ts +6 -0
- package/src/blocks/priceplan/priceplan-list-item/edit.tsx +59 -0
- package/src/blocks/priceplan/priceplan-list-item/editor.scss +21 -0
- package/src/blocks/priceplan/priceplan-list-item/factory.tsx +38 -0
- package/src/blocks/priceplan/priceplan-list-item/icon.tsx +9 -0
- package/src/blocks/priceplan/priceplan-list-item/index.ts +9 -0
- package/src/blocks/priceplan/priceplan-list-item/types.ts +13 -0
- package/src/blocks/review/review-group/constants.ts +19 -0
- package/src/blocks/review/review-group/edit.tsx +72 -0
- package/src/blocks/review/review-group/editor.scss +10 -0
- package/src/blocks/review/review-group/factory.tsx +43 -0
- package/src/blocks/review/review-group/icon.tsx +12 -0
- package/src/blocks/review/review-group/index.ts +10 -0
- package/src/blocks/review/review-group/types.ts +17 -0
- package/src/blocks/review/review-item/constants.ts +1 -0
- package/src/blocks/review/review-item/edit.tsx +126 -0
- package/src/blocks/review/review-item/editor.scss +96 -0
- package/src/blocks/review/review-item/factory.tsx +40 -0
- package/src/blocks/review/review-item/icon.tsx +9 -0
- package/src/blocks/review/review-item/index.ts +9 -0
- package/src/blocks/review/review-item/types.ts +19 -0
- package/src/blocks/sections/base-section/attributes.ts +9 -0
- package/src/blocks/sections/base-section/controls.tsx +97 -1
- package/src/blocks/sections/base-section/types.ts +9 -1
- package/src/blocks/share/share/index.ts +1 -0
- package/src/blocks/signpost/signpost-group/constants.ts +23 -0
- package/src/blocks/signpost/signpost-group/edit.tsx +25 -4
- package/src/blocks/signpost/signpost-group/factory.tsx +5 -1
- package/src/blocks/signpost/signpost-group/types.ts +4 -1
- package/src/blocks/signpost/signpost-item/editor.scss +5 -0
- package/src/blocks/step/step-group/edit.tsx +1 -1
- package/src/blocks/step/step-group/factory.tsx +1 -1
- package/src/blocks/step/step-group/types.ts +2 -2
- package/src/blocks/step/step-item/types.ts +1 -1
- package/src/blocks/testimonial/testimonial-group/index.ts +1 -1
- package/src/blocks/testimonial/testimonial-group/types.ts +1 -1
- package/src/blocks/text-and-form/text-and-form-text-column/edit.tsx +31 -0
- package/src/blocks/text-and-form/text-and-form-text-column/editor.scss +8 -4
- package/src/blocks/text-and-form/text-and-form-text-column/factory.tsx +1 -1
- package/src/blocks/text-and-form/text-and-form-text-column/types.ts +1 -1
- package/src/blocks/usp/usp-item/types.ts +1 -1
- package/src/blocks/video/video-group/constants.ts +11 -0
- package/src/blocks/video/video-group/edit.tsx +158 -0
- package/src/blocks/video/video-group/editor.scss +105 -0
- package/src/blocks/video/video-group/factory.tsx +51 -0
- package/src/blocks/video/video-group/icon.tsx +17 -0
- package/src/blocks/video/video-group/index.ts +9 -0
- package/src/blocks/video/video-group/types.ts +21 -0
- package/src/components/Document/DocumentTermSelectModal.tsx +1 -1
- package/src/components/Event/EventSelectModal.tsx +1 -1
- package/src/components/Event/EventTermSelectModal.tsx +1 -1
- package/src/components/ImagePicker/ImagePicker.tsx +1 -1
- package/src/components/Post/PostSelectModal.tsx +1 -1
- package/src/components/Post/PostTermSelectModal.tsx +1 -1
- package/src/editor.scss +6 -0
- package/src/index.ts +12 -0
- package/src/types.ts +1 -1
- package/build/components/Event/EntitySelectModal.d.ts.map +0 -1
- /package/build/components/{Event → EntitySelectModal}/EntitySelectModal.d.ts +0 -0
- /package/build/components/{Event → EntitySelectModal}/EntitySelectModal.js +0 -0
- /package/src/components/{Event → EntitySelectModal}/EntitySelectModal.tsx +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __ } from '@wordpress/i18n';
|
|
2
|
+
export const ALIGNMENTS = [
|
|
3
|
+
{ value: 'left', label: __('Vlevo', 'brilo-blocks') },
|
|
4
|
+
{ value: 'center', label: __('Na střed', 'brilo-blocks') },
|
|
5
|
+
];
|
|
6
|
+
export const CHIP_VARIANTS = [
|
|
7
|
+
{ value: 'primary', label: __('Primární', 'brilo-blocks') },
|
|
8
|
+
{ value: 'secondary', label: __('Sekundární', 'brilo-blocks') },
|
|
9
|
+
];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PriceplanItemAttributes, PriceplanItemOptions } from './types';
|
|
2
|
+
export declare function createPriceplanItemEdit(options: PriceplanItemOptions): ({ attributes, setAttributes, }: {
|
|
3
|
+
attributes: PriceplanItemAttributes;
|
|
4
|
+
setAttributes: (a: Partial<PriceplanItemAttributes>) => void;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=edit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-item/edit.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAA2C,uBAAuB,EAAE,oBAAoB,EAAC,MAAM,SAAS,CAAA;AAEpH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,oBAAoB,oCAOhE;IACD,UAAU,EAAE,uBAAuB,CAAA;IACnC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAA;CAC7D,iCAqIF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { InspectorControls, RichText, useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
|
|
3
|
+
import { PanelBody, TextControl, ToggleControl, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { ImagePickerBody, ImagePickerControl, useMediaUrl } from '../../../components/ImagePicker';
|
|
7
|
+
import { ALIGNMENTS, CHIP_VARIANTS } from './constants';
|
|
8
|
+
export function createPriceplanItemEdit(options) {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const ALIGNMENTS_OPTIONS = (_a = options.alignments) !== null && _a !== void 0 ? _a : ALIGNMENTS;
|
|
11
|
+
const CHIP_VARIANTS_OPTIONS = (_b = options.chipVariants) !== null && _b !== void 0 ? _b : CHIP_VARIANTS;
|
|
12
|
+
return function Edit({ attributes, setAttributes, }) {
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
var _d, _e, _f, _g, _h, _j;
|
|
15
|
+
const { title, description, alignment, img, price, highlighted, chip, footer } = attributes;
|
|
16
|
+
const chipIconUrl = useMediaUrl((_a = chip === null || chip === void 0 ? void 0 : chip.icon) === null || _a === void 0 ? void 0 : _a.id);
|
|
17
|
+
const blockProps = useBlockProps({
|
|
18
|
+
className: clsx('i-priceplan', `--align-${alignment}`, highlighted && '--highlighted'),
|
|
19
|
+
});
|
|
20
|
+
const innerBlocksProps = useInnerBlocksProps({ className: 'i-priceplan__inner' }, {
|
|
21
|
+
allowedBlocks: options.allowedBlocks,
|
|
22
|
+
template: options.template,
|
|
23
|
+
});
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsxs(InspectorControls, { children: [_jsxs(PanelBody, { title: __('Karta', 'brilo-blocks'), children: [_jsx(ToggleControl, { label: __('Zvýrazněná karta', 'brilo-blocks'), checked: highlighted, onChange: (value) => setAttributes({ highlighted: value }) }), _jsx(ToggleGroupControl, { label: __('Zarovnání', 'brilo-blocks'), value: alignment, onChange: (value) => setAttributes({ alignment: value }), isBlock: true, children: ALIGNMENTS_OPTIONS.map((a) => (_jsx(ToggleGroupControlOption, { value: a.value, label: a.label }, a.value))) })] }), _jsx(PanelBody, { title: __('Obrázek', 'brilo-blocks'), initialOpen: false, children: _jsx(ImagePickerControl, { value: img, onChange: (val) => setAttributes({ img: val }) }) }), _jsxs(PanelBody, { title: __('Chip / badge', 'brilo-blocks'), initialOpen: false, children: [_jsx(TextControl, { label: __('Text chipu', 'brilo-blocks'), value: (_d = chip === null || chip === void 0 ? void 0 : chip.title) !== null && _d !== void 0 ? _d : '', onChange: (value) => setAttributes({ chip: { ...chip, title: value } }), placeholder: __('např. Doporučujeme', 'brilo-blocks') }), _jsx(ToggleGroupControl, { label: __('Varianta chipu', 'brilo-blocks'), value: (_e = chip === null || chip === void 0 ? void 0 : chip.variant) !== null && _e !== void 0 ? _e : 'primary', onChange: (value) => setAttributes({ chip: { ...chip, variant: value } }), isBlock: true, children: CHIP_VARIANTS_OPTIONS.map((v) => (_jsx(ToggleGroupControlOption, { value: v.value, label: v.label }, v.value))) }), _jsx(ImagePickerControl, { value: (_f = chip === null || chip === void 0 ? void 0 : chip.icon) !== null && _f !== void 0 ? _f : { id: 0, alt: '' }, onChange: (val) => setAttributes({ chip: { ...chip, icon: val } }), labels: {
|
|
25
|
+
select: __('Vybrat ikonu chipu', 'brilo-blocks'),
|
|
26
|
+
change: __('Změnit ikonu', 'brilo-blocks'),
|
|
27
|
+
remove: __('Odebrat ikonu', 'brilo-blocks'),
|
|
28
|
+
} })] })] }), _jsx("div", { ...blockProps, children: _jsxs("div", { className: "i-priceplan__wrap", children: [(chip === null || chip === void 0 ? void 0 : chip.title) && (_jsxs("div", { className: clsx('i-priceplan__chip', `--chip-${chip.variant}`), children: [!!((_b = chip.icon) === null || _b === void 0 ? void 0 : _b.id) && chipIconUrl && _jsx("img", { src: chipIconUrl, alt: (_g = (_c = chip.icon) === null || _c === void 0 ? void 0 : _c.alt) !== null && _g !== void 0 ? _g : '', className: "i-priceplan__chip-icon" }), _jsx("span", { children: chip.title })] })), _jsxs("div", { className: "i-priceplan__header", children: [_jsx(RichText, { tagName: "h3", className: "i-priceplan__title u-text-editable", value: title, onChange: (value) => setAttributes({ title: value }), placeholder: __('Název balíčku...', 'brilo-blocks'), allowedFormats: ['core/bold', 'core/italic', 'brilo-blocks/text-color'] }), _jsx(RichText, { tagName: "p", className: "i-priceplan__description u-text-editable", value: description, onChange: (value) => setAttributes({ description: value }), placeholder: __('Popis balíčku...', 'brilo-blocks') })] }), _jsx("div", { className: "i-priceplan__image", children: _jsx(ImagePickerBody, { value: img, onChange: (val) => setAttributes({ img: val }) }) }), _jsxs("div", { className: "i-priceplan__price", children: [_jsx(RichText, { tagName: "p", className: "i-priceplan__price-value u-text-editable", value: (_h = price === null || price === void 0 ? void 0 : price.value) !== null && _h !== void 0 ? _h : '', onChange: (value) => setAttributes({ price: { ...price, value } }), placeholder: __('od 0 Kč', 'brilo-blocks'), allowedFormats: [] }), _jsx(RichText, { tagName: "p", className: "i-priceplan__price-footer u-text-editable", value: (_j = price === null || price === void 0 ? void 0 : price.footer) !== null && _j !== void 0 ? _j : '', onChange: (value) => setAttributes({ price: { ...price, footer: value } }), placeholder: __('s DPH · po odečtení dotace...', 'brilo-blocks'), allowedFormats: ['core/bold', 'core/italic', 'core/link', 'brilo-blocks/text-color'] })] }), _jsx("div", { ...innerBlocksProps }), _jsx(RichText, { tagName: "p", className: "i-priceplan__footer u-text-editable", value: footer, onChange: (value) => setAttributes({ footer: value }), placeholder: __('Poznámka (volitelné)...', 'brilo-blocks'), allowedFormats: ['core/bold', 'core/italic', 'core/link', 'brilo-blocks/text-color'] })] }) })] }));
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BlockConfiguration } from '@wordpress/blocks';
|
|
2
|
+
import type { OptionArray } from '../../../types';
|
|
3
|
+
import { ALIGNMENTS, CHIP_VARIANTS } from './constants';
|
|
4
|
+
import type { PriceplanItemAttributes, PriceplanItemOptions } from './types';
|
|
5
|
+
export type { PriceplanItemAttributes, PriceplanItemOptions };
|
|
6
|
+
export declare function createPriceplanItemBlock<TAlignments extends OptionArray = typeof ALIGNMENTS, TChipVariants extends OptionArray = typeof CHIP_VARIANTS>(options: PriceplanItemOptions<TAlignments, TChipVariants>): BlockConfiguration<PriceplanItemAttributes<TAlignments[number]['value'], TChipVariants[number]['value']>>;
|
|
7
|
+
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-item/factory.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAEzD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAA;AACxC,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,aAAa,CAAA;AAGrD,OAAO,KAAK,EAAC,uBAAuB,EAAE,oBAAoB,EAAC,MAAM,SAAS,CAAA;AAE1E,YAAY,EAAC,uBAAuB,EAAE,oBAAoB,EAAC,CAAA;AAE3D,wBAAgB,wBAAwB,CACtC,WAAW,SAAS,WAAW,GAAG,OAAO,UAAU,EACnD,aAAa,SAAS,WAAW,GAAG,OAAO,aAAa,EAExD,OAAO,EAAE,oBAAoB,CAAC,WAAW,EAAE,aAAa,CAAC,GACxD,kBAAkB,CAAC,uBAAuB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CA+D3G"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InnerBlocks } from '@wordpress/block-editor';
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
|
+
import { ALIGNMENTS, CHIP_VARIANTS } from './constants';
|
|
5
|
+
import { createPriceplanItemEdit } from './edit';
|
|
6
|
+
import { icon as defaultIcon } from './icon';
|
|
7
|
+
export function createPriceplanItemBlock(options) {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f;
|
|
9
|
+
const alignments = (_a = options.alignments) !== null && _a !== void 0 ? _a : ALIGNMENTS;
|
|
10
|
+
const chipVariants = (_b = options.chipVariants) !== null && _b !== void 0 ? _b : CHIP_VARIANTS;
|
|
11
|
+
return {
|
|
12
|
+
name: options.name,
|
|
13
|
+
title: (_c = options.title) !== null && _c !== void 0 ? _c : __('Ceník položka', 'brilo-blocks'),
|
|
14
|
+
description: (_d = options.description) !== null && _d !== void 0 ? _d : __('Ceníková karta s cenou, seznamem funkcí a tlačítkem', 'brilo-blocks'),
|
|
15
|
+
category: (_e = options.category) !== null && _e !== void 0 ? _e : 'layout',
|
|
16
|
+
...(options.parent && { parent: options.parent }),
|
|
17
|
+
icon: (_f = options.icon) !== null && _f !== void 0 ? _f : { src: defaultIcon },
|
|
18
|
+
supports: { html: false, customClassName: false },
|
|
19
|
+
attributes: {
|
|
20
|
+
title: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
},
|
|
24
|
+
description: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
default: '',
|
|
27
|
+
},
|
|
28
|
+
alignment: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
default: alignments[0].value,
|
|
31
|
+
enum: alignments.map((a) => a.value),
|
|
32
|
+
},
|
|
33
|
+
price: {
|
|
34
|
+
type: 'object',
|
|
35
|
+
default: {
|
|
36
|
+
value: '',
|
|
37
|
+
footer: '',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
highlighted: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
chip: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
default: {
|
|
47
|
+
title: '',
|
|
48
|
+
variant: chipVariants[0].value,
|
|
49
|
+
icon: {
|
|
50
|
+
id: 0,
|
|
51
|
+
alt: '',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
img: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
default: {
|
|
58
|
+
id: 0,
|
|
59
|
+
alt: '',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
footer: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
default: '',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
edit: createPriceplanItemEdit(options),
|
|
68
|
+
save: () => _jsx(InnerBlocks.Content, {}),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-item/icon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,6BAQhB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const icon = (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Priceplan Item" }), _jsx("rect", { x: "3", y: "2", width: "14", height: "16", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }), _jsx("path", { d: "M6 6H14", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }), _jsx("path", { d: "M6 9H11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }), _jsx("path", { d: "M6 13H14", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })] }));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PriceplanItemOptions } from './types';
|
|
2
|
+
export type { PriceplanItemAttributes, PriceplanItemOptions } from './types';
|
|
3
|
+
export { createPriceplanItemBlock } from './factory';
|
|
4
|
+
export declare const priceplanItemDefaults: PriceplanItemOptions;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAA;AAEjD,YAAY,EAAC,uBAAuB,EAAE,oBAAoB,EAAC,MAAM,SAAS,CAAA;AAC1E,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAA;AAElD,eAAO,MAAM,qBAAqB,EAAE,oBAUnC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { createPriceplanItemBlock } from './factory';
|
|
2
|
+
export const priceplanItemDefaults = {
|
|
3
|
+
name: 'brilo/priceplan-item',
|
|
4
|
+
parent: ['brilo/priceplan-group'],
|
|
5
|
+
allowedBlocks: ['brilo/priceplan-list-item', 'brilo/button-group'],
|
|
6
|
+
template: [
|
|
7
|
+
['brilo/priceplan-list-item', {}],
|
|
8
|
+
['brilo/priceplan-list-item', {}],
|
|
9
|
+
['brilo/priceplan-list-item', {}],
|
|
10
|
+
['brilo/button-group', {}],
|
|
11
|
+
],
|
|
12
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ImageValue } from '../../../components/ImagePicker';
|
|
2
|
+
import type { BriloBlockType, OptionArray } from '../../../types';
|
|
3
|
+
import type { ALIGNMENTS, CHIP_VARIANTS } from './constants';
|
|
4
|
+
export type PriceplanAlignment = (typeof ALIGNMENTS)[number]['value'];
|
|
5
|
+
export type PriceplanChipVariant = (typeof CHIP_VARIANTS)[number]['value'];
|
|
6
|
+
export interface PriceplanItemAttributes<TAlignment extends string = PriceplanAlignment, TChipVariant extends string = PriceplanChipVariant> extends Record<string, unknown> {
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
alignment: TAlignment;
|
|
10
|
+
img: ImageValue;
|
|
11
|
+
price: {
|
|
12
|
+
value: string;
|
|
13
|
+
footer: string;
|
|
14
|
+
};
|
|
15
|
+
highlighted: boolean;
|
|
16
|
+
chip: {
|
|
17
|
+
title: string;
|
|
18
|
+
variant: TChipVariant;
|
|
19
|
+
icon: ImageValue;
|
|
20
|
+
};
|
|
21
|
+
footer: string;
|
|
22
|
+
}
|
|
23
|
+
export interface PriceplanItemOptions<TAlignments extends OptionArray = typeof ALIGNMENTS, TChipVariants extends OptionArray = typeof CHIP_VARIANTS> extends BriloBlockType {
|
|
24
|
+
allowedBlocks?: string[];
|
|
25
|
+
alignments?: TAlignments;
|
|
26
|
+
chipVariants?: TChipVariants;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-item/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,EAAC,cAAc,EAAE,WAAW,EAAC,MAAM,SAAS,CAAA;AACxD,OAAO,KAAK,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,aAAa,CAAA;AAE1D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AACrE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AAE1E,MAAM,WAAW,uBAAuB,CAAC,UAAU,SAAS,MAAM,GAAG,kBAAkB,EAAE,YAAY,SAAS,MAAM,GAAG,oBAAoB,CACzI,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,UAAU,CAAA;IACrB,GAAG,EAAE,UAAU,CAAA;IACf,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,WAAW,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,YAAY,CAAA;QACrB,IAAI,EAAE,UAAU,CAAA;KACjB,CAAA;IACD,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,oBAAoB,CACnC,WAAW,SAAS,WAAW,GAAG,OAAO,UAAU,EACnD,aAAa,SAAS,WAAW,GAAG,OAAO,aAAa,CACxD,SAAQ,cAAc;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,WAAW,CAAA;IACxB,YAAY,CAAC,EAAE,aAAa,CAAA;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const LIST_VARIANTS: readonly [{
|
|
2
|
+
readonly value: 'included';
|
|
3
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Zahrnuto">;
|
|
4
|
+
}, {
|
|
5
|
+
readonly value: 'excluded';
|
|
6
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Nezahrnuto">;
|
|
7
|
+
}];
|
|
8
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-list-item/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;aACvB,KAAK,EAAE,UAAU;aAAE,KAAK;;aACxB,KAAK,EAAE,UAAU;aAAE,KAAK;EACjB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PriceplanListItemAttributes, PriceplanListItemOptions } from './types';
|
|
2
|
+
export declare function createPriceplanListItemEdit(options: PriceplanListItemOptions): ({ attributes, setAttributes, }: {
|
|
3
|
+
attributes: PriceplanListItemAttributes;
|
|
4
|
+
setAttributes: (a: Partial<PriceplanListItemAttributes>) => void;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=edit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-list-item/edit.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,2BAA2B,EAAE,wBAAwB,EAAuB,MAAM,SAAS,CAAA;AAExG,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,wBAAwB,oCAMxE;IACD,UAAU,EAAE,2BAA2B,CAAA;IACvC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,KAAK,IAAI,CAAA;CACjE,iCAsCF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { InspectorControls, RichText, useBlockProps } from '@wordpress/block-editor';
|
|
3
|
+
import { PanelBody, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { LIST_VARIANTS } from './constants';
|
|
7
|
+
export function createPriceplanListItemEdit(options) {
|
|
8
|
+
var _a;
|
|
9
|
+
const LIST_VARIANTS_OPTIONS = (_a = options.variants) !== null && _a !== void 0 ? _a : LIST_VARIANTS;
|
|
10
|
+
return function Edit({ attributes, setAttributes, }) {
|
|
11
|
+
const { title, variant } = attributes;
|
|
12
|
+
const blockProps = useBlockProps({
|
|
13
|
+
className: clsx('i-priceplan-list', `--${variant}`),
|
|
14
|
+
});
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx(InspectorControls, { children: _jsx(PanelBody, { title: __('Položka', 'brilo-blocks'), children: _jsx(ToggleGroupControl, { label: __('Stav', 'brilo-blocks'), value: variant, onChange: (value) => setAttributes({ variant: value }), isBlock: true, children: LIST_VARIANTS_OPTIONS.map((v) => (_jsx(ToggleGroupControlOption, { value: v.value, label: v.label }, v.value))) }) }) }), _jsxs("div", { ...blockProps, children: [_jsx("span", { className: "i-priceplan-list__icon", children: variant === 'included' ? '✓' : '✕' }), _jsx(RichText, { tagName: "span", className: "i-priceplan-list__title u-text-editable", value: title, onChange: (value) => setAttributes({ title: value }), placeholder: __('Funkce...', 'brilo-blocks'), allowedFormats: ['core/bold', 'core/italic', 'core/link', 'brilo-blocks/text-color'] })] })] }));
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BlockConfiguration } from '@wordpress/blocks';
|
|
2
|
+
import type { OptionArray } from '../../../types';
|
|
3
|
+
import { LIST_VARIANTS } from './constants';
|
|
4
|
+
import type { PriceplanListItemAttributes, PriceplanListItemOptions } from './types';
|
|
5
|
+
export type { PriceplanListItemAttributes, PriceplanListItemOptions };
|
|
6
|
+
export declare function createPriceplanListItemBlock<TVariants extends OptionArray = typeof LIST_VARIANTS>(options: PriceplanListItemOptions<TVariants>): BlockConfiguration<PriceplanListItemAttributes<TVariants[number]['value']>>;
|
|
7
|
+
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-list-item/factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAEzD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAA;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAA;AAGzC,OAAO,KAAK,EAAC,2BAA2B,EAAE,wBAAwB,EAAC,MAAM,SAAS,CAAA;AAElF,YAAY,EAAC,2BAA2B,EAAE,wBAAwB,EAAC,CAAA;AAEnE,wBAAgB,4BAA4B,CAAC,SAAS,SAAS,WAAW,GAAG,OAAO,aAAa,EAC/F,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,GAC3C,kBAAkB,CAAC,2BAA2B,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAyB7E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { __ } from '@wordpress/i18n';
|
|
2
|
+
import { LIST_VARIANTS } from './constants';
|
|
3
|
+
import { createPriceplanListItemEdit } from './edit';
|
|
4
|
+
import { icon as defaultIcon } from './icon';
|
|
5
|
+
export function createPriceplanListItemBlock(options) {
|
|
6
|
+
var _a, _b, _c, _d, _e;
|
|
7
|
+
const variants = (_a = options.variants) !== null && _a !== void 0 ? _a : LIST_VARIANTS;
|
|
8
|
+
return {
|
|
9
|
+
name: options.name,
|
|
10
|
+
title: (_b = options.title) !== null && _b !== void 0 ? _b : __('Ceník položka seznamu', 'brilo-blocks'),
|
|
11
|
+
description: (_c = options.description) !== null && _c !== void 0 ? _c : __('Položka ceníkového seznamu funkcí (zahrnuto / nezahrnuto)', 'brilo-blocks'),
|
|
12
|
+
category: (_d = options.category) !== null && _d !== void 0 ? _d : 'layout',
|
|
13
|
+
...(options.parent && { parent: options.parent }),
|
|
14
|
+
icon: (_e = options.icon) !== null && _e !== void 0 ? _e : { src: defaultIcon },
|
|
15
|
+
supports: { html: false, customClassName: false },
|
|
16
|
+
attributes: {
|
|
17
|
+
title: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
default: '',
|
|
20
|
+
},
|
|
21
|
+
variant: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: variants[0].value,
|
|
24
|
+
enum: variants.map((v) => v.value),
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
edit: createPriceplanListItemEdit(options),
|
|
28
|
+
save: () => null,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-list-item/icon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,6BAQhB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const icon = (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Priceplan List Item" }), _jsx("path", { d: "M4 6L6 8L10 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M13 6H17", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }), _jsx("path", { d: "M4 14L6 16L10 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M13 14H17", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })] }));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PriceplanListItemOptions } from './types';
|
|
2
|
+
export type { PriceplanListItemAttributes, PriceplanListItemOptions } from './types';
|
|
3
|
+
export { createPriceplanListItemBlock } from './factory';
|
|
4
|
+
export declare const priceplanListItemDefaults: PriceplanListItemOptions;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-list-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,SAAS,CAAA;AAErD,YAAY,EAAC,2BAA2B,EAAE,wBAAwB,EAAC,MAAM,SAAS,CAAA;AAClF,OAAO,EAAC,4BAA4B,EAAC,MAAM,WAAW,CAAA;AAEtD,eAAO,MAAM,yBAAyB,EAAE,wBAGvC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BriloBlockType, OptionArray } from '../../../types';
|
|
2
|
+
import type { LIST_VARIANTS } from './constants';
|
|
3
|
+
export type PriceplanListVariant = (typeof LIST_VARIANTS)[number]['value'];
|
|
4
|
+
export interface PriceplanListItemAttributes<TVariant extends string = PriceplanListVariant> extends Record<string, unknown> {
|
|
5
|
+
title: string;
|
|
6
|
+
variant: TVariant;
|
|
7
|
+
}
|
|
8
|
+
export interface PriceplanListItemOptions<TVariants extends OptionArray = typeof LIST_VARIANTS> extends BriloBlockType {
|
|
9
|
+
variants?: TVariants;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-list-item/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAE,WAAW,EAAC,MAAM,SAAS,CAAA;AACxD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,aAAa,CAAA;AAE9C,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AAE1E,MAAM,WAAW,2BAA2B,CAAC,QAAQ,SAAS,MAAM,GAAG,oBAAoB,CAAE,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1H,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,QAAQ,CAAA;CAClB;AAED,MAAM,WAAW,wBAAwB,CAAC,SAAS,SAAS,WAAW,GAAG,OAAO,aAAa,CAAE,SAAQ,cAAc;IACpH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const VARIANTS: readonly [{
|
|
2
|
+
readonly value: 'default';
|
|
3
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Výchozí">;
|
|
4
|
+
}, {
|
|
5
|
+
readonly value: 'slider';
|
|
6
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Slider">;
|
|
7
|
+
}];
|
|
8
|
+
export declare const COLUMNS: readonly [2, 3, 4];
|
|
9
|
+
export declare const IMAGE_MODES: readonly [{
|
|
10
|
+
readonly value: 'avatar';
|
|
11
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Zobrazit">;
|
|
12
|
+
}, {
|
|
13
|
+
readonly value: 'none';
|
|
14
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Skrýt">;
|
|
15
|
+
}];
|
|
16
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/review/review-group/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;aAEjB,KAAK,EAAE,SAAS;aAChB,KAAK;;aAGL,KAAK,EAAE,QAAQ;aACf,KAAK;EAEC,CAAA;AAEV,eAAO,MAAM,OAAO,YAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAA;AAEzC,eAAO,MAAM,WAAW;aACrB,KAAK,EAAE,QAAQ;aAAE,KAAK;;aACtB,KAAK,EAAE,MAAM;aAAE,KAAK;EACb,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __ } from '@wordpress/i18n';
|
|
2
|
+
export const VARIANTS = [
|
|
3
|
+
{
|
|
4
|
+
value: 'default',
|
|
5
|
+
label: __('Výchozí', 'brilo-blocks'),
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
value: 'slider',
|
|
9
|
+
label: __('Slider', 'brilo-blocks'),
|
|
10
|
+
},
|
|
11
|
+
];
|
|
12
|
+
export const COLUMNS = [2, 3, 4];
|
|
13
|
+
export const IMAGE_MODES = [
|
|
14
|
+
{ value: 'avatar', label: __('Zobrazit', 'brilo-blocks') },
|
|
15
|
+
{ value: 'none', label: __('Skrýt', 'brilo-blocks') },
|
|
16
|
+
];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BlockEditProps } from '@wordpress/blocks';
|
|
2
|
+
import type { ReviewGroupAttributes, ReviewGroupOptions } from './types';
|
|
3
|
+
export declare function createReviewGroupEdit(options: ReviewGroupOptions): ({ attributes, setAttributes }: BlockEditProps<ReviewGroupAttributes>) => import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=edit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/review/review-group/edit.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAYrD,OAAO,KAAK,EAAgB,qBAAqB,EAAE,kBAAkB,EAA2B,MAAM,SAAS,CAAA;AAE/G,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,mCAGF,cAAc,CAAC,qBAAqB,CAAC,iCAqDnG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { InspectorControls } from '@wordpress/block-editor';
|
|
3
|
+
import { PanelBody, SelectControl, ToggleControl, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { useGroupBlock } from '../../../hooks/useGroupBlock';
|
|
7
|
+
import { COLUMNS, VARIANTS } from './constants';
|
|
8
|
+
export function createReviewGroupEdit(options) {
|
|
9
|
+
var _a;
|
|
10
|
+
const VARIANTS_OPTIONS = (_a = options.variants) !== null && _a !== void 0 ? _a : VARIANTS;
|
|
11
|
+
return function ReviewGroupEdit({ attributes, setAttributes }) {
|
|
12
|
+
var _a, _b, _c, _d;
|
|
13
|
+
const { columns, image, variant } = attributes;
|
|
14
|
+
const { blockProps, innerBlocksProps } = useGroupBlock({
|
|
15
|
+
blockClassName: clsx((_a = options.blockClassName) !== null && _a !== void 0 ? _a : 'g-review wp-block-section', `--variant-${variant}`, image === 'none' && '--image-none'),
|
|
16
|
+
containerClassName: [(_b = options.containerClassName) !== null && _b !== void 0 ? _b : 'u-grid-responsive-blocks-list', `--col-${columns}`],
|
|
17
|
+
containerStyle: { '--grid-max-col-count': columns },
|
|
18
|
+
allowedBlocks: (_c = options.allowedBlocks) !== null && _c !== void 0 ? _c : ['brilo/review-item'],
|
|
19
|
+
template: (_d = options.template) !== null && _d !== void 0 ? _d : [
|
|
20
|
+
['brilo/review-item', {}],
|
|
21
|
+
['brilo/review-item', {}],
|
|
22
|
+
['brilo/review-item', {}],
|
|
23
|
+
],
|
|
24
|
+
layout: { type: 'default' },
|
|
25
|
+
});
|
|
26
|
+
return (_jsxs(_Fragment, { children: [_jsx(InspectorControls, { children: _jsxs(PanelBody, { title: __('Rozložení', 'brilo-blocks'), children: [_jsx(ToggleGroupControl, { isBlock: true, label: __('Varianta', 'brilo-blocks'), value: variant, onChange: (v) => setAttributes({ variant: v }), children: VARIANTS_OPTIONS.map((v) => (_jsx(ToggleGroupControlOption, { value: v.value, label: v.label }, v.value))) }), _jsx(SelectControl, { label: __('Počet sloupců', 'brilo-blocks'), value: String(columns), options: COLUMNS.map((c) => ({ value: String(c), label: String(c) })), onChange: (value) => setAttributes({ columns: Number(value) }) }), _jsx(ToggleControl, { label: __('Zobrazit foto autora', 'brilo-blocks'), checked: image === 'avatar', onChange: (checked) => setAttributes({ image: (checked ? 'avatar' : 'none') }) })] }) }), _jsx("div", { ...blockProps, children: _jsx("div", { ...innerBlocksProps }) })] }));
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BlockConfiguration } from '@wordpress/blocks';
|
|
2
|
+
import type { OptionArray } from '../../../types';
|
|
3
|
+
import { VARIANTS } from './constants';
|
|
4
|
+
import type { ReviewGroupAttributes, ReviewGroupOptions } from './types';
|
|
5
|
+
export type { ReviewGroupAttributes, ReviewGroupOptions };
|
|
6
|
+
export declare function createReviewGroupBlock<TVariants extends OptionArray = typeof VARIANTS>(options: ReviewGroupOptions<TVariants>): BlockConfiguration<ReviewGroupAttributes<TVariants[number]['value']>>;
|
|
7
|
+
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/review/review-group/factory.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAEzD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAA;AACxC,OAAO,EAAU,QAAQ,EAAC,MAAM,aAAa,CAAA;AAG7C,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAEtE,YAAY,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,CAAA;AAEvD,wBAAgB,sBAAsB,CAAC,SAAS,SAAS,WAAW,GAAG,OAAO,QAAQ,EACpF,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,GACrC,kBAAkB,CAAC,qBAAqB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CA6BvE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InnerBlocks } from '@wordpress/block-editor';
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
|
+
import { COLUMNS, VARIANTS } from './constants';
|
|
5
|
+
import { createReviewGroupEdit } from './edit';
|
|
6
|
+
import { icon as defaultIcon } from './icon';
|
|
7
|
+
export function createReviewGroupBlock(options) {
|
|
8
|
+
var _a, _b, _c, _d, _e;
|
|
9
|
+
const variants = (_a = options.variants) !== null && _a !== void 0 ? _a : VARIANTS;
|
|
10
|
+
return {
|
|
11
|
+
name: options.name,
|
|
12
|
+
title: (_b = options.title) !== null && _b !== void 0 ? _b : __('Recenze', 'brilo-blocks'),
|
|
13
|
+
description: (_c = options.description) !== null && _c !== void 0 ? _c : __('Grid recenzí / hodnocení zákazníků', 'brilo-blocks'),
|
|
14
|
+
category: (_d = options.category) !== null && _d !== void 0 ? _d : 'layout',
|
|
15
|
+
...(options.parent && { parent: options.parent }),
|
|
16
|
+
icon: (_e = options.icon) !== null && _e !== void 0 ? _e : { src: defaultIcon },
|
|
17
|
+
supports: { html: false, customClassName: false },
|
|
18
|
+
attributes: {
|
|
19
|
+
variant: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
default: variants[0].value,
|
|
22
|
+
enum: variants.map((v) => v.value),
|
|
23
|
+
},
|
|
24
|
+
columns: {
|
|
25
|
+
type: 'number',
|
|
26
|
+
default: COLUMNS[1],
|
|
27
|
+
},
|
|
28
|
+
image: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
default: 'none',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
edit: createReviewGroupEdit(options),
|
|
34
|
+
save: () => _jsx(InnerBlocks.Content, {}),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/blocks/review/review-group/icon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,6BAWhB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const icon = (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Review Group" }), _jsx("path", { d: "M3 4C3 2.89543 3.89543 2 5 2H15C16.1046 2 17 2.89543 17 4V13C17 14.1046 16.1046 15 15 15H11L7 18V15H5C3.89543 15 3 14.1046 3 13V4Z", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M6 6H14", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }), _jsx("path", { d: "M6 9H11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })] }));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReviewGroupOptions } from './types';
|
|
2
|
+
export type { ReviewColumns, ReviewGroupAttributes, ReviewGroupOptions, ReviewImageMode, ReviewVariant, Variant } from './types';
|
|
3
|
+
export { createReviewGroupBlock } from './factory';
|
|
4
|
+
export declare const reviewGroupDefaults: ReviewGroupOptions;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/review/review-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAE/C,YAAY,EAAC,aAAa,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,eAAe,EAAE,aAAa,EAAE,OAAO,EAAC,MAAM,SAAS,CAAA;AAC9H,OAAO,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AAEhD,eAAO,MAAM,mBAAmB,EAAE,kBAIjC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BriloBlockType, OptionArray } from '../../../types';
|
|
2
|
+
import type { COLUMNS, IMAGE_MODES, VARIANTS } from './constants';
|
|
3
|
+
export type Variant = (typeof VARIANTS)[number]['value'];
|
|
4
|
+
export type ReviewVariant = Variant;
|
|
5
|
+
export type ReviewColumns = (typeof COLUMNS)[number];
|
|
6
|
+
export type ReviewImageMode = (typeof IMAGE_MODES)[number]['value'];
|
|
7
|
+
export interface ReviewGroupAttributes<TVariant extends string = Variant> extends Record<string, unknown> {
|
|
8
|
+
variant: TVariant;
|
|
9
|
+
columns: ReviewColumns;
|
|
10
|
+
image: ReviewImageMode;
|
|
11
|
+
}
|
|
12
|
+
export interface ReviewGroupOptions<TVariants extends OptionArray = typeof VARIANTS> extends BriloBlockType {
|
|
13
|
+
variants?: TVariants;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/review/review-group/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAE,WAAW,EAAC,MAAM,SAAS,CAAA;AACxD,OAAO,KAAK,EAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAA;AAE/D,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AACxD,MAAM,MAAM,aAAa,GAAG,OAAO,CAAA;AACnC,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AACpD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AAEnE,MAAM,WAAW,qBAAqB,CAAC,QAAQ,SAAS,MAAM,GAAG,OAAO,CAAE,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvG,OAAO,EAAE,QAAQ,CAAA;IACjB,OAAO,EAAE,aAAa,CAAA;IACtB,KAAK,EAAE,eAAe,CAAA;CACvB;AAED,MAAM,WAAW,kBAAkB,CAAC,SAAS,SAAS,WAAW,GAAG,OAAO,QAAQ,CAAE,SAAQ,cAAc;IACzG,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/review/review-item/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,YAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const RATINGS = [1, 2, 3, 4, 5];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BlockEditProps } from '@wordpress/blocks';
|
|
2
|
+
import type { ReviewItemAttributes, ReviewItemOptions } from './types';
|
|
3
|
+
export declare function createReviewItemEdit(options: ReviewItemOptions): ({ attributes, setAttributes }: BlockEditProps<ReviewItemAttributes>) => import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=edit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/review/review-item/edit.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAUrD,OAAO,KAAK,EAAC,oBAAoB,EAAE,iBAAiB,EAAe,MAAM,SAAS,CAAA;AAWlF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,mCACD,cAAc,CAAC,oBAAoB,CAAC,iCAsGjG"}
|