tango-app-ui-store-builder 1.0.1-beta-1 → 1.0.1-beta-2
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/.eslintrc.json +37 -0
- package/ng-package.json +7 -0
- package/package.json +12 -25
- package/src/lib/components/counter-input/counter-input.component.html +42 -0
- package/src/lib/components/counter-input/counter-input.component.scss +49 -0
- package/src/lib/components/counter-input/counter-input.component.spec.ts +23 -0
- package/src/lib/components/counter-input/counter-input.component.ts +68 -0
- package/src/lib/components/create-fixture/create-fixture.component.html +704 -0
- package/src/lib/components/create-fixture/create-fixture.component.scss +112 -0
- package/src/lib/components/create-fixture/create-fixture.component.spec.ts +23 -0
- package/src/lib/components/create-fixture/create-fixture.component.ts +435 -0
- package/src/lib/components/create-layout/create-layout.component.html +861 -0
- package/src/lib/components/create-layout/create-layout.component.scss +511 -0
- package/src/lib/components/create-layout/create-layout.component.spec.ts +23 -0
- package/src/lib/components/create-layout/create-layout.component.ts +2217 -0
- package/src/lib/components/create-layout/popups/add-floor/add-floor.component.html +29 -0
- package/src/lib/components/create-layout/popups/add-floor/add-floor.component.scss +67 -0
- package/src/lib/components/create-layout/popups/add-floor/add-floor.component.ts +48 -0
- package/src/lib/components/create-layout/popups/clear-all-steps/clear-all-steps.component.html +10 -0
- package/src/lib/components/create-layout/popups/clear-all-steps/clear-all-steps.component.scss +21 -0
- package/src/lib/components/create-layout/popups/clear-all-steps/clear-all-steps.component.ts +13 -0
- package/src/lib/components/create-layout/popups/delete-layout/delete-layout.component.html +13 -0
- package/src/lib/components/create-layout/popups/delete-layout/delete-layout.component.scss +21 -0
- package/src/lib/components/create-layout/popups/delete-layout/delete-layout.component.ts +14 -0
- package/src/lib/components/create-product/create-product.component.html +1 -0
- package/src/lib/components/create-product/create-product.component.scss +0 -0
- package/src/lib/components/create-product/create-product.component.spec.ts +23 -0
- package/src/lib/components/create-product/create-product.component.ts +10 -0
- package/src/lib/components/create-store/create-store.component.html +861 -0
- package/src/lib/components/create-store/create-store.component.scss +511 -0
- package/src/lib/components/create-store/create-store.component.spec.ts +23 -0
- package/src/lib/components/create-store/create-store.component.ts +2656 -0
- package/src/lib/components/create-vm/create-vm.component.html +361 -0
- package/src/lib/components/create-vm/create-vm.component.scss +101 -0
- package/src/lib/components/create-vm/create-vm.component.spec.ts +23 -0
- package/src/lib/components/create-vm/create-vm.component.ts +356 -0
- package/src/lib/components/create-vm/popups/add-vm-type/add-vm-type.component.html +68 -0
- package/src/lib/components/create-vm/popups/add-vm-type/add-vm-type.component.scss +25 -0
- package/src/lib/components/create-vm/popups/add-vm-type/add-vm-type.component.spec.ts +23 -0
- package/src/lib/components/create-vm/popups/add-vm-type/add-vm-type.component.ts +92 -0
- package/src/lib/components/custom-select/custom-select.component.html +42 -0
- package/src/lib/components/custom-select/custom-select.component.scss +132 -0
- package/src/lib/components/custom-select/custom-select.component.spec.ts +23 -0
- package/src/lib/components/custom-select/custom-select.component.ts +149 -0
- package/src/lib/components/fixture-template/fixture-template.component.html +176 -0
- package/src/lib/components/fixture-template/fixture-template.component.scss +8 -0
- package/src/lib/components/fixture-template/fixture-template.component.spec.ts +23 -0
- package/src/lib/components/fixture-template/fixture-template.component.ts +113 -0
- package/src/lib/components/fixture-template/template-basic-details/template-basic-details.component.html +166 -0
- package/src/lib/components/fixture-template/template-basic-details/template-basic-details.component.scss +21 -0
- package/src/lib/components/fixture-template/template-basic-details/template-basic-details.component.spec.ts +23 -0
- package/src/lib/components/fixture-template/template-basic-details/template-basic-details.component.ts +148 -0
- package/src/lib/components/fixture-template/template-products/template-products.component.html +626 -0
- package/src/lib/components/fixture-template/template-products/template-products.component.scss +241 -0
- package/src/lib/components/fixture-template/template-products/template-products.component.spec.ts +23 -0
- package/src/lib/components/fixture-template/template-products/template-products.component.ts +646 -0
- package/src/lib/components/fixture-template/template-summary/template-summary.component.html +312 -0
- package/src/lib/components/fixture-template/template-summary/template-summary.component.scss +233 -0
- package/src/lib/components/fixture-template/template-summary/template-summary.component.spec.ts +23 -0
- package/src/lib/components/fixture-template/template-summary/template-summary.component.ts +464 -0
- package/src/lib/components/fixture-template/template-vms/template-vms.component.html +230 -0
- package/src/lib/components/fixture-template/template-vms/template-vms.component.scss +108 -0
- package/src/lib/components/fixture-template/template-vms/template-vms.component.spec.ts +23 -0
- package/src/lib/components/fixture-template/template-vms/template-vms.component.ts +322 -0
- package/src/lib/components/fixture-template-table/fixture-template-table.component.html +469 -0
- package/src/lib/components/fixture-template-table/fixture-template-table.component.scss +6 -0
- package/src/lib/components/fixture-template-table/fixture-template-table.component.spec.ts +23 -0
- package/src/lib/components/fixture-template-table/fixture-template-table.component.ts +341 -0
- package/src/lib/components/fixture-template-table/popups/bulk-upload-fixture-template/bulk-upload-fixture-template.component.html +55 -0
- package/src/lib/components/fixture-template-table/popups/bulk-upload-fixture-template/bulk-upload-fixture-template.component.scss +60 -0
- package/src/lib/components/fixture-template-table/popups/bulk-upload-fixture-template/bulk-upload-fixture-template.component.spec.ts +23 -0
- package/src/lib/components/fixture-template-table/popups/bulk-upload-fixture-template/bulk-upload-fixture-template.component.ts +48 -0
- package/src/lib/components/fixture-template-table/popups/create-fixture-template/create-fixture-template.component.html +18 -0
- package/src/lib/components/fixture-template-table/popups/create-fixture-template/create-fixture-template.component.scss +45 -0
- package/src/lib/components/fixture-template-table/popups/create-fixture-template/create-fixture-template.component.spec.ts +23 -0
- package/src/lib/components/fixture-template-table/popups/create-fixture-template/create-fixture-template.component.ts +92 -0
- package/src/lib/components/layout-builder/layout-builder.component.html +24 -0
- package/src/lib/components/layout-builder/layout-builder.component.scss +78 -0
- package/src/lib/components/layout-builder/layout-builder.component.spec.ts +23 -0
- package/src/lib/components/layout-builder/layout-builder.component.ts +59 -0
- package/src/lib/components/layout-elements/element-form/element-form.component.html +268 -0
- package/src/lib/components/layout-elements/element-form/element-form.component.scss +4 -0
- package/src/lib/components/layout-elements/element-form/element-form.component.spec.ts +23 -0
- package/src/lib/components/layout-elements/element-form/element-form.component.ts +235 -0
- package/src/lib/components/layout-elements/element-form/element.data.ts +209 -0
- package/src/lib/components/layout-elements/layout-elements.component.html +82 -0
- package/src/lib/components/layout-elements/layout-elements.component.scss +36 -0
- package/src/lib/components/layout-elements/layout-elements.component.spec.ts +23 -0
- package/src/lib/components/layout-elements/layout-elements.component.ts +130 -0
- package/src/lib/components/layout-summary/layout-summary.component.html +269 -0
- package/src/lib/components/layout-summary/layout-summary.component.scss +223 -0
- package/src/lib/components/layout-summary/layout-summary.component.spec.ts +23 -0
- package/src/lib/components/layout-summary/layout-summary.component.ts +965 -0
- package/src/lib/components/layout-summary/popups/complete-layout/complete-layout.component.html +10 -0
- package/src/lib/components/layout-summary/popups/complete-layout/complete-layout.component.scss +21 -0
- package/src/lib/components/layout-summary/popups/complete-layout/complete-layout.component.ts +13 -0
- package/src/lib/components/manage-plano-table/manage-plano-table.component.html +789 -0
- package/src/lib/components/manage-plano-table/manage-plano-table.component.scss +147 -0
- package/src/lib/components/manage-plano-table/manage-plano-table.component.spec.ts +23 -0
- package/src/lib/components/manage-plano-table/manage-plano-table.component.ts +294 -0
- package/src/lib/components/manage-plano-table/popups/bulk-upload-planogram/bulk-upload-planogram.component.html +55 -0
- package/src/lib/components/manage-plano-table/popups/bulk-upload-planogram/bulk-upload-planogram.component.scss +60 -0
- package/src/lib/components/manage-plano-table/popups/bulk-upload-planogram/bulk-upload-planogram.component.spec.ts +23 -0
- package/src/lib/components/manage-plano-table/popups/bulk-upload-planogram/bulk-upload-planogram.component.ts +48 -0
- package/src/lib/components/manage-plano-table/popups/create-planogram/create-planogram.component.html +27 -0
- package/src/lib/components/manage-plano-table/popups/create-planogram/create-planogram.component.scss +21 -0
- package/src/lib/components/manage-plano-table/popups/create-planogram/create-planogram.component.spec.ts +23 -0
- package/src/lib/components/manage-plano-table/popups/create-planogram/create-planogram.component.ts +47 -0
- package/src/lib/components/manage-store-plano/confirmation-popup/confirmation-popup.component.html +36 -0
- package/src/lib/components/manage-store-plano/confirmation-popup/confirmation-popup.component.scss +0 -0
- package/src/lib/components/manage-store-plano/confirmation-popup/confirmation-popup.component.spec.ts +23 -0
- package/src/lib/components/manage-store-plano/confirmation-popup/confirmation-popup.component.ts +38 -0
- package/src/lib/components/manage-store-plano/manage-store-plano-feedback/manage-store-plano-feedback.component.html +1399 -0
- package/src/lib/components/manage-store-plano/manage-store-plano-feedback/manage-store-plano-feedback.component.scss +255 -0
- package/src/lib/components/manage-store-plano/manage-store-plano-feedback/manage-store-plano-feedback.component.spec.ts +23 -0
- package/src/lib/components/manage-store-plano/manage-store-plano-feedback/manage-store-plano-feedback.component.ts +553 -0
- package/src/lib/components/manage-store-plano/manage-store-plano.component.html +526 -0
- package/src/lib/components/manage-store-plano/manage-store-plano.component.scss +102 -0
- package/src/lib/components/manage-store-plano/manage-store-plano.component.spec.ts +23 -0
- package/src/lib/components/manage-store-plano/manage-store-plano.component.ts +3057 -0
- package/src/lib/components/manage-store-plano/template-basic-details/template-basic-details.component.html +166 -0
- package/src/lib/components/manage-store-plano/template-basic-details/template-basic-details.component.scss +21 -0
- package/src/lib/components/manage-store-plano/template-basic-details/template-basic-details.component.spec.ts +23 -0
- package/src/lib/components/manage-store-plano/template-basic-details/template-basic-details.component.ts +128 -0
- package/src/lib/components/manage-store-plano/template-products/template-products.component.html +626 -0
- package/src/lib/components/manage-store-plano/template-products/template-products.component.scss +241 -0
- package/src/lib/components/manage-store-plano/template-products/template-products.component.spec.ts +23 -0
- package/src/lib/components/manage-store-plano/template-products/template-products.component.ts +656 -0
- package/src/lib/components/manage-store-plano/template-vms/template-vms.component.html +230 -0
- package/src/lib/components/manage-store-plano/template-vms/template-vms.component.scss +108 -0
- package/src/lib/components/manage-store-plano/template-vms/template-vms.component.spec.ts +23 -0
- package/src/lib/components/manage-store-plano/template-vms/template-vms.component.ts +319 -0
- package/src/lib/components/multiselect-chip-dropdown/multiselect-chip-dropdown.component.html +68 -0
- package/src/lib/components/multiselect-chip-dropdown/multiselect-chip-dropdown.component.scss +178 -0
- package/src/lib/components/multiselect-chip-dropdown/multiselect-chip-dropdown.component.spec.ts +23 -0
- package/src/lib/components/multiselect-chip-dropdown/multiselect-chip-dropdown.component.ts +160 -0
- package/src/lib/components/plano-configurations/custom-filter/custom-filter.component.html +76 -0
- package/src/lib/components/plano-configurations/custom-filter/custom-filter.component.scss +0 -0
- package/src/lib/components/plano-configurations/custom-filter/custom-filter.component.spec.ts +23 -0
- package/src/lib/components/plano-configurations/custom-filter/custom-filter.component.ts +180 -0
- package/src/lib/components/plano-configurations/plano-configurations.component.html +257 -0
- package/src/lib/components/plano-configurations/plano-configurations.component.scss +119 -0
- package/src/lib/components/plano-configurations/plano-configurations.component.spec.ts +23 -0
- package/src/lib/components/plano-configurations/plano-configurations.component.ts +286 -0
- package/src/lib/components/plano-configurations/popups/popups.component.html +124 -0
- package/src/lib/components/plano-configurations/popups/popups.component.scss +92 -0
- package/src/lib/components/plano-configurations/popups/popups.component.spec.ts +23 -0
- package/src/lib/components/plano-configurations/popups/popups.component.ts +121 -0
- package/src/lib/components/plano-library/fixture-library/fixture-library.component.html +589 -0
- package/src/lib/components/plano-library/fixture-library/fixture-library.component.scss +1 -0
- package/src/lib/components/plano-library/fixture-library/fixture-library.component.spec.ts +23 -0
- package/src/lib/components/plano-library/fixture-library/fixture-library.component.ts +326 -0
- package/src/lib/components/plano-library/fixture-library/popups/create-fixture-modal/create-fixture-modal.component.html +99 -0
- package/src/lib/components/plano-library/fixture-library/popups/create-fixture-modal/create-fixture-modal.component.scss +45 -0
- package/src/lib/components/plano-library/fixture-library/popups/create-fixture-modal/create-fixture-modal.component.spec.ts +23 -0
- package/src/lib/components/plano-library/fixture-library/popups/create-fixture-modal/create-fixture-modal.component.ts +50 -0
- package/src/lib/components/plano-library/fixture-library/popups/fixture-bulk-upload/fixture-bulk-upload.component.html +183 -0
- package/src/lib/components/plano-library/fixture-library/popups/fixture-bulk-upload/fixture-bulk-upload.component.scss +95 -0
- package/src/lib/components/plano-library/fixture-library/popups/fixture-bulk-upload/fixture-bulk-upload.component.spec.ts +23 -0
- package/src/lib/components/plano-library/fixture-library/popups/fixture-bulk-upload/fixture-bulk-upload.component.ts +516 -0
- package/src/lib/components/plano-library/plano-library.component.html +17 -0
- package/src/lib/components/plano-library/plano-library.component.scss +1 -0
- package/src/lib/components/plano-library/plano-library.component.spec.ts +23 -0
- package/src/lib/components/plano-library/plano-library.component.ts +9 -0
- package/src/lib/components/plano-library/product-library/product-library.component.html +3 -0
- package/src/lib/components/plano-library/product-library/product-library.component.scss +1 -0
- package/src/lib/components/plano-library/product-library/product-library.component.spec.ts +23 -0
- package/src/lib/components/plano-library/product-library/product-library.component.ts +10 -0
- package/src/lib/components/plano-library/vm-library/popups/vm-bulk-upload/vm-bulk-upload.component.html +183 -0
- package/src/lib/components/plano-library/vm-library/popups/vm-bulk-upload/vm-bulk-upload.component.scss +95 -0
- package/src/lib/components/plano-library/vm-library/popups/vm-bulk-upload/vm-bulk-upload.component.spec.ts +23 -0
- package/src/lib/components/plano-library/vm-library/popups/vm-bulk-upload/vm-bulk-upload.component.ts +450 -0
- package/src/lib/components/plano-library/vm-library/vm-library.component.html +611 -0
- package/src/lib/components/plano-library/vm-library/vm-library.component.scss +12 -0
- package/src/lib/components/plano-library/vm-library/vm-library.component.spec.ts +23 -0
- package/src/lib/components/plano-library/vm-library/vm-library.component.ts +323 -0
- package/src/lib/components/popups/complete-confirmation/complete-confirmation.component.html +11 -0
- package/src/lib/components/popups/complete-confirmation/complete-confirmation.component.scss +13 -0
- package/src/lib/components/popups/complete-confirmation/complete-confirmation.component.spec.ts +23 -0
- package/src/lib/components/popups/complete-confirmation/complete-confirmation.component.ts +25 -0
- package/src/lib/components/popups/delete-confirmation/delete-confirmation.component.html +24 -0
- package/src/lib/components/popups/delete-confirmation/delete-confirmation.component.scss +13 -0
- package/src/lib/components/popups/delete-confirmation/delete-confirmation.component.spec.ts +23 -0
- package/src/lib/components/popups/delete-confirmation/delete-confirmation.component.ts +25 -0
- package/src/lib/components/popups/exit-confirmation/exit-confirmation.component.html +1 -0
- package/src/lib/components/popups/exit-confirmation/exit-confirmation.component.scss +13 -0
- package/src/lib/components/popups/exit-confirmation/exit-confirmation.component.spec.ts +23 -0
- package/src/lib/components/popups/exit-confirmation/exit-confirmation.component.ts +10 -0
- package/src/lib/components/reactive-select/reactive-select.component.html +45 -0
- package/src/lib/components/reactive-select/reactive-select.component.scss +52 -0
- package/src/lib/components/reactive-select/reactive-select.component.spec.ts +23 -0
- package/src/lib/components/reactive-select/reactive-select.component.ts +120 -0
- package/src/lib/components/store-builder/store-builder.component.html +24 -0
- package/src/lib/components/store-builder/store-builder.component.scss +78 -0
- package/src/lib/components/store-builder/store-builder.component.spec.ts +23 -0
- package/src/lib/components/store-builder/store-builder.component.ts +56 -0
- package/src/lib/components/store-layout-table/store-layout-table.component.html +376 -0
- package/src/lib/components/store-layout-table/store-layout-table.component.scss +312 -0
- package/src/lib/components/store-layout-table/store-layout-table.component.spec.ts +23 -0
- package/src/lib/components/store-layout-table/store-layout-table.component.ts +777 -0
- package/src/lib/components/store-offcanvas-component/store-offcanvas-component.component.html +124 -0
- package/src/lib/components/store-offcanvas-component/store-offcanvas-component.component.scss +90 -0
- package/src/lib/components/store-offcanvas-component/store-offcanvas-component.component.spec.ts +23 -0
- package/src/lib/components/store-offcanvas-component/store-offcanvas-component.component.ts +90 -0
- package/src/lib/components/store-plano/store-plano.component.html +161 -0
- package/src/lib/components/store-plano/store-plano.component.scss +77 -0
- package/src/lib/components/store-plano/store-plano.component.spec.ts +23 -0
- package/src/lib/components/store-plano/store-plano.component.ts +1184 -0
- package/src/lib/components/visualize-vm-data/visualize-vm-data.component.html +20 -0
- package/src/lib/components/visualize-vm-data/visualize-vm-data.component.scss +50 -0
- package/src/lib/components/visualize-vm-data/visualize-vm-data.component.spec.ts +23 -0
- package/src/lib/components/visualize-vm-data/visualize-vm-data.component.ts +30 -0
- package/src/lib/data/fixture-template.data.ts +32 -0
- package/src/lib/functions/plano.function.ts +35 -0
- package/src/lib/interfaces/fixture-library.interface.ts +64 -0
- package/src/lib/interfaces/fixture-template.interface.ts +80 -0
- package/{lib/interfaces/layout-builder.interface.d.ts → src/lib/interfaces/layout-builder.interface.ts} +25 -23
- package/src/lib/interfaces/plano-general.interface.ts +16 -0
- package/src/lib/interfaces/planogram.interface.ts +13 -0
- package/src/lib/interfaces/vm-library.interface.ts +66 -0
- package/src/lib/pipes/time-ago.pipe.ts +59 -0
- package/src/lib/services/plano-data.service.ts +95 -0
- package/src/lib/services/store-builder.service.ts +299 -0
- package/src/lib/styles/fixture-template.scss +442 -0
- package/src/lib/styles/library.scss +219 -0
- package/src/lib/tango-store-builder-routing.module.ts +151 -0
- package/src/lib/tango-store-builder.module.ts +135 -0
- package/src/lib/tango-store-plano.module.ts +28 -0
- package/src/public-api.ts +6 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/lib/components/create-layout/create-layout.component.mjs +0 -1815
- package/esm2022/lib/components/create-layout/popups/add-floor/add-floor.component.mjs +0 -40
- package/esm2022/lib/components/create-layout/popups/clear-all-steps/clear-all-steps.component.mjs +0 -16
- package/esm2022/lib/components/create-layout/popups/delete-layout/delete-layout.component.mjs +0 -16
- package/esm2022/lib/components/custom-select/custom-select.component.mjs +0 -155
- package/esm2022/lib/components/layout-builder/layout-builder.component.mjs +0 -56
- package/esm2022/lib/components/layout-summary/layout-summary.component.mjs +0 -809
- package/esm2022/lib/components/layout-summary/popups/complete-layout/complete-layout.component.mjs +0 -16
- package/esm2022/lib/components/reactive-select/reactive-select.component.mjs +0 -87
- package/esm2022/lib/components/store-layout-table/store-layout-table.component.mjs +0 -709
- package/esm2022/lib/components/store-offcanvas-component/store-offcanvas-component.component.mjs +0 -99
- package/esm2022/lib/interfaces/layout-builder.interface.mjs +0 -2
- package/esm2022/lib/services/store-builder.service.mjs +0 -99
- package/esm2022/lib/tango-store-builder-routing.module.mjs +0 -41
- package/esm2022/lib/tango-store-builder.module.mjs +0 -71
- package/esm2022/public-api.mjs +0 -5
- package/esm2022/tango-app-ui-store-builder.mjs +0 -5
- package/esm2022/tango-store-builder.mjs +0 -5
- package/fesm2022/tango-app-ui-store-builder.mjs +0 -3947
- package/fesm2022/tango-app-ui-store-builder.mjs.map +0 -1
- package/fesm2022/tango-store-builder.mjs +0 -3947
- package/fesm2022/tango-store-builder.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/create-layout/create-layout.component.d.ts +0 -197
- package/lib/components/create-layout/popups/add-floor/add-floor.component.d.ts +0 -16
- package/lib/components/create-layout/popups/clear-all-steps/clear-all-steps.component.d.ts +0 -8
- package/lib/components/create-layout/popups/delete-layout/delete-layout.component.d.ts +0 -8
- package/lib/components/custom-select/custom-select.component.d.ts +0 -33
- package/lib/components/layout-builder/layout-builder.component.d.ts +0 -18
- package/lib/components/layout-summary/layout-summary.component.d.ts +0 -92
- package/lib/components/layout-summary/popups/complete-layout/complete-layout.component.d.ts +0 -8
- package/lib/components/reactive-select/reactive-select.component.d.ts +0 -26
- package/lib/components/store-layout-table/store-layout-table.component.d.ts +0 -73
- package/lib/components/store-offcanvas-component/store-offcanvas-component.component.d.ts +0 -26
- package/lib/services/store-builder.service.d.ts +0 -33
- package/lib/tango-store-builder-routing.module.d.ts +0 -7
- package/lib/tango-store-builder.module.d.ts +0 -22
- package/public-api.d.ts +0 -1
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../.eslintrc.json",
|
|
3
|
+
"ignorePatterns": [
|
|
4
|
+
"!**/*"
|
|
5
|
+
],
|
|
6
|
+
"overrides": [
|
|
7
|
+
{
|
|
8
|
+
"files": [
|
|
9
|
+
"*.ts"
|
|
10
|
+
],
|
|
11
|
+
"rules": {
|
|
12
|
+
"@angular-eslint/directive-selector": [
|
|
13
|
+
"error",
|
|
14
|
+
{
|
|
15
|
+
"type": "attribute",
|
|
16
|
+
"prefix": "lib",
|
|
17
|
+
"style": "camelCase"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"@angular-eslint/component-selector": [
|
|
21
|
+
"error",
|
|
22
|
+
{
|
|
23
|
+
"type": "element",
|
|
24
|
+
"prefix": "lib",
|
|
25
|
+
"style": "kebab-case"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"files": [
|
|
32
|
+
"*.html"
|
|
33
|
+
],
|
|
34
|
+
"rules": {}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tango-app-ui-store-builder",
|
|
3
|
-
"version": "1.0.1-beta-
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^17.3.0",
|
|
6
|
-
"@angular/core": "^17.3.0"
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"tslib": "^2.3.0"
|
|
10
|
-
},
|
|
11
|
-
"sideEffects": false
|
|
12
|
-
|
|
13
|
-
"typings": "index.d.ts",
|
|
14
|
-
"exports": {
|
|
15
|
-
"./package.json": {
|
|
16
|
-
"default": "./package.json"
|
|
17
|
-
},
|
|
18
|
-
".": {
|
|
19
|
-
"types": "./index.d.ts",
|
|
20
|
-
"esm2022": "./esm2022/tango-app-ui-store-builder.mjs",
|
|
21
|
-
"esm": "./esm2022/tango-app-ui-store-builder.mjs",
|
|
22
|
-
"default": "./fesm2022/tango-app-ui-store-builder.mjs"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "tango-app-ui-store-builder",
|
|
3
|
+
"version": "1.0.1-beta-2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^17.3.0",
|
|
6
|
+
"@angular/core": "^17.3.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false
|
|
12
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<div class="counter-container" [class.disable-counter]="disabled">
|
|
2
|
+
<svg
|
|
3
|
+
role="button"
|
|
4
|
+
width="15"
|
|
5
|
+
height="14"
|
|
6
|
+
viewBox="0 0 15 14"
|
|
7
|
+
fill="none"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
(click)="decrement()"
|
|
10
|
+
>
|
|
11
|
+
<path d="M3.76294 7H11.9296" stroke="#667085" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
12
|
+
</svg>
|
|
13
|
+
|
|
14
|
+
<input
|
|
15
|
+
type="number"
|
|
16
|
+
class="center"
|
|
17
|
+
[value]="value"
|
|
18
|
+
[min]="step"
|
|
19
|
+
[placeholder]="placeholder"
|
|
20
|
+
[disabled]="disabled"
|
|
21
|
+
(input)="onInput($event)"
|
|
22
|
+
(blur)="onTouched()"
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<svg
|
|
26
|
+
role="button"
|
|
27
|
+
width="15"
|
|
28
|
+
height="14"
|
|
29
|
+
viewBox="0 0 15 14"
|
|
30
|
+
fill="none"
|
|
31
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
+
(click)="increment()"
|
|
33
|
+
>
|
|
34
|
+
<path
|
|
35
|
+
d="M7.15389 2.9165V11.0832M3.07056 6.99984H11.2372"
|
|
36
|
+
stroke="#667085"
|
|
37
|
+
stroke-width="2"
|
|
38
|
+
stroke-linecap="round"
|
|
39
|
+
stroke-linejoin="round"
|
|
40
|
+
/>
|
|
41
|
+
</svg>
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
$text-color: #667085;
|
|
2
|
+
|
|
3
|
+
@mixin flex-center {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.counter-container {
|
|
10
|
+
@include flex-center;
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
background-color: white;
|
|
13
|
+
border: 0.49px solid #d0d5dd;
|
|
14
|
+
padding: 10px;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
|
|
17
|
+
input {
|
|
18
|
+
border: none;
|
|
19
|
+
text-align: center;
|
|
20
|
+
vertical-align: middle;
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
min-width: 20px;
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
input::-webkit-outer-spin-button,
|
|
27
|
+
input::-webkit-inner-spin-button {
|
|
28
|
+
-webkit-appearance: none;
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
input[type="number"] {
|
|
33
|
+
-moz-appearance: textfield;
|
|
34
|
+
appearance: textfield;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
input:focus {
|
|
38
|
+
outline: 0;
|
|
39
|
+
box-shadow: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.disable-counter {
|
|
44
|
+
color: var(--bs-gray-500) !important;
|
|
45
|
+
background-color: var(--bs-gray-200) !important;
|
|
46
|
+
border-color: var(--bs-gray-300) !important;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
opacity: 1;
|
|
49
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CounterInputComponent } from './counter-input.component';
|
|
4
|
+
|
|
5
|
+
describe('CounterInputComponent', () => {
|
|
6
|
+
let component: CounterInputComponent;
|
|
7
|
+
let fixture: ComponentFixture<CounterInputComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [CounterInputComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CounterInputComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Component, EventEmitter, forwardRef, Input, Output } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'counter-input',
|
|
6
|
+
templateUrl: './counter-input.component.html',
|
|
7
|
+
styleUrl: './counter-input.component.scss',
|
|
8
|
+
providers: [
|
|
9
|
+
{
|
|
10
|
+
provide: NG_VALUE_ACCESSOR,
|
|
11
|
+
useExisting: forwardRef(() => CounterInputComponent),
|
|
12
|
+
multi: true
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
})
|
|
16
|
+
export class CounterInputComponent implements ControlValueAccessor {
|
|
17
|
+
@Input() step: number = 1;
|
|
18
|
+
@Input() placeholder: string = '0';
|
|
19
|
+
|
|
20
|
+
@Output() onIncrement = new EventEmitter<any>();
|
|
21
|
+
@Output() onDecrement = new EventEmitter<any>();
|
|
22
|
+
|
|
23
|
+
value: number = 0;
|
|
24
|
+
disabled = false;
|
|
25
|
+
|
|
26
|
+
onChange = (value: number) => { };
|
|
27
|
+
onTouched = () => { };
|
|
28
|
+
|
|
29
|
+
increment() {
|
|
30
|
+
if (!this.disabled) {
|
|
31
|
+
this.value += this.step;
|
|
32
|
+
this.onChange(this.value);
|
|
33
|
+
this.onIncrement.emit(this.value);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
decrement() {
|
|
38
|
+
if (!this.disabled) {
|
|
39
|
+
if (this.value <= this.step) return;
|
|
40
|
+
this.value -= this.step;
|
|
41
|
+
this.onChange(this.value);
|
|
42
|
+
this.onDecrement.emit(this.value);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
onInput(event: Event) {
|
|
47
|
+
const val = (event.target as HTMLInputElement).valueAsNumber;
|
|
48
|
+
this.value = isNaN(val) ? 0 : val;
|
|
49
|
+
this.onChange(this.value);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ControlValueAccessor interface methods
|
|
53
|
+
writeValue(value: number): void {
|
|
54
|
+
this.value = value || 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
registerOnChange(fn: any): void {
|
|
58
|
+
this.onChange = fn;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
registerOnTouched(fn: any): void {
|
|
62
|
+
this.onTouched = fn;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
setDisabledState?(isDisabled: boolean): void {
|
|
66
|
+
this.disabled = isDisabled;
|
|
67
|
+
}
|
|
68
|
+
}
|