monkey-front-components 0.0.384 → 0.0.387
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/esm2020/lib/components/base/base-component.mjs +322 -0
- package/esm2020/lib/components/base/base-dynamic-array.mjs +221 -0
- package/esm2020/lib/components/base/base-dynamic.mjs +99 -0
- package/esm2020/lib/components/base/base-scroll-component.mjs +55 -0
- package/esm2020/lib/components/base/base-validators.mjs +19 -0
- package/esm2020/lib/components/base/index.mjs +6 -0
- package/esm2020/lib/components/dynamic/button/button.component.mjs +52 -0
- package/esm2020/lib/components/dynamic/button/index.mjs +2 -0
- package/esm2020/lib/components/dynamic/dynamic-directive.mjs +95 -0
- package/esm2020/lib/components/dynamic/dynamic.module.mjs +84 -0
- package/esm2020/lib/components/dynamic/file-upload/file-upload.component.mjs +52 -0
- package/esm2020/lib/components/dynamic/file-upload/index.mjs +2 -0
- package/esm2020/lib/components/dynamic/form/dynamic-form-array.component.mjs +72 -0
- package/esm2020/lib/components/dynamic/form/dynamic-form.component.mjs +46 -0
- package/esm2020/lib/components/dynamic/form/index.mjs +3 -0
- package/esm2020/lib/components/dynamic/index.mjs +9 -0
- package/esm2020/lib/components/dynamic/input/index.mjs +2 -0
- package/esm2020/lib/components/dynamic/input/input.component.mjs +65 -0
- package/esm2020/lib/components/dynamic/input-phone/index.mjs +2 -0
- package/esm2020/lib/components/dynamic/input-phone/input-phone.component.mjs +65 -0
- package/esm2020/lib/components/dynamic/radio/index.mjs +2 -0
- package/esm2020/lib/components/dynamic/radio/radio.component.mjs +33 -0
- package/esm2020/lib/components/dynamic/select/index.mjs +2 -0
- package/esm2020/lib/components/dynamic/select/select.component.mjs +80 -0
- package/esm2020/lib/components/dynamic/select-search/index.mjs +2 -0
- package/esm2020/lib/components/dynamic/select-search/select-search.component.mjs +80 -0
- package/esm2020/lib/components/index.mjs +4 -0
- package/esm2020/lib/components/shared/filter/filter.component.mjs +119 -0
- package/esm2020/lib/components/shared/filter/filter.module.mjs +63 -0
- package/esm2020/lib/components/shared/filter/index.mjs +3 -0
- package/esm2020/lib/components/shared/filter/menu/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/menu/menu.component.mjs +120 -0
- package/esm2020/lib/components/shared/filter/menu/menu.module.mjs +70 -0
- package/esm2020/lib/components/shared/filter/options/children/children.component.mjs +50 -0
- package/esm2020/lib/components/shared/filter/options/children/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/options/currency/currency.component.mjs +46 -0
- package/esm2020/lib/components/shared/filter/options/currency/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/options/date-range/date-range.component.mjs +65 -0
- package/esm2020/lib/components/shared/filter/options/date-range/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/options/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/options/input/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/options/input/input.component.mjs +46 -0
- package/esm2020/lib/components/shared/filter/options/options.component.mjs +68 -0
- package/esm2020/lib/components/shared/filter/options/options.module.mjs +95 -0
- package/esm2020/lib/components/shared/filter/options/status/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/options/status/status.component.mjs +66 -0
- package/esm2020/lib/components/shared/filter/selected/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/selected/item/children/children.component.mjs +57 -0
- package/esm2020/lib/components/shared/filter/selected/item/children/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/selected/item/currency/currency.component.mjs +29 -0
- package/esm2020/lib/components/shared/filter/selected/item/currency/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/selected/item/date-range/date-range.component.mjs +42 -0
- package/esm2020/lib/components/shared/filter/selected/item/date-range/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.mjs +33 -0
- package/esm2020/lib/components/shared/filter/selected/item/date-with-action/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/selected/item/index.mjs +8 -0
- package/esm2020/lib/components/shared/filter/selected/item/input/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/selected/item/input/input.component.mjs +28 -0
- package/esm2020/lib/components/shared/filter/selected/item/item.component.mjs +74 -0
- package/esm2020/lib/components/shared/filter/selected/item/status/index.mjs +2 -0
- package/esm2020/lib/components/shared/filter/selected/item/status/status.component.mjs +39 -0
- package/esm2020/lib/components/shared/filter/selected/selected.component.mjs +80 -0
- package/esm2020/lib/components/shared/filter/selected/selected.module.mjs +90 -0
- package/esm2020/lib/components/shared/index.mjs +5 -0
- package/esm2020/lib/components/shared/password-strength/index.mjs +3 -0
- package/esm2020/lib/components/shared/password-strength/password-strength.component.mjs +85 -0
- package/esm2020/lib/components/shared/password-strength/password-strength.mjs +2 -0
- package/esm2020/lib/components/shared/password-strength/password-strength.module.mjs +50 -0
- package/esm2020/lib/components/shared/products/filter/filter.component.mjs +36 -0
- package/esm2020/lib/components/shared/products/index.mjs +3 -0
- package/esm2020/lib/components/shared/products/products.component.mjs +91 -0
- package/esm2020/lib/components/shared/products/products.module.mjs +22 -0
- package/esm2020/lib/components/shared/products/providers/index.mjs +2 -0
- package/esm2020/lib/components/shared/products/providers/products.model.mjs +38 -0
- package/esm2020/lib/components/shared/progress-bar/index.mjs +4 -0
- package/esm2020/lib/components/shared/progress-bar/progress-bar.component.mjs +28 -0
- package/esm2020/lib/components/shared/progress-bar/progress-bar.module.mjs +18 -0
- package/esm2020/lib/components/shared/progress-bar/progress-bar.service.mjs +49 -0
- package/esm2020/lib/interfaces/field-config.mjs +2 -0
- package/esm2020/lib/interfaces/index.mjs +2 -0
- package/esm2020/monkey-front-components.mjs +5 -0
- package/esm2020/public-api.mjs +5 -0
- package/fesm2015/monkey-front-components.mjs +2877 -0
- package/fesm2015/monkey-front-components.mjs.map +1 -0
- package/fesm2020/monkey-front-components.mjs +2859 -0
- package/fesm2020/monkey-front-components.mjs.map +1 -0
- package/lib/components/base/base-component.d.ts +50 -0
- package/lib/components/base/base-dynamic-array.d.ts +34 -0
- package/lib/components/base/base-dynamic.d.ts +24 -0
- package/lib/components/base/base-scroll-component.d.ts +16 -0
- package/lib/components/base/base-validators.d.ts +1 -0
- package/{src/lib/components/base/index.ts → lib/components/base/index.d.ts} +5 -5
- package/lib/components/dynamic/button/button.component.d.ts +17 -0
- package/{src/lib/components/dynamic/button/index.ts → lib/components/dynamic/button/index.d.ts} +1 -1
- package/lib/components/dynamic/dynamic-directive.d.ts +22 -0
- package/lib/components/dynamic/dynamic.module.d.ts +20 -0
- package/lib/components/dynamic/file-upload/file-upload.component.d.ts +17 -0
- package/{src/lib/components/dynamic/file-upload/index.ts → lib/components/dynamic/file-upload/index.d.ts} +1 -1
- package/lib/components/dynamic/form/dynamic-form-array.component.d.ts +16 -0
- package/lib/components/dynamic/form/dynamic-form.component.d.ts +14 -0
- package/{src/lib/components/dynamic/form/index.ts → lib/components/dynamic/form/index.d.ts} +2 -2
- package/{src/lib/components/dynamic/index.ts → lib/components/dynamic/index.d.ts} +8 -8
- package/{src/lib/components/dynamic/input/index.ts → lib/components/dynamic/input/index.d.ts} +1 -1
- package/lib/components/dynamic/input/input.component.d.ts +20 -0
- package/{src/lib/components/dynamic/input-phone/index.ts → lib/components/dynamic/input-phone/index.d.ts} +1 -1
- package/lib/components/dynamic/input-phone/input-phone.component.d.ts +20 -0
- package/{src/lib/components/dynamic/radio/index.ts → lib/components/dynamic/radio/index.d.ts} +1 -1
- package/lib/components/dynamic/radio/radio.component.d.ts +11 -0
- package/{src/lib/components/dynamic/select/index.ts → lib/components/dynamic/select/index.d.ts} +1 -1
- package/lib/components/dynamic/select/select.component.d.ts +16 -0
- package/{src/lib/components/dynamic/select-search/index.ts → lib/components/dynamic/select-search/index.d.ts} +1 -1
- package/lib/components/dynamic/select-search/select-search.component.d.ts +16 -0
- package/{src/lib/components/index.ts → lib/components/index.d.ts} +3 -3
- package/lib/components/shared/filter/filter.component.d.ts +32 -0
- package/lib/components/shared/filter/filter.module.d.ts +14 -0
- package/{src/lib/components/shared/filter/index.ts → lib/components/shared/filter/index.d.ts} +2 -2
- package/{src/lib/components/shared/filter/menu/index.ts → lib/components/shared/filter/menu/index.d.ts} +1 -1
- package/lib/components/shared/filter/menu/menu.component.d.ts +24 -0
- package/lib/components/shared/filter/menu/menu.module.d.ts +14 -0
- package/lib/components/shared/filter/options/children/children.component.d.ts +17 -0
- package/{src/lib/components/shared/filter/options/children/index.ts → lib/components/shared/filter/options/children/index.d.ts} +1 -1
- package/lib/components/shared/filter/options/currency/currency.component.d.ts +17 -0
- package/{src/lib/components/shared/filter/options/currency/index.ts → lib/components/shared/filter/options/currency/index.d.ts} +1 -1
- package/lib/components/shared/filter/options/date-range/date-range.component.d.ts +24 -0
- package/{src/lib/components/shared/filter/options/date-range/index.ts → lib/components/shared/filter/options/date-range/index.d.ts} +1 -1
- package/{src/lib/components/shared/filter/options/index.ts → lib/components/shared/filter/options/index.d.ts} +1 -1
- package/{src/lib/components/shared/filter/options/input/index.ts → lib/components/shared/filter/options/input/index.d.ts} +1 -1
- package/lib/components/shared/filter/options/input/input.component.d.ts +17 -0
- package/lib/components/shared/filter/options/options.component.d.ts +20 -0
- package/lib/components/shared/filter/options/options.module.d.ts +18 -0
- package/{src/lib/components/shared/filter/options/status/index.ts → lib/components/shared/filter/options/status/index.d.ts} +1 -1
- package/lib/components/shared/filter/options/status/status.component.d.ts +19 -0
- package/{src/lib/components/shared/filter/selected/index.ts → lib/components/shared/filter/selected/index.d.ts} +1 -1
- package/lib/components/shared/filter/selected/item/children/children.component.d.ts +16 -0
- package/{src/lib/components/shared/filter/selected/item/children/index.ts → lib/components/shared/filter/selected/item/children/index.d.ts} +1 -1
- package/lib/components/shared/filter/selected/item/currency/currency.component.d.ts +11 -0
- package/{src/lib/components/shared/filter/selected/item/currency/index.ts → lib/components/shared/filter/selected/item/currency/index.d.ts} +1 -1
- package/lib/components/shared/filter/selected/item/date-range/date-range.component.d.ts +12 -0
- package/{src/lib/components/shared/filter/selected/item/date-range/index.ts → lib/components/shared/filter/selected/item/date-range/index.d.ts} +1 -1
- package/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.d.ts +11 -0
- package/{src/lib/components/shared/filter/selected/item/date-with-action/index.ts → lib/components/shared/filter/selected/item/date-with-action/index.d.ts} +1 -1
- package/{src/lib/components/shared/filter/selected/item/index.ts → lib/components/shared/filter/selected/item/index.d.ts} +7 -7
- package/{src/lib/components/shared/filter/selected/item/input/index.ts → lib/components/shared/filter/selected/item/input/index.d.ts} +1 -1
- package/lib/components/shared/filter/selected/item/input/input.component.d.ts +11 -0
- package/lib/components/shared/filter/selected/item/item.component.d.ts +20 -0
- package/{src/lib/components/shared/filter/selected/item/status/index.ts → lib/components/shared/filter/selected/item/status/index.d.ts} +1 -1
- package/lib/components/shared/filter/selected/item/status/status.component.d.ts +13 -0
- package/lib/components/shared/filter/selected/selected.component.d.ts +18 -0
- package/lib/components/shared/filter/selected/selected.module.d.ts +21 -0
- package/{src/lib/components/shared/index.ts → lib/components/shared/index.d.ts} +4 -4
- package/{src/lib/components/shared/password-strength/index.ts → lib/components/shared/password-strength/index.d.ts} +2 -2
- package/lib/components/shared/password-strength/password-strength.component.d.ts +23 -0
- package/lib/components/shared/password-strength/password-strength.d.ts +5 -0
- package/lib/components/shared/password-strength/password-strength.module.d.ts +12 -0
- package/lib/components/shared/products/filter/filter.component.d.ts +12 -0
- package/{src/lib/components/shared/products/index.ts → lib/components/shared/products/index.d.ts} +2 -2
- package/lib/components/shared/products/products.component.d.ts +20 -0
- package/lib/components/shared/products/products.module.d.ts +11 -0
- package/{src/lib/components/shared/products/providers/index.ts → lib/components/shared/products/providers/index.d.ts} +1 -1
- package/lib/components/shared/products/providers/products.model.d.ts +13 -0
- package/{src/lib/components/shared/progress-bar/index.ts → lib/components/shared/progress-bar/index.d.ts} +3 -3
- package/lib/components/shared/progress-bar/progress-bar.component.d.ts +12 -0
- package/lib/components/shared/progress-bar/progress-bar.module.d.ts +8 -0
- package/lib/components/shared/progress-bar/progress-bar.service.d.ts +14 -0
- package/lib/interfaces/field-config.d.ts +54 -0
- package/{src/lib/interfaces/index.ts → lib/interfaces/index.d.ts} +1 -1
- package/monkey-front-components-0.0.387.tgz +0 -0
- package/monkey-front-components.d.ts +5 -0
- package/package.json +25 -5
- package/public-api.d.ts +1 -0
- package/karma.conf.js +0 -44
- package/monkey-front-components-0.0.384.tgz +0 -0
- package/ng-package.json +0 -10
- package/src/lib/components/base/base-component.ts +0 -359
- package/src/lib/components/base/base-dynamic-array.ts +0 -233
- package/src/lib/components/base/base-dynamic.ts +0 -90
- package/src/lib/components/base/base-scroll-component.ts +0 -52
- package/src/lib/components/base/base-validators.ts +0 -19
- package/src/lib/components/dynamic/button/button.component.html +0 -4
- package/src/lib/components/dynamic/button/button.component.scss +0 -7
- package/src/lib/components/dynamic/button/button.component.ts +0 -47
- package/src/lib/components/dynamic/dynamic-directive.ts +0 -102
- package/src/lib/components/dynamic/dynamic.module.ts +0 -53
- package/src/lib/components/dynamic/file-upload/file-upload.component.html +0 -10
- package/src/lib/components/dynamic/file-upload/file-upload.component.ts +0 -46
- package/src/lib/components/dynamic/form/dynamic-form-array.component.html +0 -19
- package/src/lib/components/dynamic/form/dynamic-form-array.component.scss +0 -10
- package/src/lib/components/dynamic/form/dynamic-form-array.component.ts +0 -75
- package/src/lib/components/dynamic/form/dynamic-form.component.html +0 -7
- package/src/lib/components/dynamic/form/dynamic-form.component.ts +0 -49
- package/src/lib/components/dynamic/input/input.component.html +0 -9
- package/src/lib/components/dynamic/input/input.component.ts +0 -58
- package/src/lib/components/dynamic/input-phone/input-phone.component.html +0 -7
- package/src/lib/components/dynamic/input-phone/input-phone.component.ts +0 -58
- package/src/lib/components/dynamic/radio/radio.component.html +0 -8
- package/src/lib/components/dynamic/radio/radio.component.ts +0 -22
- package/src/lib/components/dynamic/select/select.component.html +0 -14
- package/src/lib/components/dynamic/select/select.component.ts +0 -75
- package/src/lib/components/dynamic/select-search/select-search.component.html +0 -15
- package/src/lib/components/dynamic/select-search/select-search.component.ts +0 -76
- package/src/lib/components/shared/filter/filter.component.html +0 -51
- package/src/lib/components/shared/filter/filter.component.scss +0 -79
- package/src/lib/components/shared/filter/filter.component.ts +0 -117
- package/src/lib/components/shared/filter/filter.module.ts +0 -36
- package/src/lib/components/shared/filter/menu/menu.component.html +0 -28
- package/src/lib/components/shared/filter/menu/menu.component.scss +0 -62
- package/src/lib/components/shared/filter/menu/menu.component.ts +0 -122
- package/src/lib/components/shared/filter/menu/menu.module.ts +0 -41
- package/src/lib/components/shared/filter/options/children/children.component.html +0 -6
- package/src/lib/components/shared/filter/options/children/children.component.scss +0 -30
- package/src/lib/components/shared/filter/options/children/children.component.ts +0 -58
- package/src/lib/components/shared/filter/options/currency/currency.component.html +0 -3
- package/src/lib/components/shared/filter/options/currency/currency.component.scss +0 -19
- package/src/lib/components/shared/filter/options/currency/currency.component.ts +0 -52
- package/src/lib/components/shared/filter/options/date-range/date-range.component.html +0 -3
- package/src/lib/components/shared/filter/options/date-range/date-range.component.scss +0 -34
- package/src/lib/components/shared/filter/options/date-range/date-range.component.ts +0 -72
- package/src/lib/components/shared/filter/options/input/input.component.html +0 -3
- package/src/lib/components/shared/filter/options/input/input.component.scss +0 -19
- package/src/lib/components/shared/filter/options/input/input.component.ts +0 -52
- package/src/lib/components/shared/filter/options/options.component.html +0 -43
- package/src/lib/components/shared/filter/options/options.component.scss +0 -56
- package/src/lib/components/shared/filter/options/options.component.ts +0 -58
- package/src/lib/components/shared/filter/options/options.module.ts +0 -58
- package/src/lib/components/shared/filter/options/status/status.component.html +0 -4
- package/src/lib/components/shared/filter/options/status/status.component.scss +0 -29
- package/src/lib/components/shared/filter/options/status/status.component.ts +0 -73
- package/src/lib/components/shared/filter/selected/item/children/children.component.html +0 -19
- package/src/lib/components/shared/filter/selected/item/children/children.component.scss +0 -68
- package/src/lib/components/shared/filter/selected/item/children/children.component.ts +0 -49
- package/src/lib/components/shared/filter/selected/item/currency/currency.component.html +0 -1
- package/src/lib/components/shared/filter/selected/item/currency/currency.component.scss +0 -4
- package/src/lib/components/shared/filter/selected/item/currency/currency.component.ts +0 -26
- package/src/lib/components/shared/filter/selected/item/date-range/date-range.component.html +0 -2
- package/src/lib/components/shared/filter/selected/item/date-range/date-range.component.scss +0 -4
- package/src/lib/components/shared/filter/selected/item/date-range/date-range.component.ts +0 -39
- package/src/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.html +0 -1
- package/src/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.scss +0 -4
- package/src/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.ts +0 -29
- package/src/lib/components/shared/filter/selected/item/input/input.component.html +0 -1
- package/src/lib/components/shared/filter/selected/item/input/input.component.scss +0 -4
- package/src/lib/components/shared/filter/selected/item/input/input.component.ts +0 -26
- package/src/lib/components/shared/filter/selected/item/item.component.html +0 -38
- package/src/lib/components/shared/filter/selected/item/item.component.scss +0 -72
- package/src/lib/components/shared/filter/selected/item/item.component.ts +0 -71
- package/src/lib/components/shared/filter/selected/item/status/status.component.html +0 -1
- package/src/lib/components/shared/filter/selected/item/status/status.component.scss +0 -4
- package/src/lib/components/shared/filter/selected/item/status/status.component.ts +0 -36
- package/src/lib/components/shared/filter/selected/selected.component.html +0 -3
- package/src/lib/components/shared/filter/selected/selected.component.scss +0 -9
- package/src/lib/components/shared/filter/selected/selected.component.ts +0 -76
- package/src/lib/components/shared/filter/selected/selected.module.ts +0 -60
- package/src/lib/components/shared/password-strength/password-strength.component.html +0 -50
- package/src/lib/components/shared/password-strength/password-strength.component.scss +0 -70
- package/src/lib/components/shared/password-strength/password-strength.component.ts +0 -89
- package/src/lib/components/shared/password-strength/password-strength.module.ts +0 -24
- package/src/lib/components/shared/password-strength/password-strength.ts +0 -5
- package/src/lib/components/shared/products/filter/filter.component.html +0 -6
- package/src/lib/components/shared/products/filter/filter.component.scss +0 -20
- package/src/lib/components/shared/products/filter/filter.component.ts +0 -34
- package/src/lib/components/shared/products/products.component.html +0 -15
- package/src/lib/components/shared/products/products.component.scss +0 -70
- package/src/lib/components/shared/products/products.component.ts +0 -104
- package/src/lib/components/shared/products/products.module.ts +0 -13
- package/src/lib/components/shared/products/providers/products.model.ts +0 -60
- package/src/lib/components/shared/progress-bar/progress-bar.component.html +0 -3
- package/src/lib/components/shared/progress-bar/progress-bar.component.scss +0 -6
- package/src/lib/components/shared/progress-bar/progress-bar.component.ts +0 -27
- package/src/lib/components/shared/progress-bar/progress-bar.module.ts +0 -10
- package/src/lib/components/shared/progress-bar/progress-bar.service.ts +0 -59
- package/src/lib/interfaces/field-config.ts +0 -58
- package/src/public-api.ts +0 -5
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -20
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { MonkeyEcxFilterMenu, MonkeyEcxFilterMenuChildren, MonkeyEcxUtils } from 'monkey-front-core';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'mecx-filter-menu',
|
|
6
|
-
templateUrl: './menu.component.html',
|
|
7
|
-
styleUrls: ['./menu.component.scss']
|
|
8
|
-
})
|
|
9
|
-
export class MECXFilterMenuComponent implements OnChanges {
|
|
10
|
-
@Input() model: MonkeyEcxFilterMenu[] = [];
|
|
11
|
-
|
|
12
|
-
@Output() onClose = new EventEmitter<any>();
|
|
13
|
-
|
|
14
|
-
@Output() onSubmit = new EventEmitter<any>();
|
|
15
|
-
|
|
16
|
-
_onHandleSubmit: Function = null;
|
|
17
|
-
|
|
18
|
-
_model: MonkeyEcxFilterMenu[] = [];
|
|
19
|
-
|
|
20
|
-
_showMenu = false;
|
|
21
|
-
|
|
22
|
-
_menuOption: MonkeyEcxFilterMenu | MonkeyEcxFilterMenuChildren = null;
|
|
23
|
-
|
|
24
|
-
closeMenu = () => {
|
|
25
|
-
this._showMenu = false;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
constructor() {
|
|
29
|
-
// not to do
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
private validateValue({ field, value, getValue }: any) {
|
|
33
|
-
try {
|
|
34
|
-
value = value || getValue()?.[field];
|
|
35
|
-
if (!value) return false;
|
|
36
|
-
if (typeof value === 'object') {
|
|
37
|
-
return value && JSON.stringify(value) !== '{}';
|
|
38
|
-
}
|
|
39
|
-
return MonkeyEcxUtils.persistNullEmptyUndefined(value);
|
|
40
|
-
} catch (e) {
|
|
41
|
-
// not to do
|
|
42
|
-
}
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
private onHandleSubmitValue(value: any) {
|
|
47
|
-
this.onSubmit.next(value);
|
|
48
|
-
this.onHandleClose();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
private onHandleMenus(value: any[]) {
|
|
52
|
-
this._model = value?.map((_: any) => {
|
|
53
|
-
const { children } = _;
|
|
54
|
-
let obj = null;
|
|
55
|
-
if (children) {
|
|
56
|
-
obj = {
|
|
57
|
-
..._,
|
|
58
|
-
children: children?.filter((_: any) => {
|
|
59
|
-
return !this.validateValue(_);
|
|
60
|
-
})
|
|
61
|
-
};
|
|
62
|
-
} else if (!this.validateValue(_)) {
|
|
63
|
-
obj = {
|
|
64
|
-
..._,
|
|
65
|
-
...obj || {}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return obj;
|
|
70
|
-
})?.filter((_) => {
|
|
71
|
-
return _;
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
this._model = this._model?.sort((a, b) => {
|
|
75
|
-
const groupA = `${a?.group}`.toLowerCase();
|
|
76
|
-
const groupB = `${b?.group}`.toLowerCase();
|
|
77
|
-
return groupA !== groupB ? 1 : -1;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
82
|
-
if (changes.model) {
|
|
83
|
-
const { currentValue } = changes.model;
|
|
84
|
-
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
85
|
-
this.onHandleMenus(currentValue);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
onHandleChildrenAction(option: MonkeyEcxFilterMenu, child: MonkeyEcxFilterMenuChildren) {
|
|
91
|
-
const { field, type, action } = child;
|
|
92
|
-
if (type === 'with-action') {
|
|
93
|
-
this.onHandleSubmitValue({
|
|
94
|
-
[option.field]: JSON.stringify({
|
|
95
|
-
[field]: action()
|
|
96
|
-
})
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
this._showMenu = true;
|
|
100
|
-
this._menuOption = child;
|
|
101
|
-
this.onHandleSubmit = (event: any) => {
|
|
102
|
-
this.onHandleSubmitValue({
|
|
103
|
-
[option.field]: JSON.stringify(event)
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
onHandleShowMenu(option: MonkeyEcxFilterMenu) {
|
|
110
|
-
this._showMenu = true;
|
|
111
|
-
this._menuOption = option;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
onHandleClose() {
|
|
115
|
-
this._showMenu = false;
|
|
116
|
-
this.onClose.next();
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
onHandleSubmit(event: any) {
|
|
120
|
-
this.onHandleSubmitValue(event);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { RouterModule } from '@angular/router';
|
|
3
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
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 { MECXFilterOptionsModule } from '../options';
|
|
18
|
-
import { MECXFilterMenuComponent } from './menu.component';
|
|
19
|
-
|
|
20
|
-
@NgModule({
|
|
21
|
-
declarations: [MECXFilterMenuComponent],
|
|
22
|
-
imports: [
|
|
23
|
-
CommonModule,
|
|
24
|
-
FormsModule,
|
|
25
|
-
ReactiveFormsModule,
|
|
26
|
-
MonkeyEcxDirectivesModule,
|
|
27
|
-
MonkeyButtonModule,
|
|
28
|
-
MonkeyBadgeModule,
|
|
29
|
-
MonkeyIconModule,
|
|
30
|
-
MonkeyInputModule,
|
|
31
|
-
MonkeyCheckboxModule,
|
|
32
|
-
MonkeySelectModule,
|
|
33
|
-
MonkeyOptionModule,
|
|
34
|
-
MonkeyDateRangePickerModule,
|
|
35
|
-
RouterModule,
|
|
36
|
-
MECXFilterOptionsModule,
|
|
37
|
-
TranslateModule.forChild()
|
|
38
|
-
],
|
|
39
|
-
exports: [MECXFilterMenuComponent]
|
|
40
|
-
})
|
|
41
|
-
export class MECXFilterMenuModule {}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
@import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
min-width: 180px;
|
|
7
|
-
|
|
8
|
-
.item {
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
font-style: normal;
|
|
11
|
-
font-weight: 400;
|
|
12
|
-
font-size: 16px;
|
|
13
|
-
line-height: 24px;
|
|
14
|
-
color: #72717e;
|
|
15
|
-
padding: 8px 24px 8px 24px;
|
|
16
|
-
|
|
17
|
-
&.selected {
|
|
18
|
-
cursor: not-allowed !important;
|
|
19
|
-
background-color: map-get($mecx-theme, 400) !important;
|
|
20
|
-
color: map-get(map-get($mecx-theme, contrast), main) !important;
|
|
21
|
-
font-weight: 400;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
background-color: map-get($mecx-theme, 100) !important;
|
|
26
|
-
color: #72717e !important;
|
|
27
|
-
font-weight: 400;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } 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-children',
|
|
8
|
-
templateUrl: './children.component.html',
|
|
9
|
-
styleUrls: ['./children.component.scss']
|
|
10
|
-
})
|
|
11
|
-
export class MECXFilterOptionsChildrenComponent implements OnInit, OnDestroy {
|
|
12
|
-
@Input() option: MonkeyEcxFilterMenu = null;
|
|
13
|
-
|
|
14
|
-
@Output() onSubmit = new EventEmitter<any>();
|
|
15
|
-
|
|
16
|
-
@Output() onShow = new EventEmitter<any>();
|
|
17
|
-
|
|
18
|
-
private eventHandle = new EventEmitter<any>();
|
|
19
|
-
|
|
20
|
-
private eventSubscription: Subscription;
|
|
21
|
-
|
|
22
|
-
constructor() {
|
|
23
|
-
// not to do
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
ngOnInit() {
|
|
27
|
-
const {
|
|
28
|
-
eventHandle,
|
|
29
|
-
onSubmit,
|
|
30
|
-
option: { field }
|
|
31
|
-
} = this;
|
|
32
|
-
|
|
33
|
-
this.eventSubscription = eventHandle.pipe(debounceTime(100)).subscribe((value: any) => {
|
|
34
|
-
onSubmit.next({ [field]: value });
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
ngOnDestroy() {
|
|
39
|
-
this.eventSubscription.unsubscribe();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
onHandleChildrenAction(child: any) {
|
|
43
|
-
const { field, type, action } = child;
|
|
44
|
-
if (type === 'with-action') {
|
|
45
|
-
this.eventHandle.next(
|
|
46
|
-
JSON.stringify({
|
|
47
|
-
[field]: action()
|
|
48
|
-
})
|
|
49
|
-
);
|
|
50
|
-
} else {
|
|
51
|
-
this.onShow.next(child);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
onHandleValidateSelected({ field, getValue }: any) {
|
|
56
|
-
return !!getValue()?.[field];
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
padding: 12px 12px 8px 12px;
|
|
9
|
-
color: #72717e;
|
|
10
|
-
|
|
11
|
-
.title {
|
|
12
|
-
color: #4b4a53;
|
|
13
|
-
font-size: 18px;
|
|
14
|
-
line-height: 21px;
|
|
15
|
-
font-weight: 500;
|
|
16
|
-
text-align: left;
|
|
17
|
-
margin-bottom: 4px;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
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-currency',
|
|
8
|
-
templateUrl: './currency.component.html',
|
|
9
|
-
styleUrls: ['./currency.component.scss']
|
|
10
|
-
})
|
|
11
|
-
export class MECXFilterOptionsCurrencyComponent implements OnInit, OnChanges, OnDestroy {
|
|
12
|
-
@Input() option: MonkeyEcxFilterMenu = null;
|
|
13
|
-
|
|
14
|
-
@Output() onSubmit = new EventEmitter<any>();
|
|
15
|
-
|
|
16
|
-
_value = 0;
|
|
17
|
-
|
|
18
|
-
private eventHandle = new EventEmitter<any>();
|
|
19
|
-
|
|
20
|
-
private eventSubscription: Subscription;
|
|
21
|
-
|
|
22
|
-
constructor() {
|
|
23
|
-
// not to do
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
ngOnInit() {
|
|
27
|
-
const { eventHandle, onSubmit, option: { field } } = this;
|
|
28
|
-
|
|
29
|
-
this.eventSubscription = eventHandle
|
|
30
|
-
.pipe(debounceTime(800))
|
|
31
|
-
.subscribe((value: number) => {
|
|
32
|
-
onSubmit.next({ [field]: value });
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
ngOnDestroy() {
|
|
37
|
-
this.eventSubscription.unsubscribe();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
41
|
-
if (changes.option) {
|
|
42
|
-
const { currentValue } = changes.option;
|
|
43
|
-
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
44
|
-
this._value = currentValue?.value;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
onChangeFilter(value: number) {
|
|
50
|
-
this.eventHandle.next(value);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
@import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
padding: 12px 12px 8px 12px;
|
|
7
|
-
|
|
8
|
-
.title {
|
|
9
|
-
color: #4b4a53;
|
|
10
|
-
font-size: 18px;
|
|
11
|
-
line-height: 21px;
|
|
12
|
-
font-weight: 500;
|
|
13
|
-
text-align: left;
|
|
14
|
-
margin-bottom: 4px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
::ng-deep mecx-date-range-picker-group-action {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
::ng-deep
|
|
22
|
-
monkey-date-range-picker
|
|
23
|
-
mecx-date-range-picker-group
|
|
24
|
-
mecx-date-range-picker-group-info {
|
|
25
|
-
display: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
::ng-deep
|
|
29
|
-
monkey-date-range-picker
|
|
30
|
-
mecx-date-range-picker-group
|
|
31
|
-
mecx-date-range-picker-group-header {
|
|
32
|
-
display: none;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { MonkeyEcxFilterMenu, MonkeyEcxFilterMenuChildren, MonkeyEcxUtils } from 'monkey-front-core';
|
|
4
|
-
import { Subscription } from 'rxjs';
|
|
5
|
-
import { debounceTime } from 'rxjs/operators';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'mecx-filter-options-date-range',
|
|
9
|
-
templateUrl: './date-range.component.html',
|
|
10
|
-
styleUrls: ['./date-range.component.scss']
|
|
11
|
-
})
|
|
12
|
-
export class MECXFilterOptionsDateRangeComponent implements OnInit, OnChanges, OnDestroy {
|
|
13
|
-
@Input() option: MonkeyEcxFilterMenu | MonkeyEcxFilterMenuChildren = null;
|
|
14
|
-
|
|
15
|
-
@Output() onSubmit = new EventEmitter<any>();
|
|
16
|
-
|
|
17
|
-
_value: any = {
|
|
18
|
-
startDate: null,
|
|
19
|
-
endDate: null
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
_form: FormGroup;
|
|
23
|
-
|
|
24
|
-
_moveDaysForward = true;
|
|
25
|
-
|
|
26
|
-
private eventHandle = new EventEmitter<any>();
|
|
27
|
-
|
|
28
|
-
private eventSubscription: Subscription;
|
|
29
|
-
|
|
30
|
-
constructor() {
|
|
31
|
-
// not to do
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
private onHandleSelectedValue({ field, value, getValue }: any) {
|
|
35
|
-
try {
|
|
36
|
-
value = value || getValue()?.[field];
|
|
37
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
38
|
-
this._value = JSON.parse(value);
|
|
39
|
-
}
|
|
40
|
-
} catch (e) {
|
|
41
|
-
// not to do
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
ngOnInit() {
|
|
46
|
-
const { eventHandle, onSubmit, option: { field } } = this;
|
|
47
|
-
|
|
48
|
-
this.eventSubscription = eventHandle
|
|
49
|
-
.pipe(debounceTime(800))
|
|
50
|
-
.subscribe((value: number) => {
|
|
51
|
-
onSubmit.next({ [field]: value });
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
ngOnDestroy() {
|
|
56
|
-
this.eventSubscription.unsubscribe();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
60
|
-
if (changes.option) {
|
|
61
|
-
const { currentValue } = changes.option;
|
|
62
|
-
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
63
|
-
this.onHandleSelectedValue(currentValue);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
onChangeFilter(value: { startDate: string, endDate: string }) {
|
|
69
|
-
if (!value?.endDate) return;
|
|
70
|
-
this.eventHandle.next(JSON.stringify(value));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
padding: 12px 12px 8px 12px;
|
|
9
|
-
color: #72717e;
|
|
10
|
-
|
|
11
|
-
.title {
|
|
12
|
-
color: #4b4a53;
|
|
13
|
-
font-size: 18px;
|
|
14
|
-
line-height: 21px;
|
|
15
|
-
font-weight: 500;
|
|
16
|
-
text-align: left;
|
|
17
|
-
margin-bottom: 4px;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
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-input',
|
|
8
|
-
templateUrl: './input.component.html',
|
|
9
|
-
styleUrls: ['./input.component.scss']
|
|
10
|
-
})
|
|
11
|
-
export class MECXFilterOptionsInputComponent 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
|
-
ngOnInit() {
|
|
27
|
-
const { eventHandle, onSubmit, option: { field } } = this;
|
|
28
|
-
|
|
29
|
-
this.eventSubscription = eventHandle
|
|
30
|
-
.pipe(debounceTime(800))
|
|
31
|
-
.subscribe((value: string) => {
|
|
32
|
-
onSubmit.next({ [field]: value });
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
ngOnDestroy() {
|
|
37
|
-
this.eventSubscription.unsubscribe();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
41
|
-
if (changes.option) {
|
|
42
|
-
const { currentValue } = changes.option;
|
|
43
|
-
if (currentValue && JSON.stringify(currentValue) !== '{}') {
|
|
44
|
-
this._value = currentValue?.value;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
onChangeFilter(value: number) {
|
|
50
|
-
this.eventHandle.next(value);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<div class="d-flex justify-content-between header">
|
|
2
|
-
<span class="title">
|
|
3
|
-
{{ option?.label | translate }}
|
|
4
|
-
</span>
|
|
5
|
-
<div class="close" #actionElement (click)="onHandleShowMenu()">
|
|
6
|
-
<monkey-icon icon="close-12" color="#474747"></monkey-icon>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<ng-container *ngIf="option?.type as type">
|
|
10
|
-
<ng-container *ngIf="option?.children; else withoutChildren">
|
|
11
|
-
<mecx-filter-options-children [option]="option" (onSubmit)="onHandleSubmitChildren($event)"
|
|
12
|
-
(onShow)="onShowFromChildren.next($event)">
|
|
13
|
-
</mecx-filter-options-children>
|
|
14
|
-
</ng-container>
|
|
15
|
-
<ng-template #withoutChildren>
|
|
16
|
-
<ng-container [ngSwitch]="type">
|
|
17
|
-
<mecx-filter-options-status *ngSwitchCase="'status'" [option]="option"
|
|
18
|
-
(onSubmit)="onHandleSubmit($event)">
|
|
19
|
-
</mecx-filter-options-status>
|
|
20
|
-
<mecx-filter-options-date-range *ngSwitchCase="'date-range'" [option]="option"
|
|
21
|
-
(onSubmit)="onHandleSubmit($event)">
|
|
22
|
-
</mecx-filter-options-date-range>
|
|
23
|
-
<mecx-filter-options-currency *ngSwitchCase="'currency'" [option]="option"
|
|
24
|
-
(onSubmit)="onHandleSubmit($event)">
|
|
25
|
-
</mecx-filter-options-currency>
|
|
26
|
-
<mecx-filter-options-input *ngSwitchCase="'input'" [option]="option"
|
|
27
|
-
(onSubmit)="onHandleSubmit($event)">
|
|
28
|
-
</mecx-filter-options-input>
|
|
29
|
-
</ng-container>
|
|
30
|
-
</ng-template>
|
|
31
|
-
</ng-container>
|
|
32
|
-
|
|
33
|
-
<ng-container
|
|
34
|
-
*monkeyecxPopover="_showMenu; target: $any(actionElement); closed: closeMenu; dir: 'ltr'">
|
|
35
|
-
<div class="close-menu">
|
|
36
|
-
<monkey-button type="tertiary" color="error" (click)="onRemove.next()" size="sm">
|
|
37
|
-
{{ 'BUTTONS.REMOVE' | translate }}
|
|
38
|
-
</monkey-button>
|
|
39
|
-
<monkey-button type="tertiary" color="theme" (click)="onClose.next()" size="sm">
|
|
40
|
-
{{ 'BUTTONS.CLOSE' | translate }}
|
|
41
|
-
</monkey-button>
|
|
42
|
-
</div>
|
|
43
|
-
</ng-container>
|
|
@@ -1,56 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
}
|