monkey-front-components 0.0.383 → 0.0.384
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/karma.conf.js +44 -0
- package/monkey-front-components-0.0.384.tgz +0 -0
- package/ng-package.json +10 -0
- package/package.json +7 -27
- package/src/lib/components/base/base-component.ts +359 -0
- package/src/lib/components/base/base-dynamic-array.ts +233 -0
- package/src/lib/components/base/base-dynamic.ts +90 -0
- package/src/lib/components/base/base-scroll-component.ts +52 -0
- package/src/lib/components/base/base-validators.ts +19 -0
- package/{lib/components/base/index.d.ts → src/lib/components/base/index.ts} +5 -5
- package/src/lib/components/dynamic/button/button.component.html +4 -0
- package/src/lib/components/dynamic/button/button.component.scss +7 -0
- package/src/lib/components/dynamic/button/button.component.ts +47 -0
- package/{lib/components/dynamic/button/index.d.ts → src/lib/components/dynamic/button/index.ts} +1 -1
- package/src/lib/components/dynamic/dynamic-directive.ts +102 -0
- package/src/lib/components/dynamic/dynamic.module.ts +53 -0
- package/src/lib/components/dynamic/file-upload/file-upload.component.html +10 -0
- package/src/lib/components/dynamic/file-upload/file-upload.component.ts +46 -0
- package/{lib/components/dynamic/file-upload/index.d.ts → src/lib/components/dynamic/file-upload/index.ts} +1 -1
- package/src/lib/components/dynamic/form/dynamic-form-array.component.html +19 -0
- package/src/lib/components/dynamic/form/dynamic-form-array.component.scss +10 -0
- package/src/lib/components/dynamic/form/dynamic-form-array.component.ts +75 -0
- package/src/lib/components/dynamic/form/dynamic-form.component.html +7 -0
- package/src/lib/components/dynamic/form/dynamic-form.component.ts +49 -0
- package/{lib/components/dynamic/form/index.d.ts → src/lib/components/dynamic/form/index.ts} +2 -2
- package/{lib/components/dynamic/index.d.ts → src/lib/components/dynamic/index.ts} +8 -8
- package/{lib/components/dynamic/input/index.d.ts → src/lib/components/dynamic/input/index.ts} +1 -1
- package/src/lib/components/dynamic/input/input.component.html +9 -0
- package/src/lib/components/dynamic/input/input.component.ts +58 -0
- package/{lib/components/dynamic/input-phone/index.d.ts → src/lib/components/dynamic/input-phone/index.ts} +1 -1
- package/src/lib/components/dynamic/input-phone/input-phone.component.html +7 -0
- package/src/lib/components/dynamic/input-phone/input-phone.component.ts +58 -0
- package/{lib/components/dynamic/radio/index.d.ts → src/lib/components/dynamic/radio/index.ts} +1 -1
- package/src/lib/components/dynamic/radio/radio.component.html +8 -0
- package/src/lib/components/dynamic/radio/radio.component.ts +22 -0
- package/{lib/components/dynamic/select/index.d.ts → src/lib/components/dynamic/select/index.ts} +1 -1
- package/src/lib/components/dynamic/select/select.component.html +14 -0
- package/src/lib/components/dynamic/select/select.component.ts +75 -0
- package/{lib/components/dynamic/select-search/index.d.ts → src/lib/components/dynamic/select-search/index.ts} +1 -1
- package/src/lib/components/dynamic/select-search/select-search.component.html +15 -0
- package/src/lib/components/dynamic/select-search/select-search.component.ts +76 -0
- package/{lib/components/index.d.ts → src/lib/components/index.ts} +3 -3
- package/src/lib/components/shared/filter/filter.component.html +51 -0
- package/src/lib/components/shared/filter/filter.component.scss +79 -0
- package/src/lib/components/shared/filter/filter.component.ts +117 -0
- package/src/lib/components/shared/filter/filter.module.ts +36 -0
- package/{lib/components/shared/filter/index.d.ts → src/lib/components/shared/filter/index.ts} +2 -2
- package/{lib/components/shared/filter/menu/index.d.ts → src/lib/components/shared/filter/menu/index.ts} +1 -1
- package/src/lib/components/shared/filter/menu/menu.component.html +28 -0
- package/src/lib/components/shared/filter/menu/menu.component.scss +62 -0
- package/src/lib/components/shared/filter/menu/menu.component.ts +122 -0
- package/src/lib/components/shared/filter/menu/menu.module.ts +41 -0
- package/src/lib/components/shared/filter/options/children/children.component.html +6 -0
- package/src/lib/components/shared/filter/options/children/children.component.scss +30 -0
- package/src/lib/components/shared/filter/options/children/children.component.ts +58 -0
- package/{lib/components/shared/filter/options/children/index.d.ts → src/lib/components/shared/filter/options/children/index.ts} +1 -1
- package/src/lib/components/shared/filter/options/currency/currency.component.html +3 -0
- package/src/lib/components/shared/filter/options/currency/currency.component.scss +19 -0
- package/src/lib/components/shared/filter/options/currency/currency.component.ts +52 -0
- package/{lib/components/shared/filter/options/currency/index.d.ts → src/lib/components/shared/filter/options/currency/index.ts} +1 -1
- package/src/lib/components/shared/filter/options/date-range/date-range.component.html +3 -0
- package/src/lib/components/shared/filter/options/date-range/date-range.component.scss +34 -0
- package/src/lib/components/shared/filter/options/date-range/date-range.component.ts +72 -0
- package/{lib/components/shared/filter/options/date-range/index.d.ts → src/lib/components/shared/filter/options/date-range/index.ts} +1 -1
- package/{lib/components/shared/filter/options/index.d.ts → src/lib/components/shared/filter/options/index.ts} +1 -1
- package/{lib/components/shared/filter/options/input/index.d.ts → src/lib/components/shared/filter/options/input/index.ts} +1 -1
- package/src/lib/components/shared/filter/options/input/input.component.html +3 -0
- package/src/lib/components/shared/filter/options/input/input.component.scss +19 -0
- package/src/lib/components/shared/filter/options/input/input.component.ts +52 -0
- package/src/lib/components/shared/filter/options/options.component.html +43 -0
- package/src/lib/components/shared/filter/options/options.component.scss +56 -0
- package/src/lib/components/shared/filter/options/options.component.ts +58 -0
- package/src/lib/components/shared/filter/options/options.module.ts +58 -0
- package/{lib/components/shared/filter/options/status/index.d.ts → src/lib/components/shared/filter/options/status/index.ts} +1 -1
- package/src/lib/components/shared/filter/options/status/status.component.html +4 -0
- package/src/lib/components/shared/filter/options/status/status.component.scss +29 -0
- package/src/lib/components/shared/filter/options/status/status.component.ts +73 -0
- package/{lib/components/shared/filter/selected/index.d.ts → src/lib/components/shared/filter/selected/index.ts} +1 -1
- package/src/lib/components/shared/filter/selected/item/children/children.component.html +19 -0
- package/src/lib/components/shared/filter/selected/item/children/children.component.scss +68 -0
- package/src/lib/components/shared/filter/selected/item/children/children.component.ts +49 -0
- package/{lib/components/shared/filter/selected/item/children/index.d.ts → src/lib/components/shared/filter/selected/item/children/index.ts} +1 -1
- package/src/lib/components/shared/filter/selected/item/currency/currency.component.html +1 -0
- package/src/lib/components/shared/filter/selected/item/currency/currency.component.scss +4 -0
- package/src/lib/components/shared/filter/selected/item/currency/currency.component.ts +26 -0
- package/{lib/components/shared/filter/selected/item/currency/index.d.ts → src/lib/components/shared/filter/selected/item/currency/index.ts} +1 -1
- package/src/lib/components/shared/filter/selected/item/date-range/date-range.component.html +2 -0
- package/src/lib/components/shared/filter/selected/item/date-range/date-range.component.scss +4 -0
- package/src/lib/components/shared/filter/selected/item/date-range/date-range.component.ts +39 -0
- package/{lib/components/shared/filter/selected/item/date-range/index.d.ts → src/lib/components/shared/filter/selected/item/date-range/index.ts} +1 -1
- package/src/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.html +1 -0
- package/src/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.scss +4 -0
- package/src/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.ts +29 -0
- package/{lib/components/shared/filter/selected/item/date-with-action/index.d.ts → src/lib/components/shared/filter/selected/item/date-with-action/index.ts} +1 -1
- package/{lib/components/shared/filter/selected/item/index.d.ts → src/lib/components/shared/filter/selected/item/index.ts} +7 -7
- package/{lib/components/shared/filter/selected/item/input/index.d.ts → src/lib/components/shared/filter/selected/item/input/index.ts} +1 -1
- package/src/lib/components/shared/filter/selected/item/input/input.component.html +1 -0
- package/src/lib/components/shared/filter/selected/item/input/input.component.scss +4 -0
- package/src/lib/components/shared/filter/selected/item/input/input.component.ts +26 -0
- package/src/lib/components/shared/filter/selected/item/item.component.html +38 -0
- package/src/lib/components/shared/filter/selected/item/item.component.scss +72 -0
- package/src/lib/components/shared/filter/selected/item/item.component.ts +71 -0
- package/{lib/components/shared/filter/selected/item/status/index.d.ts → src/lib/components/shared/filter/selected/item/status/index.ts} +1 -1
- package/src/lib/components/shared/filter/selected/item/status/status.component.html +1 -0
- package/src/lib/components/shared/filter/selected/item/status/status.component.scss +4 -0
- package/src/lib/components/shared/filter/selected/item/status/status.component.ts +36 -0
- package/src/lib/components/shared/filter/selected/selected.component.html +3 -0
- package/src/lib/components/shared/filter/selected/selected.component.scss +9 -0
- package/src/lib/components/shared/filter/selected/selected.component.ts +76 -0
- package/src/lib/components/shared/filter/selected/selected.module.ts +60 -0
- package/{lib/components/shared/index.d.ts → src/lib/components/shared/index.ts} +4 -4
- package/{lib/components/shared/password-strength/index.d.ts → src/lib/components/shared/password-strength/index.ts} +2 -2
- package/src/lib/components/shared/password-strength/password-strength.component.html +50 -0
- package/src/lib/components/shared/password-strength/password-strength.component.scss +70 -0
- package/src/lib/components/shared/password-strength/password-strength.component.ts +89 -0
- package/src/lib/components/shared/password-strength/password-strength.module.ts +24 -0
- package/src/lib/components/shared/password-strength/password-strength.ts +5 -0
- package/src/lib/components/shared/products/filter/filter.component.html +6 -0
- package/src/lib/components/shared/products/filter/filter.component.scss +20 -0
- package/src/lib/components/shared/products/filter/filter.component.ts +34 -0
- package/{lib/components/shared/products/index.d.ts → src/lib/components/shared/products/index.ts} +2 -2
- package/src/lib/components/shared/products/products.component.html +15 -0
- package/src/lib/components/shared/products/products.component.scss +70 -0
- package/src/lib/components/shared/products/products.component.ts +104 -0
- package/src/lib/components/shared/products/products.module.ts +13 -0
- package/{lib/components/shared/products/providers/index.d.ts → src/lib/components/shared/products/providers/index.ts} +1 -1
- package/src/lib/components/shared/products/providers/products.model.ts +60 -0
- package/{lib/components/shared/progress-bar/index.d.ts → src/lib/components/shared/progress-bar/index.ts} +3 -3
- package/src/lib/components/shared/progress-bar/progress-bar.component.html +3 -0
- package/src/lib/components/shared/progress-bar/progress-bar.component.scss +6 -0
- package/src/lib/components/shared/progress-bar/progress-bar.component.ts +27 -0
- package/src/lib/components/shared/progress-bar/progress-bar.module.ts +10 -0
- package/src/lib/components/shared/progress-bar/progress-bar.service.ts +59 -0
- package/src/lib/interfaces/field-config.ts +58 -0
- package/{lib/interfaces/index.d.ts → src/lib/interfaces/index.ts} +1 -1
- package/src/public-api.ts +5 -0
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +20 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2020/lib/components/base/base-component.mjs +0 -322
- package/esm2020/lib/components/base/base-dynamic-array.mjs +0 -221
- package/esm2020/lib/components/base/base-dynamic.mjs +0 -99
- package/esm2020/lib/components/base/base-scroll-component.mjs +0 -55
- package/esm2020/lib/components/base/base-validators.mjs +0 -19
- package/esm2020/lib/components/base/index.mjs +0 -6
- package/esm2020/lib/components/dynamic/button/button.component.mjs +0 -52
- package/esm2020/lib/components/dynamic/button/index.mjs +0 -2
- package/esm2020/lib/components/dynamic/dynamic-directive.mjs +0 -95
- package/esm2020/lib/components/dynamic/dynamic.module.mjs +0 -84
- package/esm2020/lib/components/dynamic/file-upload/file-upload.component.mjs +0 -52
- package/esm2020/lib/components/dynamic/file-upload/index.mjs +0 -2
- package/esm2020/lib/components/dynamic/form/dynamic-form-array.component.mjs +0 -72
- package/esm2020/lib/components/dynamic/form/dynamic-form.component.mjs +0 -46
- package/esm2020/lib/components/dynamic/form/index.mjs +0 -3
- package/esm2020/lib/components/dynamic/index.mjs +0 -9
- package/esm2020/lib/components/dynamic/input/index.mjs +0 -2
- package/esm2020/lib/components/dynamic/input/input.component.mjs +0 -65
- package/esm2020/lib/components/dynamic/input-phone/index.mjs +0 -2
- package/esm2020/lib/components/dynamic/input-phone/input-phone.component.mjs +0 -65
- package/esm2020/lib/components/dynamic/radio/index.mjs +0 -2
- package/esm2020/lib/components/dynamic/radio/radio.component.mjs +0 -33
- package/esm2020/lib/components/dynamic/select/index.mjs +0 -2
- package/esm2020/lib/components/dynamic/select/select.component.mjs +0 -80
- package/esm2020/lib/components/dynamic/select-search/index.mjs +0 -2
- package/esm2020/lib/components/dynamic/select-search/select-search.component.mjs +0 -80
- package/esm2020/lib/components/index.mjs +0 -4
- package/esm2020/lib/components/shared/filter/filter.component.mjs +0 -119
- package/esm2020/lib/components/shared/filter/filter.module.mjs +0 -63
- package/esm2020/lib/components/shared/filter/index.mjs +0 -3
- package/esm2020/lib/components/shared/filter/menu/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/menu/menu.component.mjs +0 -120
- package/esm2020/lib/components/shared/filter/menu/menu.module.mjs +0 -70
- package/esm2020/lib/components/shared/filter/options/children/children.component.mjs +0 -50
- package/esm2020/lib/components/shared/filter/options/children/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/options/currency/currency.component.mjs +0 -46
- package/esm2020/lib/components/shared/filter/options/currency/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/options/date-range/date-range.component.mjs +0 -65
- package/esm2020/lib/components/shared/filter/options/date-range/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/options/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/options/input/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/options/input/input.component.mjs +0 -46
- package/esm2020/lib/components/shared/filter/options/options.component.mjs +0 -68
- package/esm2020/lib/components/shared/filter/options/options.module.mjs +0 -95
- package/esm2020/lib/components/shared/filter/options/status/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/options/status/status.component.mjs +0 -66
- package/esm2020/lib/components/shared/filter/selected/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/selected/item/children/children.component.mjs +0 -57
- package/esm2020/lib/components/shared/filter/selected/item/children/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/selected/item/currency/currency.component.mjs +0 -29
- package/esm2020/lib/components/shared/filter/selected/item/currency/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/selected/item/date-range/date-range.component.mjs +0 -42
- package/esm2020/lib/components/shared/filter/selected/item/date-range/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.mjs +0 -33
- package/esm2020/lib/components/shared/filter/selected/item/date-with-action/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/selected/item/index.mjs +0 -8
- package/esm2020/lib/components/shared/filter/selected/item/input/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/selected/item/input/input.component.mjs +0 -28
- package/esm2020/lib/components/shared/filter/selected/item/item.component.mjs +0 -74
- package/esm2020/lib/components/shared/filter/selected/item/status/index.mjs +0 -2
- package/esm2020/lib/components/shared/filter/selected/item/status/status.component.mjs +0 -39
- package/esm2020/lib/components/shared/filter/selected/selected.component.mjs +0 -80
- package/esm2020/lib/components/shared/filter/selected/selected.module.mjs +0 -90
- package/esm2020/lib/components/shared/index.mjs +0 -5
- package/esm2020/lib/components/shared/password-strength/index.mjs +0 -3
- package/esm2020/lib/components/shared/password-strength/password-strength.component.mjs +0 -85
- package/esm2020/lib/components/shared/password-strength/password-strength.mjs +0 -2
- package/esm2020/lib/components/shared/password-strength/password-strength.module.mjs +0 -50
- package/esm2020/lib/components/shared/products/filter/filter.component.mjs +0 -36
- package/esm2020/lib/components/shared/products/index.mjs +0 -3
- package/esm2020/lib/components/shared/products/products.component.mjs +0 -91
- package/esm2020/lib/components/shared/products/products.module.mjs +0 -22
- package/esm2020/lib/components/shared/products/providers/index.mjs +0 -2
- package/esm2020/lib/components/shared/products/providers/products.model.mjs +0 -38
- package/esm2020/lib/components/shared/progress-bar/index.mjs +0 -4
- package/esm2020/lib/components/shared/progress-bar/progress-bar.component.mjs +0 -28
- package/esm2020/lib/components/shared/progress-bar/progress-bar.module.mjs +0 -18
- package/esm2020/lib/components/shared/progress-bar/progress-bar.service.mjs +0 -49
- package/esm2020/lib/interfaces/field-config.mjs +0 -2
- package/esm2020/lib/interfaces/index.mjs +0 -2
- package/esm2020/monkey-front-components.mjs +0 -5
- package/esm2020/public-api.mjs +0 -5
- package/fesm2015/monkey-front-components.mjs +0 -2877
- package/fesm2015/monkey-front-components.mjs.map +0 -1
- package/fesm2020/monkey-front-components.mjs +0 -2859
- package/fesm2020/monkey-front-components.mjs.map +0 -1
- package/lib/components/base/base-component.d.ts +0 -50
- package/lib/components/base/base-dynamic-array.d.ts +0 -34
- package/lib/components/base/base-dynamic.d.ts +0 -24
- package/lib/components/base/base-scroll-component.d.ts +0 -16
- package/lib/components/base/base-validators.d.ts +0 -1
- package/lib/components/dynamic/button/button.component.d.ts +0 -17
- package/lib/components/dynamic/dynamic-directive.d.ts +0 -22
- package/lib/components/dynamic/dynamic.module.d.ts +0 -20
- package/lib/components/dynamic/file-upload/file-upload.component.d.ts +0 -17
- package/lib/components/dynamic/form/dynamic-form-array.component.d.ts +0 -16
- package/lib/components/dynamic/form/dynamic-form.component.d.ts +0 -14
- package/lib/components/dynamic/input/input.component.d.ts +0 -20
- package/lib/components/dynamic/input-phone/input-phone.component.d.ts +0 -20
- package/lib/components/dynamic/radio/radio.component.d.ts +0 -11
- package/lib/components/dynamic/select/select.component.d.ts +0 -16
- package/lib/components/dynamic/select-search/select-search.component.d.ts +0 -16
- package/lib/components/shared/filter/filter.component.d.ts +0 -32
- package/lib/components/shared/filter/filter.module.d.ts +0 -14
- package/lib/components/shared/filter/menu/menu.component.d.ts +0 -24
- package/lib/components/shared/filter/menu/menu.module.d.ts +0 -14
- package/lib/components/shared/filter/options/children/children.component.d.ts +0 -17
- package/lib/components/shared/filter/options/currency/currency.component.d.ts +0 -17
- package/lib/components/shared/filter/options/date-range/date-range.component.d.ts +0 -24
- package/lib/components/shared/filter/options/input/input.component.d.ts +0 -17
- package/lib/components/shared/filter/options/options.component.d.ts +0 -20
- package/lib/components/shared/filter/options/options.module.d.ts +0 -18
- package/lib/components/shared/filter/options/status/status.component.d.ts +0 -19
- package/lib/components/shared/filter/selected/item/children/children.component.d.ts +0 -16
- package/lib/components/shared/filter/selected/item/currency/currency.component.d.ts +0 -11
- package/lib/components/shared/filter/selected/item/date-range/date-range.component.d.ts +0 -12
- package/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.d.ts +0 -11
- package/lib/components/shared/filter/selected/item/input/input.component.d.ts +0 -11
- package/lib/components/shared/filter/selected/item/item.component.d.ts +0 -20
- package/lib/components/shared/filter/selected/item/status/status.component.d.ts +0 -13
- package/lib/components/shared/filter/selected/selected.component.d.ts +0 -18
- package/lib/components/shared/filter/selected/selected.module.d.ts +0 -21
- package/lib/components/shared/password-strength/password-strength.component.d.ts +0 -23
- package/lib/components/shared/password-strength/password-strength.d.ts +0 -5
- package/lib/components/shared/password-strength/password-strength.module.d.ts +0 -12
- package/lib/components/shared/products/filter/filter.component.d.ts +0 -12
- package/lib/components/shared/products/products.component.d.ts +0 -20
- package/lib/components/shared/products/products.module.d.ts +0 -11
- package/lib/components/shared/products/providers/products.model.d.ts +0 -13
- package/lib/components/shared/progress-bar/progress-bar.component.d.ts +0 -12
- package/lib/components/shared/progress-bar/progress-bar.module.d.ts +0 -8
- package/lib/components/shared/progress-bar/progress-bar.service.d.ts +0 -14
- package/lib/interfaces/field-config.d.ts +0 -54
- package/monkey-front-components-0.0.383.tgz +0 -0
- package/monkey-front-components.d.ts +0 -5
- package/public-api.d.ts +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
background: #fafafa;
|
|
7
|
+
border: 1px solid #d6d6d6;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
box-shadow: 0px 4px 36px -8px #6d6d6d3a;
|
|
10
|
+
border-radius: 8px !important;
|
|
11
|
+
margin: 0px 8px;
|
|
12
|
+
|
|
13
|
+
.header {
|
|
14
|
+
border-bottom: 1px solid #d6d6d6;
|
|
15
|
+
padding: 8px 8px;
|
|
16
|
+
|
|
17
|
+
.title {
|
|
18
|
+
color: #4b4a53;
|
|
19
|
+
font-style: normal;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
line-height: 16px;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
text-align: left;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.close {
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
border-radius: 120px;
|
|
29
|
+
padding: 4px;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
background-color: #6d6d6d0c;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.close-menu {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
background: #fafafa;
|
|
42
|
+
border: 1px solid #d6d6d6;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
box-shadow: 0px 4px 36px -8px #6d6d6d3a;
|
|
45
|
+
border-radius: 8px !important;
|
|
46
|
+
margin: 0px 8px;
|
|
47
|
+
padding: 8px;
|
|
48
|
+
|
|
49
|
+
::ng-deep monkey-button {
|
|
50
|
+
width: 100%;
|
|
51
|
+
|
|
52
|
+
button {
|
|
53
|
+
width: 100%;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { MonkeyEcxFilterMenu, MonkeyEcxFilterMenuChildren } from 'monkey-front-core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'mecx-filter-options',
|
|
6
|
+
templateUrl: './options.component.html',
|
|
7
|
+
styleUrls: ['./options.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class MECXFilterOptionsComponent {
|
|
10
|
+
@Input() option: MonkeyEcxFilterMenu = null;
|
|
11
|
+
|
|
12
|
+
@Input() closeDirectly = false;
|
|
13
|
+
|
|
14
|
+
@Output() onClose = new EventEmitter<any>();
|
|
15
|
+
|
|
16
|
+
@Output() onRemove = new EventEmitter<any>();
|
|
17
|
+
|
|
18
|
+
@Output() onSubmit = new EventEmitter<any>();
|
|
19
|
+
|
|
20
|
+
@Output() onShowFromChildren = new EventEmitter<any>();
|
|
21
|
+
|
|
22
|
+
_showMenu = false;
|
|
23
|
+
|
|
24
|
+
closeMenu = () => {
|
|
25
|
+
this._showMenu = false;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
constructor() {
|
|
29
|
+
// not to do
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
onHandleChildrenAction(child: MonkeyEcxFilterMenuChildren) {
|
|
33
|
+
const { option } = this;
|
|
34
|
+
const { field, action } = child;
|
|
35
|
+
this.onSubmit.next({
|
|
36
|
+
[option.field]: {
|
|
37
|
+
[field]: action()
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
onHandleSubmitChildren(event: any) {
|
|
43
|
+
this.onSubmit.next(event);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
onHandleSubmit(event: any) {
|
|
47
|
+
this.onSubmit.next(event);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
onHandleShowMenu() {
|
|
51
|
+
const { closeDirectly } = this;
|
|
52
|
+
if (closeDirectly) {
|
|
53
|
+
this.onClose.next();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this._showMenu = true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { RouterModule } from '@angular/router';
|
|
5
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
6
|
+
import { MonkeyEcxDirectivesModule } from 'monkey-front-core';
|
|
7
|
+
import {
|
|
8
|
+
MonkeyBadgeModule,
|
|
9
|
+
MonkeyButtonModule,
|
|
10
|
+
MonkeyCheckboxModule,
|
|
11
|
+
MonkeyDateRangePickerModule,
|
|
12
|
+
MonkeyIconModule,
|
|
13
|
+
MonkeyInputModule,
|
|
14
|
+
MonkeyOptionModule,
|
|
15
|
+
MonkeySelectModule
|
|
16
|
+
} from 'monkey-style-guide';
|
|
17
|
+
import { MECXFilterOptionsChildrenComponent } from './children';
|
|
18
|
+
import { MECXFilterOptionsCurrencyComponent } from './currency';
|
|
19
|
+
import { MECXFilterOptionsInputComponent } from './input';
|
|
20
|
+
import { MECXFilterOptionsDateRangeComponent } from './date-range';
|
|
21
|
+
import { MECXFilterOptionsComponent } from './options.component';
|
|
22
|
+
import { MECXFilterOptionsStatusComponent } from './status';
|
|
23
|
+
|
|
24
|
+
@NgModule({
|
|
25
|
+
declarations: [
|
|
26
|
+
MECXFilterOptionsChildrenComponent,
|
|
27
|
+
MECXFilterOptionsComponent,
|
|
28
|
+
MECXFilterOptionsCurrencyComponent,
|
|
29
|
+
MECXFilterOptionsDateRangeComponent,
|
|
30
|
+
MECXFilterOptionsInputComponent,
|
|
31
|
+
MECXFilterOptionsStatusComponent
|
|
32
|
+
],
|
|
33
|
+
imports: [
|
|
34
|
+
CommonModule,
|
|
35
|
+
FormsModule,
|
|
36
|
+
MonkeyBadgeModule,
|
|
37
|
+
MonkeyButtonModule,
|
|
38
|
+
MonkeyCheckboxModule,
|
|
39
|
+
MonkeyDateRangePickerModule,
|
|
40
|
+
MonkeyEcxDirectivesModule,
|
|
41
|
+
MonkeyIconModule,
|
|
42
|
+
MonkeyInputModule,
|
|
43
|
+
MonkeyOptionModule,
|
|
44
|
+
MonkeySelectModule,
|
|
45
|
+
ReactiveFormsModule,
|
|
46
|
+
RouterModule,
|
|
47
|
+
TranslateModule.forChild()
|
|
48
|
+
],
|
|
49
|
+
exports: [
|
|
50
|
+
MECXFilterOptionsChildrenComponent,
|
|
51
|
+
MECXFilterOptionsComponent,
|
|
52
|
+
MECXFilterOptionsCurrencyComponent,
|
|
53
|
+
MECXFilterOptionsDateRangeComponent,
|
|
54
|
+
MECXFilterOptionsInputComponent,
|
|
55
|
+
MECXFilterOptionsStatusComponent
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
export class MECXFilterOptionsModule {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './status.component';
|
|
1
|
+
export * from './status.component';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
max-width: 232px;
|
|
7
|
+
min-width: 180px;
|
|
8
|
+
max-height: 500px;
|
|
9
|
+
padding: 12px 12px 8px 12px;
|
|
10
|
+
color: #72717e;
|
|
11
|
+
overflow: auto;
|
|
12
|
+
|
|
13
|
+
::ng-deep mecx-form-field mecx-form-field-body.checkbox {
|
|
14
|
+
padding: 0px !important;
|
|
15
|
+
|
|
16
|
+
.mecx-check-container {
|
|
17
|
+
height: unset !important;
|
|
18
|
+
|
|
19
|
+
.mecx-check-mark {
|
|
20
|
+
top: 50%;
|
|
21
|
+
transform: translateY(-50%);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
::ng-deep monkey-checkbox {
|
|
27
|
+
margin: 6px 0px !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { MonkeyEcxFilterMenu } from 'monkey-front-core';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import { debounceTime } from 'rxjs/operators';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'mecx-filter-options-status',
|
|
8
|
+
templateUrl: './status.component.html',
|
|
9
|
+
styleUrls: ['./status.component.scss']
|
|
10
|
+
})
|
|
11
|
+
export class MECXFilterOptionsStatusComponent implements OnInit, OnChanges, OnDestroy {
|
|
12
|
+
@Input() option: MonkeyEcxFilterMenu = null;
|
|
13
|
+
|
|
14
|
+
@Output() onSubmit = new EventEmitter<any>();
|
|
15
|
+
|
|
16
|
+
_value = '';
|
|
17
|
+
|
|
18
|
+
private eventHandle = new EventEmitter<any>();
|
|
19
|
+
|
|
20
|
+
private eventSubscription: Subscription;
|
|
21
|
+
|
|
22
|
+
constructor() {
|
|
23
|
+
// not to do
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
private verifySelected(value: string): boolean {
|
|
27
|
+
return this._value?.includes(value);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ngOnInit() {
|
|
31
|
+
const { eventHandle, onSubmit, option: { field } } = this;
|
|
32
|
+
|
|
33
|
+
this.eventSubscription = eventHandle
|
|
34
|
+
.pipe(debounceTime(800))
|
|
35
|
+
.subscribe((value: string) => {
|
|
36
|
+
onSubmit.next({ [field]: value });
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
ngOnDestroy() {
|
|
41
|
+
this.eventSubscription.unsubscribe();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
45
|
+
if (changes.option) {
|
|
46
|
+
const { currentValue } = changes.option;
|
|
47
|
+
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
48
|
+
this._value = currentValue?.value;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
onHandleChecked(cmp: string) {
|
|
54
|
+
const { _value } = this;
|
|
55
|
+
return `${_value}`.split(',')?.indexOf(cmp) >= 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
onChangeFilter(event: any, value: string): void {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
event.stopPropagation();
|
|
61
|
+
|
|
62
|
+
const selected = !this.verifySelected(value);
|
|
63
|
+
const filters: string[] = this._value?.split(',') || [];
|
|
64
|
+
if (!selected) {
|
|
65
|
+
filters.splice(filters.indexOf(value), 1);
|
|
66
|
+
} else {
|
|
67
|
+
filters.push(value);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
this._value = filters?.length ? filters.join(',') : null;
|
|
71
|
+
this.eventHandle.next(this._value);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './selected.module';
|
|
1
|
+
export * from './selected.module';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class="box">
|
|
2
|
+
<div class="data">
|
|
3
|
+
{{ option.label | translate }}
|
|
4
|
+
</div>
|
|
5
|
+
<div class="value" [id]="'mecx-filter-selected-item-'+option?.field" (click)="onShow.next()">
|
|
6
|
+
<ng-container *ngIf="option?.type as type">
|
|
7
|
+
<ng-container [ngSwitch]="type+'-'+_child?.type">
|
|
8
|
+
<mecx-filter-selected-item-date-with-action *ngSwitchCase="'date-with-action'"
|
|
9
|
+
[option]="_child">
|
|
10
|
+
</mecx-filter-selected-item-date-with-action>
|
|
11
|
+
<mecx-filter-selected-item-date-range *ngSwitchCase="'date-date-range'" [option]="_child">
|
|
12
|
+
</mecx-filter-selected-item-date-range>
|
|
13
|
+
</ng-container>
|
|
14
|
+
</ng-container>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="action" (click)="onShow.next()">
|
|
17
|
+
<monkey-icon icon="arrow-right-14" color="#4B4A53"></monkey-icon>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
display: flex;
|
|
5
|
+
|
|
6
|
+
.box {
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
align-items: center;
|
|
10
|
+
background: #ffffff;
|
|
11
|
+
border: 1px solid #d6d6d6;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
border-radius: 120px;
|
|
14
|
+
height: 40px;
|
|
15
|
+
|
|
16
|
+
.data {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
padding-left: 12px;
|
|
20
|
+
height: 100%;
|
|
21
|
+
font-style: normal;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
line-height: 24px;
|
|
25
|
+
text-align: center;
|
|
26
|
+
color: #72717e;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.value {
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
padding: 12px;
|
|
34
|
+
height: 100%;
|
|
35
|
+
font-style: normal;
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
line-height: 24px;
|
|
39
|
+
text-align: center;
|
|
40
|
+
color: #72717e;
|
|
41
|
+
background-color: #6d6d6d0a;
|
|
42
|
+
|
|
43
|
+
&:hover {
|
|
44
|
+
background-color: #6d6d6d0c;
|
|
45
|
+
font-weight: 400;
|
|
46
|
+
text-decoration: underline;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.action {
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
border-left: 1px solid #d6d6d6;
|
|
53
|
+
padding: 12px;
|
|
54
|
+
color: #908e9d;
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
font-size: 18px;
|
|
57
|
+
height: 40px;
|
|
58
|
+
align-items: center;
|
|
59
|
+
display: flex;
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
background-color: #6d6d6d0c;
|
|
63
|
+
border-top-right-radius: 120px;
|
|
64
|
+
border-bottom-right-radius: 120px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { MonkeyEcxFilterMenu, MonkeyEcxUtils } from 'monkey-front-core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'mecx-filter-selected-item-children',
|
|
6
|
+
templateUrl: './children.component.html',
|
|
7
|
+
styleUrls: ['./children.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class MECXFilterSelectedItemChildrenComponent implements OnChanges {
|
|
10
|
+
@Input() option: MonkeyEcxFilterMenu = null;
|
|
11
|
+
|
|
12
|
+
@Output() onShow = new EventEmitter<any>();
|
|
13
|
+
|
|
14
|
+
@Output() onRemove = new EventEmitter<any>();
|
|
15
|
+
|
|
16
|
+
_child: any = null;
|
|
17
|
+
|
|
18
|
+
constructor(private elRef: ElementRef) {
|
|
19
|
+
// not to do
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
private validateValue(value: any) {
|
|
23
|
+
if (!value) return false;
|
|
24
|
+
if (typeof value === 'object') {
|
|
25
|
+
return value && JSON.stringify(value) !== '{}';
|
|
26
|
+
}
|
|
27
|
+
return MonkeyEcxUtils.persistNullEmptyUndefined(value);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private onHandleSelectedValue({ children }: any) {
|
|
31
|
+
const found = children.find(({ field, getValue }: any) => {
|
|
32
|
+
return this.validateValue(getValue()?.[field]);
|
|
33
|
+
});
|
|
34
|
+
if (!found) {
|
|
35
|
+
this.elRef.nativeElement.remove();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this._child = found;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
42
|
+
if (changes.option) {
|
|
43
|
+
const { currentValue } = changes.option;
|
|
44
|
+
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
45
|
+
this.onHandleSelectedValue(currentValue);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './children.component';
|
|
1
|
+
export * from './children.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{ _value | monkeyecxFormatCurrency }}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { MonkeyEcxFilterMenu } from 'monkey-front-core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'mecx-filter-selected-item-currency',
|
|
6
|
+
templateUrl: './currency.component.html',
|
|
7
|
+
styleUrls: ['./currency.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class MECXFilterSelectedItemCurrencyComponent implements OnChanges {
|
|
10
|
+
@Input() option: MonkeyEcxFilterMenu = null;
|
|
11
|
+
|
|
12
|
+
_value: any = null;
|
|
13
|
+
|
|
14
|
+
private onHandleSelectedValue({ value }: any) {
|
|
15
|
+
this._value = value;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
19
|
+
if (changes.option) {
|
|
20
|
+
const { currentValue } = changes.option;
|
|
21
|
+
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
22
|
+
this.onHandleSelectedValue(currentValue);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './currency.component';
|
|
1
|
+
export * from './currency.component';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { MonkeyEcxFilterMenu, MonkeyEcxFilterMenuChildren } from 'monkey-front-core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'mecx-filter-selected-item-date-range',
|
|
6
|
+
templateUrl: './date-range.component.html',
|
|
7
|
+
styleUrls: ['./date-range.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class MECXFilterSelectedItemDateRangeComponent implements OnChanges {
|
|
10
|
+
@Input() option: MonkeyEcxFilterMenu | MonkeyEcxFilterMenuChildren = null;
|
|
11
|
+
|
|
12
|
+
_startDate = '';
|
|
13
|
+
|
|
14
|
+
_endDate = '';
|
|
15
|
+
|
|
16
|
+
private onHandleSelectedValue({ field, value, getValue }: any) {
|
|
17
|
+
try {
|
|
18
|
+
value = value || getValue()?.[field];
|
|
19
|
+
if (value && JSON.stringify(value) !== '{}') {
|
|
20
|
+
const objDates = JSON.parse(value);
|
|
21
|
+
this._startDate = objDates?.startDate;
|
|
22
|
+
this._endDate = objDates?.endDate;
|
|
23
|
+
}
|
|
24
|
+
} catch (e) {
|
|
25
|
+
const objDates = JSON.parse(value?.dates);
|
|
26
|
+
this._startDate = objDates?.startDate;
|
|
27
|
+
this._endDate = objDates?.endDate;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
32
|
+
if (changes.option) {
|
|
33
|
+
const { currentValue } = changes.option;
|
|
34
|
+
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
35
|
+
this.onHandleSelectedValue(currentValue);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './date-range.component';
|
|
1
|
+
export * from './date-range.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{ _date | monkeyecxFormatDateTimelapse: false }}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { MonkeyEcxFilterMenuChildren, MonkeyEcxUtils } from 'monkey-front-core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'mecx-filter-selected-item-date-with-action',
|
|
6
|
+
templateUrl: './date-with-action.component.html',
|
|
7
|
+
styleUrls: ['./date-with-action.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class MECXFilterSelectedItemDateWithActionComponent implements OnChanges {
|
|
10
|
+
@Input() option: MonkeyEcxFilterMenuChildren = null;
|
|
11
|
+
|
|
12
|
+
_date = '';
|
|
13
|
+
|
|
14
|
+
private onHandleSelectedValue({ field, getValue }: any) {
|
|
15
|
+
const value = getValue()?.[field];
|
|
16
|
+
if (MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
17
|
+
this._date = value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
22
|
+
if (changes.option) {
|
|
23
|
+
const { currentValue } = changes.option;
|
|
24
|
+
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
25
|
+
this.onHandleSelectedValue(currentValue);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './date-with-action.component';
|
|
1
|
+
export * from './date-with-action.component';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './children';
|
|
2
|
-
export * from './currency';
|
|
3
|
-
export * from './date-range';
|
|
4
|
-
export * from './date-with-action';
|
|
5
|
-
export * from './input';
|
|
6
|
-
export * from './item.component';
|
|
7
|
-
export * from './status';
|
|
1
|
+
export * from './children';
|
|
2
|
+
export * from './currency';
|
|
3
|
+
export * from './date-range';
|
|
4
|
+
export * from './date-with-action';
|
|
5
|
+
export * from './input';
|
|
6
|
+
export * from './item.component';
|
|
7
|
+
export * from './status';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './input.component';
|
|
1
|
+
export * from './input.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{ _value }}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { MonkeyEcxFilterMenu } from 'monkey-front-core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'mecx-filter-selected-item-input',
|
|
6
|
+
templateUrl: './input.component.html',
|
|
7
|
+
styleUrls: ['./input.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class MECXFilterSelectedItemInputComponent implements OnChanges {
|
|
10
|
+
@Input() option: MonkeyEcxFilterMenu = null;
|
|
11
|
+
|
|
12
|
+
_value: any = null;
|
|
13
|
+
|
|
14
|
+
private onHandleSelectedValue({ value }: any) {
|
|
15
|
+
this._value = value;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
19
|
+
if (changes.option) {
|
|
20
|
+
const { currentValue } = changes.option;
|
|
21
|
+
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
22
|
+
this.onHandleSelectedValue(currentValue);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<ng-container *ngIf="_option?.type as type">
|
|
2
|
+
<ng-container *ngIf="_option?.children; else withoutChildren">
|
|
3
|
+
<mecx-filter-selected-item-children [option]="_option" (onShow)="onHandleShowMenu()"
|
|
4
|
+
(onRemove)="onHandleRemove()">
|
|
5
|
+
</mecx-filter-selected-item-children>
|
|
6
|
+
</ng-container>
|
|
7
|
+
<ng-template #withoutChildren>
|
|
8
|
+
<div class="box">
|
|
9
|
+
<div class="data">
|
|
10
|
+
{{ _option.label | translate }}
|
|
11
|
+
</div>
|
|
12
|
+
<div class="value" [id]="'mecx-filter-selected-item-'+_option?.field"
|
|
13
|
+
(click)="onHandleShowMenu()">
|
|
14
|
+
<ng-container [ngSwitch]="type">
|
|
15
|
+
<mecx-filter-selected-item-currency *ngSwitchCase="'currency'" [option]="_option">
|
|
16
|
+
</mecx-filter-selected-item-currency>
|
|
17
|
+
<mecx-filter-selected-item-input *ngSwitchCase="'input'" [option]="_option">
|
|
18
|
+
</mecx-filter-selected-item-input>
|
|
19
|
+
<mecx-filter-selected-item-date-range *ngSwitchCase="'date-range'" [option]="_option">
|
|
20
|
+
</mecx-filter-selected-item-date-range>
|
|
21
|
+
<mecx-filter-selected-item-status *ngSwitchCase="'status'" [option]="_option"
|
|
22
|
+
[labelMoreValues]="'FIELD.AND-MORE' | translate">
|
|
23
|
+
</mecx-filter-selected-item-status>
|
|
24
|
+
</ng-container>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="action" (click)="onHandleShowMenu()">
|
|
27
|
+
<monkey-icon icon="arrow-right-14" color="#4B4A53"></monkey-icon>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</ng-template>
|
|
31
|
+
</ng-container>
|
|
32
|
+
<ng-container
|
|
33
|
+
*monkeyecxPopover="_showMenu; target: $any(_actionElement); closed: closeMenu; dir: 'ltr'">
|
|
34
|
+
<mecx-filter-options [option]="_option" (onClose)="onHandleClose()"
|
|
35
|
+
(onRemove)="onHandleRemove()" (onSubmit)="onHandleSubmit($event)"
|
|
36
|
+
(onShowFromChildren)="onHandleShowFromChildren($event)">
|
|
37
|
+
</mecx-filter-options>
|
|
38
|
+
</ng-container>
|