@brilo/base-blocks 0.1.42 → 0.1.44
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/constants.d.ts +27 -0
- package/build/blocks/compare/compare-group/constants.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/constants.js +23 -0
- package/build/blocks/compare/compare-group/edit.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/edit.js +12 -7
- package/build/blocks/compare/compare-group/factory.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/factory.js +10 -1
- package/build/blocks/compare/compare-group/index.d.ts +1 -1
- package/build/blocks/compare/compare-group/index.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/types.d.ts +7 -1
- package/build/blocks/compare/compare-group/types.d.ts.map +1 -1
- package/build/blocks/compare/compare-item/edit.d.ts.map +1 -1
- package/build/blocks/compare/compare-item/edit.js +6 -4
- package/build/blocks/compare/compare-item/factory.d.ts.map +1 -1
- package/build/blocks/compare/compare-item/factory.js +4 -0
- package/build/blocks/compare/compare-item/types.d.ts +2 -0
- package/build/blocks/compare/compare-item/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-icon/buildPreviewStyle.d.ts +8 -0
- package/build/blocks/core/basic-icon/buildPreviewStyle.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/buildPreviewStyle.js +22 -0
- package/build/blocks/core/basic-icon/constants.d.ts +84 -0
- package/build/blocks/core/basic-icon/constants.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/constants.js +41 -0
- package/build/blocks/core/basic-icon/edit.d.ts +6 -0
- package/build/blocks/core/basic-icon/edit.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/edit.js +22 -0
- package/build/blocks/core/basic-icon/factory.d.ts +5 -0
- package/build/blocks/core/basic-icon/factory.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/factory.js +38 -0
- package/build/blocks/core/basic-icon/index.d.ts +5 -0
- package/build/blocks/core/basic-icon/index.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/index.js +7 -0
- package/build/blocks/core/basic-icon/types.d.ts +30 -0
- package/build/blocks/core/basic-icon/types.d.ts.map +1 -0
- package/build/blocks/core/basic-icon/types.js +1 -0
- 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/faq/faq-group/constants.d.ts +29 -0
- package/build/blocks/faq/faq-group/constants.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/constants.js +15 -0
- package/build/blocks/faq/faq-group/edit.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/edit.js +12 -5
- package/build/blocks/faq/faq-group/factory.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/factory.js +35 -17
- package/build/blocks/faq/faq-group/index.d.ts +1 -1
- package/build/blocks/faq/faq-group/index.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/types.d.ts +20 -1
- package/build/blocks/faq/faq-group/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 +26 -0
- package/build/blocks/review/review-group/constants.d.ts.map +1 -0
- package/build/blocks/review/review-group/constants.js +21 -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 +31 -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 +49 -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 +24 -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 +51 -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 +20 -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 +14 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +7 -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/constants.ts +27 -0
- package/src/blocks/compare/compare-group/edit.tsx +27 -4
- package/src/blocks/compare/compare-group/factory.tsx +10 -1
- package/src/blocks/compare/compare-group/index.ts +7 -1
- package/src/blocks/compare/compare-group/types.ts +5 -1
- package/src/blocks/compare/compare-item/edit.tsx +32 -13
- package/src/blocks/compare/compare-item/editor.scss +16 -0
- package/src/blocks/compare/compare-item/factory.tsx +4 -0
- package/src/blocks/compare/compare-item/types.ts +2 -0
- package/src/blocks/compare/compare-option/types.ts +1 -1
- package/src/blocks/core/basic-icon/buildPreviewStyle.ts +40 -0
- package/src/blocks/core/basic-icon/constants.ts +48 -0
- package/src/blocks/core/basic-icon/edit.tsx +170 -0
- package/src/blocks/core/basic-icon/editor.scss +119 -0
- package/src/blocks/core/basic-icon/factory.tsx +42 -0
- package/src/blocks/core/basic-icon/index.ts +17 -0
- package/src/blocks/core/basic-icon/types.ts +34 -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/faq/faq-group/constants.ts +18 -0
- package/src/blocks/faq/faq-group/edit.tsx +118 -4
- package/src/blocks/faq/faq-group/factory.tsx +33 -13
- package/src/blocks/faq/faq-group/index.ts +9 -1
- package/src/blocks/faq/faq-group/types.ts +22 -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 +25 -0
- package/src/blocks/review/review-group/edit.tsx +116 -0
- package/src/blocks/review/review-group/editor.scss +10 -0
- package/src/blocks/review/review-group/factory.tsx +58 -0
- package/src/blocks/review/review-group/icon.tsx +12 -0
- package/src/blocks/review/review-group/index.ts +19 -0
- package/src/blocks/review/review-group/types.ts +27 -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 +165 -0
- package/src/blocks/video/video-group/editor.scss +105 -0
- package/src/blocks/video/video-group/factory.tsx +55 -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 +22 -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 +7 -0
- package/src/index.ts +19 -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,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 Group" }), _jsx("path", { d: "M4 4H8V5H4V4Z", fill: "currentColor" }), _jsx("path", { d: "M9 4H16V5H9V4Z", fill: "currentColor" }), _jsx("path", { d: "M12 2C12 1.44772 12.4477 1 13 1H14C14.5523 1 15 1.44772 15 2C15 2.55228 14.5523 3 14 3H13C12.4477 3 12 2.55228 12 2Z", fill: "currentColor" }), _jsx("path", { d: "M5 2C5 1.44772 5.44772 1 6 1H10C10.5523 1 11 1.44772 11 2C11 2.55228 10.5523 3 10 3H6C5.44772 3 5 2.55228 5 2Z", fill: "currentColor" }), _jsx("rect", { x: "13.5", y: "8.5", width: "6", height: "10", stroke: "currentColor", fill: "none" }), _jsx("path", { d: "M15 11.5C15 10.6716 15.6716 10 16.5 10C17.3284 10 18 10.6716 18 11.5C18 12.3284 17.3284 13 16.5 13C15.6716 13 15 12.3284 15 11.5Z", fill: "#357AB5" }), _jsx("rect", { x: "0.5", y: "8.5", width: "6", height: "10", stroke: "currentColor", fill: "none" }), _jsx("path", { d: "M2 11.5C2 10.6716 2.67157 10 3.5 10C4.32843 10 5 10.6716 5 11.5C5 12.3284 4.32843 13 3.5 13C2.67157 13 2 12.3284 2 11.5Z", fill: "#357AB5" }), _jsx("path", { d: "M2 14H5V15H2V14Z", fill: "currentColor" }), _jsx("path", { d: "M2 16H5V17H2V16Z", fill: "currentColor" }), _jsx("rect", { x: "6.5", y: "7.5", width: "7", height: "12", stroke: "currentColor", fill: "none" }), _jsx("path", { d: "M8 11C8 9.89543 8.89543 9 10 9C11.1046 9 12 9.89543 12 11C12 12.1046 11.1046 13 10 13C8.89543 13 8 12.1046 8 11Z", fill: "#357AB5" }), _jsx("path", { d: "M8 14H12V15H8V14Z", fill: "currentColor" }), _jsx("path", { d: "M8 16H12V17H8V16Z", fill: "currentColor" }), _jsx("path", { d: "M15 14H18V15H15V14Z", fill: "currentColor" }), _jsx("path", { d: "M15 16H18V17H15V16Z", fill: "currentColor" })] }));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PriceplanGroupOptions } from './types';
|
|
2
|
+
export type { PriceplanGroupAttributes, PriceplanGroupOptions } from './types';
|
|
3
|
+
export { createPriceplanGroupBlock } from './factory';
|
|
4
|
+
export declare const priceplanGroupDefaults: PriceplanGroupOptions;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,SAAS,CAAA;AAElD,YAAY,EAAC,wBAAwB,EAAE,qBAAqB,EAAC,MAAM,SAAS,CAAA;AAC5E,OAAO,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAA;AAEnD,eAAO,MAAM,sBAAsB,EAAE,qBASpC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { createPriceplanGroupBlock } from './factory';
|
|
2
|
+
export const priceplanGroupDefaults = {
|
|
3
|
+
name: 'brilo/priceplan-group',
|
|
4
|
+
parent: ['brilo/base-section'],
|
|
5
|
+
allowedBlocks: ['brilo/priceplan-item'],
|
|
6
|
+
template: [
|
|
7
|
+
['brilo/priceplan-item', {}],
|
|
8
|
+
['brilo/priceplan-item', {}],
|
|
9
|
+
['brilo/priceplan-item', {}],
|
|
10
|
+
],
|
|
11
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BriloBlockType } from '../../../types';
|
|
2
|
+
export interface PriceplanGroupAttributes extends Record<string, unknown> {
|
|
3
|
+
}
|
|
4
|
+
export interface PriceplanGroupOptions extends BriloBlockType {
|
|
5
|
+
allowedBlocks?: string[];
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-group/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAE3C,MAAM,WAAW,wBAAyB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAAG;AAE5E,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const ALIGNMENTS: readonly [{
|
|
2
|
+
readonly value: 'left';
|
|
3
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Vlevo">;
|
|
4
|
+
}, {
|
|
5
|
+
readonly value: 'center';
|
|
6
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Na střed">;
|
|
7
|
+
}];
|
|
8
|
+
export declare const CHIP_VARIANTS: readonly [{
|
|
9
|
+
readonly value: 'primary';
|
|
10
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Primární">;
|
|
11
|
+
}, {
|
|
12
|
+
readonly value: 'secondary';
|
|
13
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Sekundární">;
|
|
14
|
+
}];
|
|
15
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/priceplan/priceplan-item/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;aACpB,KAAK,EAAE,MAAM;aAAE,KAAK;;aACpB,KAAK,EAAE,QAAQ;aAAE,KAAK;EACf,CAAA;AAEV,eAAO,MAAM,aAAa;aACvB,KAAK,EAAE,SAAS;aAAE,KAAK;;aACvB,KAAK,EAAE,WAAW;aAAE,KAAK;EAClB,CAAA"}
|
|
@@ -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,26 @@
|
|
|
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 DEFAULT_SHADOWS: readonly [{
|
|
10
|
+
readonly value: 'none';
|
|
11
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Žádný">;
|
|
12
|
+
}, {
|
|
13
|
+
readonly value: 'sm';
|
|
14
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Malý">;
|
|
15
|
+
}, {
|
|
16
|
+
readonly value: 'md';
|
|
17
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Střední">;
|
|
18
|
+
}];
|
|
19
|
+
export declare const IMAGE_MODES: readonly [{
|
|
20
|
+
readonly value: 'avatar';
|
|
21
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Zobrazit">;
|
|
22
|
+
}, {
|
|
23
|
+
readonly value: 'none';
|
|
24
|
+
readonly label: import("@wordpress/i18n").TransformedText<"Skrýt">;
|
|
25
|
+
}];
|
|
26
|
+
//# 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,eAAe;aACzB,KAAK,EAAE,MAAM;aAAE,KAAK;;aACpB,KAAK,EAAE,IAAI;aAAE,KAAK;;aAClB,KAAK,EAAE,IAAI;aAAE,KAAK;EACX,CAAA;AAEV,eAAO,MAAM,WAAW;aACrB,KAAK,EAAE,QAAQ;aAAE,KAAK;;aACtB,KAAK,EAAE,MAAM;aAAE,KAAK;EACb,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 DEFAULT_SHADOWS = [
|
|
14
|
+
{ value: 'none', label: __('Žádný', 'brilo-blocks') },
|
|
15
|
+
{ value: 'sm', label: __('Malý', 'brilo-blocks') },
|
|
16
|
+
{ value: 'md', label: __('Střední', 'brilo-blocks') },
|
|
17
|
+
];
|
|
18
|
+
export const IMAGE_MODES = [
|
|
19
|
+
{ value: 'avatar', label: __('Zobrazit', 'brilo-blocks') },
|
|
20
|
+
{ value: 'none', label: __('Skrýt', 'brilo-blocks') },
|
|
21
|
+
];
|
|
@@ -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;AAerD,OAAO,KAAK,EAAgB,qBAAqB,EAAE,kBAAkB,EAAyC,MAAM,SAAS,CAAA;AAE7H,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,mCAIF,cAAc,CAAC,qBAAqB,CAAC,iCA6FnG"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { InspectorControls } from '@wordpress/block-editor';
|
|
3
|
+
import { BaseControl, ColorPalette, 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 { useTenantColorPalette } from '../../../hooks/useTenantColorPalette';
|
|
8
|
+
import { COLUMNS, DEFAULT_SHADOWS, VARIANTS } from './constants';
|
|
9
|
+
export function createReviewGroupEdit(options) {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const VARIANTS_OPTIONS = (_a = options.variants) !== null && _a !== void 0 ? _a : VARIANTS;
|
|
12
|
+
const exclude = (_b = options.exclude) !== null && _b !== void 0 ? _b : [];
|
|
13
|
+
return function ReviewGroupEdit({ attributes, setAttributes }) {
|
|
14
|
+
var _a, _b, _c, _d;
|
|
15
|
+
const { columns, image, variant, style } = attributes;
|
|
16
|
+
const { paletteColors } = useTenantColorPalette();
|
|
17
|
+
const { blockProps, innerBlocksProps } = useGroupBlock({
|
|
18
|
+
blockClassName: clsx((_a = options.blockClassName) !== null && _a !== void 0 ? _a : 'g-review wp-block-section', `--variant-${variant}`, image === 'none' && '--image-none'),
|
|
19
|
+
containerClassName: [(_b = options.containerClassName) !== null && _b !== void 0 ? _b : 'u-grid-responsive-blocks-list', `--col-${columns}`],
|
|
20
|
+
containerStyle: { '--grid-max-col-count': columns },
|
|
21
|
+
allowedBlocks: (_c = options.allowedBlocks) !== null && _c !== void 0 ? _c : ['brilo/review-item'],
|
|
22
|
+
template: (_d = options.template) !== null && _d !== void 0 ? _d : [
|
|
23
|
+
['brilo/review-item', {}],
|
|
24
|
+
['brilo/review-item', {}],
|
|
25
|
+
['brilo/review-item', {}],
|
|
26
|
+
],
|
|
27
|
+
layout: { type: 'default' },
|
|
28
|
+
});
|
|
29
|
+
return (_jsxs(_Fragment, { children: [_jsxs(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') }) })] }), !exclude.includes('colors') && style && (_jsxs(PanelBody, { title: __('Styl', 'brilo-blocks'), children: [_jsx(ToggleGroupControl, { isBlock: true, label: __('Stín', 'brilo-blocks'), value: style.shadow, onChange: (v) => setAttributes({ style: { ...style, shadow: v } }), children: DEFAULT_SHADOWS.map((s) => (_jsx(ToggleGroupControlOption, { value: s.value, label: s.label }, s.value))) }), _jsx(BaseControl, { label: __('Barva okraje', 'brilo-blocks'), help: __('Bez vybrané barvy se okraj nevykreslí.', 'brilo-blocks'), id: "review-group-border-color", children: _jsx(ColorPalette, { colors: paletteColors, value: style.borderColor || undefined, onChange: (value) => setAttributes({ style: { ...style, borderColor: value !== null && value !== void 0 ? value : '' } }) }) }), _jsx(BaseControl, { label: __('Barva pozadí', 'brilo-blocks'), id: "review-group-background-color", children: _jsx(ColorPalette, { colors: paletteColors, value: style.backgroundColor || undefined, onChange: (value) => setAttributes({ style: { ...style, backgroundColor: value !== null && value !== void 0 ? value : '' } }) }) }), _jsx(BaseControl, { label: __('Barva textu', 'brilo-blocks'), id: "review-group-text-color", children: _jsx(ColorPalette, { colors: paletteColors, value: style.textColor || undefined, onChange: (value) => setAttributes({ style: { ...style, textColor: value !== null && value !== void 0 ? value : '' } }) }) })] }))] }), _jsx("div", { ...blockProps, children: _jsx("div", { ...innerBlocksProps }) })] }));
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -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,EAA2B,QAAQ,EAAC,MAAM,aAAa,CAAA;AAG9D,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,CA4CvE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InnerBlocks } from '@wordpress/block-editor';
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
|
+
import { COLUMNS, DEFAULT_SHADOWS, 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, _f;
|
|
9
|
+
const variants = (_a = options.variants) !== null && _a !== void 0 ? _a : VARIANTS;
|
|
10
|
+
const exclude = (_b = options.exclude) !== null && _b !== void 0 ? _b : [];
|
|
11
|
+
const attributes = {
|
|
12
|
+
variant: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: variants[0].value,
|
|
15
|
+
enum: variants.map((v) => v.value),
|
|
16
|
+
},
|
|
17
|
+
columns: {
|
|
18
|
+
type: 'number',
|
|
19
|
+
default: COLUMNS[1],
|
|
20
|
+
},
|
|
21
|
+
image: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: 'none',
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
if (!exclude.includes('colors')) {
|
|
27
|
+
attributes.style = {
|
|
28
|
+
type: 'object',
|
|
29
|
+
default: {
|
|
30
|
+
shadow: DEFAULT_SHADOWS[0].value,
|
|
31
|
+
borderColor: '',
|
|
32
|
+
backgroundColor: '',
|
|
33
|
+
textColor: '',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
name: options.name,
|
|
39
|
+
title: (_c = options.title) !== null && _c !== void 0 ? _c : __('Recenze', 'brilo-blocks'),
|
|
40
|
+
description: (_d = options.description) !== null && _d !== void 0 ? _d : __('Grid recenzí / hodnocení zákazníků', 'brilo-blocks'),
|
|
41
|
+
category: (_e = options.category) !== null && _e !== void 0 ? _e : 'layout',
|
|
42
|
+
...(options.parent && { parent: options.parent }),
|
|
43
|
+
icon: (_f = options.icon) !== null && _f !== void 0 ? _f : { src: defaultIcon },
|
|
44
|
+
supports: { html: false, customClassName: false },
|
|
45
|
+
attributes,
|
|
46
|
+
edit: createReviewGroupEdit(options),
|
|
47
|
+
save: () => _jsx(InnerBlocks.Content, {}),
|
|
48
|
+
};
|
|
49
|
+
}
|