@wavemaker-ai/app-ng-runtime 12.0.2-rc.647771 → 12.1.0-rc.647821
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-task/bundles/index.umd.js +2489 -2963
- package/build-task/fesm2022/index.mjs +2307 -2786
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/build-task/types/index.d.ts +401 -844
- package/components/advanced/carousel/bundles/index.umd.js +387 -344
- package/components/advanced/carousel/fesm2022/index.mjs +363 -325
- package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
- package/components/advanced/carousel/types/index.d.ts +85 -86
- package/components/advanced/custom/bundles/index.umd.js +298 -249
- package/components/advanced/custom/fesm2022/index.mjs +280 -236
- package/components/advanced/custom/fesm2022/index.mjs.map +1 -1
- package/components/advanced/custom/types/index.d.ts +49 -49
- package/components/advanced/login/bundles/index.umd.js +177 -127
- package/components/advanced/login/fesm2022/index.mjs +162 -117
- package/components/advanced/login/fesm2022/index.mjs.map +1 -1
- package/components/advanced/login/types/index.d.ts +33 -34
- package/components/advanced/marquee/bundles/index.umd.js +93 -63
- package/components/advanced/marquee/fesm2022/index.mjs +73 -48
- package/components/advanced/marquee/fesm2022/index.mjs.map +1 -1
- package/components/advanced/marquee/types/index.d.ts +11 -12
- package/components/base/bundles/index.umd.js +5515 -6359
- package/components/base/fesm2022/index.mjs +5169 -6027
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/types/index.d.ts +1198 -1154
- package/components/basic/anchor/bundles/index.umd.js +273 -195
- package/components/basic/anchor/fesm2022/index.mjs +251 -178
- package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
- package/components/basic/anchor/types/index.d.ts +40 -41
- package/components/basic/audio/bundles/index.umd.js +124 -75
- package/components/basic/audio/fesm2022/index.mjs +104 -60
- package/components/basic/audio/fesm2022/index.mjs.map +1 -1
- package/components/basic/audio/types/index.d.ts +22 -23
- package/components/basic/html/bundles/index.umd.js +144 -113
- package/components/basic/html/fesm2022/index.mjs +125 -99
- package/components/basic/html/fesm2022/index.mjs.map +1 -1
- package/components/basic/html/types/index.d.ts +20 -17
- package/components/basic/icon/bundles/index.umd.js +144 -72
- package/components/basic/icon/fesm2022/index.mjs +124 -57
- package/components/basic/icon/fesm2022/index.mjs.map +1 -1
- package/components/basic/icon/types/index.d.ts +18 -19
- package/components/basic/iframe/bundles/index.umd.js +143 -93
- package/components/basic/iframe/fesm2022/index.mjs +124 -79
- package/components/basic/iframe/fesm2022/index.mjs.map +1 -1
- package/components/basic/iframe/types/index.d.ts +28 -29
- package/components/basic/label/bundles/index.umd.js +136 -120
- package/components/basic/label/fesm2022/index.mjs +118 -107
- package/components/basic/label/fesm2022/index.mjs.map +1 -1
- package/components/basic/label/types/index.d.ts +14 -15
- package/components/basic/picture/bundles/index.umd.js +171 -130
- package/components/basic/picture/fesm2022/index.mjs +152 -116
- package/components/basic/picture/fesm2022/index.mjs.map +1 -1
- package/components/basic/picture/types/index.d.ts +21 -22
- package/components/basic/progress/progress-bar/bundles/index.umd.js +211 -160
- package/components/basic/progress/progress-bar/fesm2022/index.mjs +193 -147
- package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-bar/types/index.d.ts +45 -41
- package/components/basic/progress/progress-circle/bundles/index.umd.js +294 -165
- package/components/basic/progress/progress-circle/fesm2022/index.mjs +274 -150
- package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-circle/types/index.d.ts +41 -42
- package/components/basic/progress/progress-utils/bundles/index.umd.js +27 -29
- package/components/basic/progress/progress-utils/fesm2022/index.mjs +18 -25
- package/components/basic/progress/progress-utils/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-utils/types/index.d.ts +3 -5
- package/components/basic/rich-text-editor/bundles/index.umd.js +294 -228
- package/components/basic/rich-text-editor/fesm2022/index.mjs +275 -214
- package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
- package/components/basic/rich-text-editor/types/index.d.ts +55 -56
- package/components/basic/search/bundles/index.umd.js +1129 -1090
- package/components/basic/search/fesm2022/index.mjs +1117 -1083
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/types/index.d.ts +132 -130
- package/components/basic/spinner/bundles/index.umd.js +216 -120
- package/components/basic/spinner/fesm2022/index.mjs +201 -110
- package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
- package/components/basic/spinner/types/index.d.ts +30 -31
- package/components/basic/tree/bundles/index.umd.js +756 -756
- package/components/basic/tree/fesm2022/index.mjs +740 -745
- package/components/basic/tree/fesm2022/index.mjs.map +1 -1
- package/components/basic/tree/types/index.d.ts +106 -97
- package/components/basic/video/bundles/index.umd.js +164 -108
- package/components/basic/video/fesm2022/index.mjs +145 -94
- package/components/basic/video/fesm2022/index.mjs.map +1 -1
- package/components/basic/video/types/index.d.ts +29 -30
- package/components/chart/bundles/index.umd.js +1768 -1737
- package/components/chart/fesm2022/index.mjs +1713 -1728
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/chart/types/index.d.ts +102 -104
- package/components/containers/accordion/bundles/index.umd.js +522 -494
- package/components/containers/accordion/fesm2022/index.mjs +502 -479
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/types/index.d.ts +116 -116
- package/components/containers/layout-grid/bundles/index.umd.js +260 -164
- package/components/containers/layout-grid/fesm2022/index.mjs +231 -140
- package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
- package/components/containers/layout-grid/types/index.d.ts +30 -27
- package/components/containers/linear-layout/bundles/index.umd.js +220 -178
- package/components/containers/linear-layout/fesm2022/index.mjs +193 -156
- package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
- package/components/containers/linear-layout/types/index.d.ts +26 -26
- package/components/containers/panel/bundles/index.umd.js +343 -215
- package/components/containers/panel/fesm2022/index.mjs +330 -207
- package/components/containers/panel/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/types/index.d.ts +48 -49
- package/components/containers/tabs/bundles/index.umd.js +832 -779
- package/components/containers/tabs/fesm2022/index.mjs +811 -763
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/tabs/types/index.d.ts +134 -126
- package/components/containers/tile/bundles/index.umd.js +93 -60
- package/components/containers/tile/fesm2022/index.mjs +75 -47
- package/components/containers/tile/fesm2022/index.mjs.map +1 -1
- package/components/containers/tile/types/index.d.ts +11 -12
- package/components/containers/wizard/bundles/index.umd.js +1096 -1078
- package/components/containers/wizard/fesm2022/index.mjs +1069 -1056
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/types/index.d.ts +258 -252
- package/components/data/card/bundles/index.umd.js +439 -229
- package/components/data/card/fesm2022/index.mjs +408 -203
- package/components/data/card/fesm2022/index.mjs.map +1 -1
- package/components/data/card/types/index.d.ts +50 -48
- package/components/data/form/bundles/index.umd.js +3392 -3339
- package/components/data/form/fesm2022/index.mjs +3350 -3304
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/types/index.d.ts +561 -482
- package/components/data/list/bundles/index.umd.js +1523 -1601
- package/components/data/list/fesm2022/index.mjs +1507 -1590
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/types/index.d.ts +300 -283
- package/components/data/live-table/bundles/index.umd.js +299 -280
- package/components/data/live-table/fesm2022/index.mjs +284 -270
- package/components/data/live-table/fesm2022/index.mjs.map +1 -1
- package/components/data/live-table/types/index.d.ts +42 -39
- package/components/data/pagination/bundles/index.umd.js +848 -881
- package/components/data/pagination/fesm2022/index.mjs +835 -879
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/types/index.d.ts +110 -106
- package/components/data/table/bundles/index.umd.js +4977 -5042
- package/components/data/table/fesm2022/index.mjs +4937 -5007
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/types/index.d.ts +770 -736
- package/components/dialogs/alert-dialog/bundles/index.umd.js +259 -118
- package/components/dialogs/alert-dialog/fesm2022/index.mjs +243 -109
- package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/alert-dialog/types/index.d.ts +31 -26
- package/components/dialogs/confirm-dialog/bundles/index.umd.js +250 -121
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs +236 -114
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/confirm-dialog/types/index.d.ts +34 -29
- package/components/dialogs/default/bundles/index.umd.js +509 -373
- package/components/dialogs/default/fesm2022/index.mjs +485 -354
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/default/types/index.d.ts +129 -86
- package/components/dialogs/design-dialog/bundles/index.umd.js +320 -142
- package/components/dialogs/design-dialog/fesm2022/index.mjs +305 -132
- package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/design-dialog/types/index.d.ts +31 -20
- package/components/dialogs/iframe-dialog/bundles/index.umd.js +258 -111
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs +245 -105
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/iframe-dialog/types/index.d.ts +27 -22
- package/components/dialogs/login-dialog/bundles/index.umd.js +139 -106
- package/components/dialogs/login-dialog/fesm2022/index.mjs +125 -97
- package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/login-dialog/types/index.d.ts +27 -26
- package/components/dialogs/partial-dialog/bundles/index.umd.js +302 -149
- package/components/dialogs/partial-dialog/fesm2022/index.mjs +289 -143
- package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/partial-dialog/types/index.d.ts +37 -32
- package/components/input/base-form/bundles/index.umd.js +143 -139
- package/components/input/base-form/fesm2022/index.mjs +129 -130
- package/components/input/base-form/fesm2022/index.mjs.map +1 -1
- package/components/input/base-form/types/index.d.ts +28 -29
- package/components/input/base-form-custom/bundles/index.umd.js +107 -121
- package/components/input/base-form-custom/fesm2022/index.mjs +88 -107
- package/components/input/base-form-custom/fesm2022/index.mjs.map +1 -1
- package/components/input/base-form-custom/types/index.d.ts +23 -26
- package/components/input/button/bundles/index.umd.js +177 -89
- package/components/input/button/fesm2022/index.mjs +158 -75
- package/components/input/button/fesm2022/index.mjs.map +1 -1
- package/components/input/button/types/index.d.ts +24 -25
- package/components/input/button-group/bundles/index.umd.js +110 -72
- package/components/input/button-group/fesm2022/index.mjs +90 -57
- package/components/input/button-group/fesm2022/index.mjs.map +1 -1
- package/components/input/button-group/types/index.d.ts +13 -14
- package/components/input/calendar/bundles/index.umd.js +615 -647
- package/components/input/calendar/fesm2022/index.mjs +596 -649
- package/components/input/calendar/fesm2022/index.mjs.map +1 -1
- package/components/input/calendar/types/index.d.ts +130 -131
- package/components/input/caption-position/bundles/index.umd.js +175 -188
- package/components/input/caption-position/fesm2022/index.mjs +159 -177
- package/components/input/caption-position/fesm2022/index.mjs.map +1 -1
- package/components/input/caption-position/types/index.d.ts +31 -34
- package/components/input/checkbox/bundles/index.umd.js +339 -200
- package/components/input/checkbox/fesm2022/index.mjs +319 -185
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
- package/components/input/checkbox/types/index.d.ts +46 -41
- package/components/input/checkboxset/bundles/index.umd.js +256 -170
- package/components/input/checkboxset/fesm2022/index.mjs +242 -161
- package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
- package/components/input/checkboxset/types/index.d.ts +26 -27
- package/components/input/chips/bundles/index.umd.js +721 -733
- package/components/input/chips/fesm2022/index.mjs +706 -723
- package/components/input/chips/fesm2022/index.mjs.map +1 -1
- package/components/input/chips/types/index.d.ts +101 -90
- package/components/input/color-picker/bundles/index.umd.js +312 -137
- package/components/input/color-picker/fesm2022/index.mjs +296 -126
- package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/color-picker/types/index.d.ts +35 -36
- package/components/input/composite/bundles/index.umd.js +127 -112
- package/components/input/composite/fesm2022/index.mjs +106 -96
- package/components/input/composite/fesm2022/index.mjs.map +1 -1
- package/components/input/composite/types/index.d.ts +26 -27
- package/components/input/currency/bundles/index.umd.js +237 -104
- package/components/input/currency/fesm2022/index.mjs +219 -91
- package/components/input/currency/fesm2022/index.mjs.map +1 -1
- package/components/input/currency/types/index.d.ts +30 -31
- package/components/input/dataset-aware-form/bundles/index.umd.js +298 -346
- package/components/input/dataset-aware-form/fesm2022/index.mjs +286 -339
- package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -1
- package/components/input/dataset-aware-form/types/index.d.ts +80 -80
- package/components/input/epoch/base-date-time/bundles/index.umd.js +809 -1081
- package/components/input/epoch/base-date-time/fesm2022/index.mjs +796 -1073
- package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/base-date-time/types/index.d.ts +244 -247
- package/components/input/epoch/date/bundles/index.umd.js +619 -513
- package/components/input/epoch/date/fesm2022/index.mjs +604 -503
- package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date/types/index.d.ts +63 -64
- package/components/input/epoch/date-time/bundles/index.umd.js +682 -511
- package/components/input/epoch/date-time/fesm2022/index.mjs +672 -506
- package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time/types/index.d.ts +111 -112
- package/components/input/epoch/date-time-picker/bundles/index.umd.js +417 -321
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs +405 -314
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time-picker/types/index.d.ts +135 -80
- package/components/input/epoch/picker/bundles/index.umd.js +201 -148
- package/components/input/epoch/picker/fesm2022/index.mjs +183 -135
- package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/picker/types/index.d.ts +46 -38
- package/components/input/epoch/time/bundles/index.umd.js +534 -392
- package/components/input/epoch/time/fesm2022/index.mjs +523 -386
- package/components/input/epoch/time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/time/types/index.d.ts +107 -108
- package/components/input/file-upload/bundles/index.umd.js +500 -477
- package/components/input/file-upload/fesm2022/index.mjs +484 -466
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/types/index.d.ts +110 -109
- package/components/input/number/bundles/index.umd.js +241 -101
- package/components/input/number/fesm2022/index.mjs +224 -89
- package/components/input/number/fesm2022/index.mjs.map +1 -1
- package/components/input/number/types/index.d.ts +28 -29
- package/components/input/radioset/bundles/index.umd.js +240 -156
- package/components/input/radioset/fesm2022/index.mjs +226 -147
- package/components/input/radioset/fesm2022/index.mjs.map +1 -1
- package/components/input/radioset/types/index.d.ts +25 -26
- package/components/input/rating/bundles/index.umd.js +353 -266
- package/components/input/rating/fesm2022/index.mjs +337 -255
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/types/index.d.ts +52 -53
- package/components/input/select/bundles/index.umd.js +295 -217
- package/components/input/select/fesm2022/index.mjs +280 -207
- package/components/input/select/fesm2022/index.mjs.map +1 -1
- package/components/input/select/types/index.d.ts +38 -39
- package/components/input/slider/bundles/index.umd.js +316 -197
- package/components/input/slider/fesm2022/index.mjs +297 -183
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/types/index.d.ts +43 -44
- package/components/input/switch/bundles/index.umd.js +257 -219
- package/components/input/switch/fesm2022/index.mjs +243 -210
- package/components/input/switch/fesm2022/index.mjs.map +1 -1
- package/components/input/switch/types/index.d.ts +34 -35
- package/components/input/text/bundles/index.umd.js +1585 -1120
- package/components/input/text/fesm2022/index.mjs +1542 -1082
- package/components/input/text/fesm2022/index.mjs.map +1 -1
- package/components/input/text/types/index.d.ts +313 -310
- package/components/input/textarea/bundles/index.umd.js +224 -100
- package/components/input/textarea/fesm2022/index.mjs +207 -88
- package/components/input/textarea/fesm2022/index.mjs.map +1 -1
- package/components/input/textarea/types/index.d.ts +32 -33
- package/components/navigation/breadcrumb/bundles/index.umd.js +205 -131
- package/components/navigation/breadcrumb/fesm2022/index.mjs +188 -118
- package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
- package/components/navigation/breadcrumb/types/index.d.ts +29 -28
- package/components/navigation/menu/bundles/index.umd.js +1461 -950
- package/components/navigation/menu/fesm2022/index.mjs +1416 -910
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/menu/types/index.d.ts +220 -193
- package/components/navigation/navbar/bundles/index.umd.js +172 -79
- package/components/navigation/navbar/fesm2022/index.mjs +155 -67
- package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
- package/components/navigation/navbar/types/index.d.ts +19 -20
- package/components/navigation/popover/bundles/index.umd.js +543 -519
- package/components/navigation/popover/fesm2022/index.mjs +524 -505
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/types/index.d.ts +86 -86
- package/components/page/default/bundles/index.umd.js +634 -451
- package/components/page/default/fesm2022/index.mjs +600 -422
- package/components/page/default/fesm2022/index.mjs.map +1 -1
- package/components/page/default/types/index.d.ts +123 -119
- package/components/page/footer/bundles/index.umd.js +91 -63
- package/components/page/footer/fesm2022/index.mjs +71 -48
- package/components/page/footer/fesm2022/index.mjs.map +1 -1
- package/components/page/footer/types/index.d.ts +11 -12
- package/components/page/header/bundles/index.umd.js +96 -59
- package/components/page/header/fesm2022/index.mjs +76 -44
- package/components/page/header/fesm2022/index.mjs.map +1 -1
- package/components/page/header/types/index.d.ts +12 -13
- package/components/page/left-panel/bundles/index.umd.js +405 -407
- package/components/page/left-panel/fesm2022/index.mjs +386 -393
- package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/left-panel/types/index.d.ts +47 -40
- package/components/page/right-panel/bundles/index.umd.js +115 -78
- package/components/page/right-panel/fesm2022/index.mjs +96 -64
- package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/right-panel/types/index.d.ts +14 -13
- package/components/page/top-nav/bundles/index.umd.js +91 -60
- package/components/page/top-nav/fesm2022/index.mjs +73 -47
- package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
- package/components/page/top-nav/types/index.d.ts +11 -12
- package/components/prefab/bundles/index.umd.js +253 -173
- package/components/prefab/fesm2022/index.mjs +233 -158
- package/components/prefab/fesm2022/index.mjs.map +1 -1
- package/components/prefab/types/index.d.ts +35 -33
- package/core/bundles/index.umd.js +4466 -5642
- package/core/fesm2022/index.mjs +3997 -5202
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/types/index.d.ts +1785 -1808
- package/http/bundles/index.umd.js +339 -413
- package/http/fesm2022/index.mjs +323 -402
- package/http/fesm2022/index.mjs.map +1 -1
- package/http/types/index.d.ts +107 -112
- package/locales/moment/am-et.js +73 -0
- package/locales/moment/bm.js +2 -0
- package/locales/moment/ca.js +1 -1
- package/locales/moment/de-at.js +29 -1
- package/locales/moment/de-ch.js +29 -1
- package/locales/moment/de.js +29 -1
- package/locales/moment/hu.js +3 -3
- package/locales/moment/id.js +12 -1
- package/locales/moment/ka.js +1 -1
- package/locales/moment/mk.js +0 -1
- package/locales/moment/nl-be.js +1 -1
- package/locales/moment/pl.js +1 -1
- package/locales/moment/ps.js +188 -0
- package/locales/moment/pt-br.js +14 -6
- package/locales/moment/sv.js +1 -1
- package/locales/moment/sw.js +56 -14
- package/locales/moment/uk.js +5 -4
- package/locales/moment/uz-latn.js +1 -1
- package/locales/moment/uz.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/oAuth/bundles/index.umd.js +326 -483
- package/oAuth/fesm2022/index.mjs +267 -429
- package/oAuth/fesm2022/index.mjs.map +1 -1
- package/oAuth/types/index.d.ts +22 -26
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +6380 -6093
- package/runtime/base/fesm2022/index.mjs +6368 -6107
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/types/index.d.ts +1336 -1359
- package/runtime/dynamic/bundles/index.umd.js +1215 -851
- package/runtime/dynamic/fesm2022/index.mjs +1253 -898
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/runtime/dynamic/types/index.d.ts +140 -128
- package/scripts/datatable/datatable.js +20 -30
- package/security/bundles/index.umd.js +297 -438
- package/security/fesm2022/index.mjs +282 -443
- package/security/fesm2022/index.mjs.map +1 -1
- package/security/types/index.d.ts +127 -130
- package/swipey/bundles/index.umd.js +57 -48
- package/swipey/fesm2022/index.mjs +55 -50
- package/swipey/fesm2022/index.mjs.map +1 -1
- package/swipey/types/index.d.ts +19 -21
- package/transpiler/bundles/index.umd.js +1174 -811
- package/transpiler/fesm2022/index.mjs +1109 -757
- package/transpiler/fesm2022/index.mjs.map +1 -1
- package/transpiler/types/index.d.ts +32 -36
- package/variables/bundles/index.umd.js +2226 -3245
- package/variables/fesm2022/index.mjs +2117 -3237
- package/variables/fesm2022/index.mjs.map +1 -1
- package/variables/types/index.d.ts +410 -393
- package/build-task/.npmignore +0 -2
- package/components/advanced/carousel/.npmignore +0 -2
- package/components/advanced/custom/.npmignore +0 -2
- package/components/advanced/login/.npmignore +0 -2
- package/components/advanced/marquee/.npmignore +0 -2
- package/components/base/.npmignore +0 -2
- package/components/basic/anchor/.npmignore +0 -2
- package/components/basic/audio/.npmignore +0 -2
- package/components/basic/html/.npmignore +0 -2
- package/components/basic/icon/.npmignore +0 -2
- package/components/basic/iframe/.npmignore +0 -2
- package/components/basic/label/.npmignore +0 -2
- package/components/basic/picture/.npmignore +0 -2
- package/components/basic/progress/progress-bar/.npmignore +0 -2
- package/components/basic/progress/progress-circle/.npmignore +0 -2
- package/components/basic/progress/progress-utils/.npmignore +0 -2
- package/components/basic/rich-text-editor/.npmignore +0 -2
- package/components/basic/search/.npmignore +0 -2
- package/components/basic/spinner/.npmignore +0 -2
- package/components/basic/tree/.npmignore +0 -2
- package/components/basic/video/.npmignore +0 -2
- package/components/chart/.npmignore +0 -2
- package/components/containers/accordion/.npmignore +0 -2
- package/components/containers/layout-grid/.npmignore +0 -2
- package/components/containers/linear-layout/.npmignore +0 -2
- package/components/containers/panel/.npmignore +0 -2
- package/components/containers/tabs/.npmignore +0 -2
- package/components/containers/tile/.npmignore +0 -2
- package/components/containers/wizard/.npmignore +0 -2
- package/components/data/card/.npmignore +0 -2
- package/components/data/form/.npmignore +0 -2
- package/components/data/list/.npmignore +0 -2
- package/components/data/live-table/.npmignore +0 -2
- package/components/data/pagination/.npmignore +0 -2
- package/components/data/table/.npmignore +0 -2
- package/components/dialogs/alert-dialog/.npmignore +0 -2
- package/components/dialogs/confirm-dialog/.npmignore +0 -2
- package/components/dialogs/default/.npmignore +0 -2
- package/components/dialogs/design-dialog/.npmignore +0 -2
- package/components/dialogs/iframe-dialog/.npmignore +0 -2
- package/components/dialogs/login-dialog/.npmignore +0 -2
- package/components/dialogs/partial-dialog/.npmignore +0 -2
- package/components/input/base-form/.npmignore +0 -2
- package/components/input/base-form-custom/.npmignore +0 -2
- package/components/input/button/.npmignore +0 -2
- package/components/input/button-group/.npmignore +0 -2
- package/components/input/calendar/.npmignore +0 -2
- package/components/input/caption-position/.npmignore +0 -2
- package/components/input/checkbox/.npmignore +0 -2
- package/components/input/checkboxset/.npmignore +0 -2
- package/components/input/chips/.npmignore +0 -2
- package/components/input/color-picker/.npmignore +0 -2
- package/components/input/composite/.npmignore +0 -2
- package/components/input/currency/.npmignore +0 -2
- package/components/input/dataset-aware-form/.npmignore +0 -2
- package/components/input/epoch/base-date-time/.npmignore +0 -2
- package/components/input/epoch/date/.npmignore +0 -2
- package/components/input/epoch/date-time/.npmignore +0 -2
- package/components/input/epoch/date-time-picker/.npmignore +0 -2
- package/components/input/epoch/picker/.npmignore +0 -2
- package/components/input/epoch/time/.npmignore +0 -2
- package/components/input/file-upload/.npmignore +0 -2
- package/components/input/number/.npmignore +0 -2
- package/components/input/radioset/.npmignore +0 -2
- package/components/input/rating/.npmignore +0 -2
- package/components/input/select/.npmignore +0 -2
- package/components/input/slider/.npmignore +0 -2
- package/components/input/switch/.npmignore +0 -2
- package/components/input/text/.npmignore +0 -2
- package/components/input/textarea/.npmignore +0 -2
- package/components/navigation/breadcrumb/.npmignore +0 -2
- package/components/navigation/menu/.npmignore +0 -2
- package/components/navigation/navbar/.npmignore +0 -2
- package/components/navigation/popover/.npmignore +0 -2
- package/components/page/default/.npmignore +0 -2
- package/components/page/footer/.npmignore +0 -2
- package/components/page/header/.npmignore +0 -2
- package/components/page/left-panel/.npmignore +0 -2
- package/components/page/right-panel/.npmignore +0 -2
- package/components/page/top-nav/.npmignore +0 -2
- package/components/prefab/.npmignore +0 -2
- package/core/.npmignore +0 -2
- package/http/.npmignore +0 -2
- package/oAuth/.npmignore +0 -2
- package/runtime/base/.npmignore +0 -2
- package/runtime/dynamic/.npmignore +0 -2
- package/security/.npmignore +0 -2
- package/swipey/.npmignore +0 -2
- package/transpiler/.npmignore +0 -2
- package/variables/.npmignore +0 -2
|
@@ -1,741 +1,729 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@wm/core'), require('@wm/components/base'), require('@wm/components/input/dataset-aware-form'), require('@wm/components/basic/search'), require('lodash-es')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@angular/core', '@angular/forms', '@wm/core', '@wm/components/base', '@wm/components/input/dataset-aware-form', '@wm/components/basic/search', 'lodash-es'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.input = global.wm.components.input || {}, global.wm.components.input.chips = {}), global.ng.common, global.ng.core, global.ng.forms, global.wm.core, global.wm.components.base, global.wm.components.input.datasetawareform, global.wm.components.basic.search, global._));
|
|
5
5
|
})(this, (function (exports, i1, i0, forms, core, base, datasetAwareForm, search, lodashEs) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
var n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
Object.keys(e).forEach(function (k) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return e[k]; }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
var i1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1);
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
27
|
+
const chipsProps = /* @__PURE__ */ new Map([
|
|
28
|
+
["allowonlyselect", base.PROP_BOOLEAN],
|
|
29
|
+
["autofocus", base.PROP_BOOLEAN],
|
|
30
|
+
["chipclass", base.PROP_STRING],
|
|
31
|
+
["class", base.PROP_STRING],
|
|
32
|
+
["compareby", base.PROP_STRING],
|
|
33
|
+
["datafield", base.PROP_STRING],
|
|
34
|
+
["dataoptions", base.PROP_ANY],
|
|
35
|
+
["dataset", {
|
|
36
|
+
value: "Option 1, Option 2, Option 3",
|
|
37
|
+
...base.PROP_ANY
|
|
38
|
+
}],
|
|
39
|
+
["datasource", base.PROP_ANY],
|
|
40
|
+
["datavalue", base.PROP_ANY],
|
|
41
|
+
["datavaluesource", base.PROP_ANY],
|
|
42
|
+
["dateformat", base.PROP_STRING],
|
|
43
|
+
["disabled", base.PROP_BOOLEAN],
|
|
44
|
+
["displayexpression", base.PROP_STRING],
|
|
45
|
+
["displayfield", base.PROP_STRING],
|
|
46
|
+
["displayimagesrc", base.PROP_STRING],
|
|
47
|
+
["enablereorder", base.PROP_BOOLEAN],
|
|
48
|
+
["groupby", base.PROP_STRING],
|
|
49
|
+
["inputposition", {
|
|
50
|
+
value: "last",
|
|
51
|
+
...base.PROP_STRING
|
|
52
|
+
}],
|
|
53
|
+
["inputwidth", {
|
|
54
|
+
value: "default",
|
|
55
|
+
...base.PROP_STRING
|
|
56
|
+
}],
|
|
57
|
+
["limit", base.PROP_NUMBER],
|
|
58
|
+
["loadingdatamsg", {
|
|
59
|
+
value: "Loading items...",
|
|
60
|
+
...base.PROP_STRING
|
|
61
|
+
}],
|
|
62
|
+
["match", base.PROP_STRING],
|
|
63
|
+
["matchmode", base.PROP_STRING],
|
|
64
|
+
["maxsize", base.PROP_NUMBER],
|
|
65
|
+
["minchars", {
|
|
66
|
+
value: 1,
|
|
67
|
+
...base.PROP_NUMBER
|
|
68
|
+
}],
|
|
69
|
+
["name", base.PROP_STRING],
|
|
70
|
+
["navsearchbar", {
|
|
71
|
+
value: false,
|
|
72
|
+
...base.PROP_BOOLEAN
|
|
73
|
+
}],
|
|
74
|
+
["orderby", base.PROP_STRING],
|
|
75
|
+
["placeholder", {
|
|
76
|
+
value: "Type here..",
|
|
77
|
+
...base.PROP_STRING
|
|
78
|
+
}],
|
|
79
|
+
["query", base.PROP_STRING],
|
|
80
|
+
["readonly", base.PROP_BOOLEAN],
|
|
81
|
+
["searchkey", base.PROP_STRING],
|
|
82
|
+
["shortcutkey", base.PROP_STRING],
|
|
83
|
+
["show", {
|
|
84
|
+
value: true,
|
|
85
|
+
...base.PROP_BOOLEAN
|
|
86
|
+
}],
|
|
87
|
+
["showsearchicon", base.PROP_BOOLEAN],
|
|
88
|
+
["tabindex", {
|
|
89
|
+
value: 0,
|
|
90
|
+
...base.PROP_NUMBER
|
|
91
|
+
}],
|
|
92
|
+
["type", {
|
|
93
|
+
value: "search",
|
|
94
|
+
...base.PROP_STRING
|
|
95
|
+
}],
|
|
96
|
+
["debouncetime", {
|
|
97
|
+
value: 250,
|
|
98
|
+
...base.PROP_NUMBER
|
|
99
|
+
}],
|
|
100
|
+
["datacompletemsg", {
|
|
101
|
+
value: "No more data to load",
|
|
102
|
+
...base.PROP_STRING
|
|
103
|
+
}]
|
|
104
|
+
]);
|
|
105
|
+
const registerProps = () => {
|
|
106
|
+
base.register("wm-chips", chipsProps);
|
|
107
|
+
base.registerFormWidget(core.FormWidgetType.CHIPS, new Map(chipsProps));
|
|
108
|
+
};
|
|
109
|
+
const WIDGET_CONFIG = {
|
|
110
|
+
widgetType: "wm-chips",
|
|
111
|
+
hostClass: "app-chips nav nav-pills list-inline"
|
|
112
|
+
};
|
|
113
|
+
var ChipsComponent = class ChipsComponent extends datasetAwareForm.DatasetAwareFormComponent {
|
|
114
|
+
static {
|
|
115
|
+
this.initializeProps = registerProps();
|
|
116
|
+
}
|
|
117
|
+
get datasource() {
|
|
118
|
+
return this._datasource;
|
|
119
|
+
}
|
|
120
|
+
set datasource(nv) {
|
|
121
|
+
this._datasource = nv;
|
|
122
|
+
this.searchComponent.datasource = nv;
|
|
123
|
+
if (this._debounceUpdateQueryModel) this._debounceUpdateQueryModel(this.datavalue || this.toBeProcessedDatavalue);
|
|
124
|
+
}
|
|
125
|
+
constructor(inj, bindDisplayField, bindDisplayExpr, bindDisplayImgSrc, bindDataField, bindDataSet, bindChipclass, explicitContext) {
|
|
126
|
+
super(inj, WIDGET_CONFIG, explicitContext);
|
|
127
|
+
this.bindDisplayField = bindDisplayField;
|
|
128
|
+
this.bindDisplayExpr = bindDisplayExpr;
|
|
129
|
+
this.bindDisplayImgSrc = bindDisplayImgSrc;
|
|
130
|
+
this.bindDataField = bindDataField;
|
|
131
|
+
this.bindDataSet = bindDataSet;
|
|
132
|
+
this.bindChipclass = bindChipclass;
|
|
133
|
+
this.chipsList = [];
|
|
134
|
+
this.maxSizeReached = "Max size reached";
|
|
135
|
+
this._unsubscribeDv = false;
|
|
136
|
+
this._debounceUpdateQueryModel = null;
|
|
137
|
+
base.styler(this.nativeElement, this);
|
|
138
|
+
if (!core.isDefined(this.showsearchicon)) this.showsearchicon = false;
|
|
139
|
+
this.multiple = true;
|
|
140
|
+
this.nextItemIndex = 0;
|
|
141
|
+
this._debounceUpdateQueryModel = core.debounce((val) => {
|
|
142
|
+
this.updateQueryModel(val).then(() => {
|
|
143
|
+
if (this.bindChipclass) lodashEs.forEach(this.chipsList, (item, index) => {
|
|
144
|
+
this.registerChipItemClass(item, index);
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
}, 150);
|
|
148
|
+
const datasetSubscription = this.dataset$.subscribe(() => {
|
|
149
|
+
this.searchComponent.dataset = this.dataset;
|
|
150
|
+
this.searchComponent._lastResult = void 0;
|
|
151
|
+
this.nextItemIndex = this.datasetItems.length;
|
|
152
|
+
if (this._debounceUpdateQueryModel) this._debounceUpdateQueryModel(this.datavalue || this.toBeProcessedDatavalue);
|
|
153
|
+
});
|
|
154
|
+
this.registerDestroyListener(() => datasetSubscription.unsubscribe());
|
|
155
|
+
const datavalueSubscription = this.datavalue$.subscribe((val) => {
|
|
156
|
+
if (!this._unsubscribeDv) {
|
|
157
|
+
this.chipsList = [];
|
|
158
|
+
if (this._debounceUpdateQueryModel) this._debounceUpdateQueryModel(val);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
this.registerDestroyListener(() => datavalueSubscription.unsubscribe());
|
|
162
|
+
}
|
|
163
|
+
ngOnInit() {
|
|
164
|
+
super.ngOnInit();
|
|
165
|
+
this.searchComponent.multiple = true;
|
|
166
|
+
this.searchComponent.binddisplayimagesrc = this.bindDisplayImgSrc;
|
|
167
|
+
this.searchComponent.displayimagesrc = this.displayimagesrc;
|
|
168
|
+
this.searchComponent.binddisplaylabel = this.bindDisplayExpr;
|
|
169
|
+
this.searchComponent.displaylabel = this.displayfield;
|
|
170
|
+
this.searchComponent.datafield = this.bindDataField || this.datafield;
|
|
171
|
+
this.searchComponent.binddataset = this.bindDataSet;
|
|
172
|
+
this.searchComponent.dataset = this.dataset;
|
|
173
|
+
this.searchComponent.searchkey = this.searchkey;
|
|
174
|
+
this.searchComponent.limit = this.limit;
|
|
175
|
+
this.searchComponent.debouncetime = this.debouncetime;
|
|
176
|
+
this.searchComponent.matchmode = this.matchmode;
|
|
177
|
+
this.getTransformedData = (val, isCustom) => {
|
|
178
|
+
return this.searchComponent.getTransformedData([val], this.nextItemIndex++, isCustom);
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
ngAfterViewInit() {
|
|
182
|
+
super.ngAfterViewInit();
|
|
183
|
+
if (this.enablereorder) this.configureDnD();
|
|
184
|
+
}
|
|
185
|
+
registerChipItemClass(item, $index) {
|
|
186
|
+
if (this.bindChipclass) {
|
|
187
|
+
const watchName = `${this.widgetId}_chipItemClass_${$index}`;
|
|
188
|
+
core.$unwatch(watchName);
|
|
189
|
+
this.registerDestroyListener(core.$watch(this.bindChipclass, this.viewParent, {
|
|
190
|
+
item,
|
|
191
|
+
$index
|
|
192
|
+
}, (nv, ov) => {
|
|
193
|
+
this.applyItemClass(base.getConditionalClasses(nv, ov), $index);
|
|
194
|
+
}, watchName));
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
applyItemClass(val, index) {
|
|
198
|
+
const chipItem = this.nativeElement.querySelectorAll(".chip-item").item(index);
|
|
199
|
+
if (chipItem) {
|
|
200
|
+
$(chipItem).removeClass(val.toRemove).addClass(val.toAdd);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
setTimeout(() => {
|
|
204
|
+
const retryChip = this.nativeElement.querySelectorAll(".chip-item").item(index);
|
|
205
|
+
if (retryChip) $(retryChip).removeClass(val.toRemove).addClass(val.toAdd);
|
|
206
|
+
}, 50);
|
|
207
|
+
}
|
|
208
|
+
removeDuplicates() {
|
|
209
|
+
this.chipsList = base.getUniqObjsByDataField(this.chipsList, this.datafield, this.displayfield || this.displaylabel);
|
|
210
|
+
}
|
|
211
|
+
updateQueryModel(data) {
|
|
212
|
+
const promises = [];
|
|
213
|
+
if (!data) {
|
|
214
|
+
this.chipsList = [];
|
|
215
|
+
return Promise.resolve();
|
|
216
|
+
}
|
|
217
|
+
let dataValue = lodashEs.clone(data);
|
|
218
|
+
const prevChipsList = this.chipsList;
|
|
219
|
+
this.chipsList = [];
|
|
220
|
+
if (this.maxsize && dataValue.length > this.maxsize) {
|
|
221
|
+
this._modelByValue = dataValue = lodashEs.slice(dataValue, 0, this.maxsize);
|
|
222
|
+
data = dataValue;
|
|
223
|
+
}
|
|
224
|
+
const searchQuery = [];
|
|
225
|
+
dataValue.forEach((val, i) => {
|
|
226
|
+
const itemFound = lodashEs.find(this.datasetItems, (item) => {
|
|
227
|
+
return lodashEs.isObject(item.value) ? lodashEs.isEqual(item.value, val) : lodashEs.toString(item.value) === lodashEs.toString(val);
|
|
228
|
+
});
|
|
229
|
+
if (itemFound) this.chipsList.push(itemFound);
|
|
230
|
+
else if (this.datafield !== base.ALLFIELDS) searchQuery.push(val);
|
|
231
|
+
else {
|
|
232
|
+
let dataObj, isCustom = false;
|
|
233
|
+
if (!lodashEs.isObject(val)) {
|
|
234
|
+
dataObj = this.createCustomDataModel(val);
|
|
235
|
+
isCustom = true;
|
|
236
|
+
if (dataObj) data.splice(i, 1, dataObj);
|
|
237
|
+
} else {
|
|
238
|
+
const prevChipObj = prevChipsList.find((obj) => {
|
|
239
|
+
return lodashEs.isEqual(obj.value, val);
|
|
240
|
+
});
|
|
241
|
+
if (prevChipObj) isCustom = prevChipObj.iscustom;
|
|
242
|
+
}
|
|
243
|
+
dataObj = dataObj || val;
|
|
244
|
+
const chipObj = this.getTransformedData(dataObj, isCustom)[0];
|
|
245
|
+
if (isCustom) chipObj.iscustom = isCustom;
|
|
246
|
+
this.chipsList.push(chipObj);
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
if (searchQuery.length) promises.push(this.getDefaultModel(searchQuery, this.nextItemIndex).then((response) => {
|
|
250
|
+
this.chipsList = this.chipsList.concat(response || []);
|
|
251
|
+
dataValue.forEach((val, i) => {
|
|
252
|
+
if (!lodashEs.find(this.chipsList, (obj) => {
|
|
253
|
+
return obj.value.toString() === val.toString();
|
|
254
|
+
})) {
|
|
255
|
+
if (this.allowonlyselect) {
|
|
256
|
+
const index = data.indexOf(val);
|
|
257
|
+
if (index > -1) data.splice(index, 1);
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
const chipObj = this.getTransformedData(val, true)[0];
|
|
261
|
+
chipObj.iscustom = true;
|
|
262
|
+
this.chipsList.push(chipObj);
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}));
|
|
266
|
+
this.resetSearchModel(true);
|
|
267
|
+
return Promise.all(promises).then(() => {
|
|
268
|
+
this._modelByValue = data;
|
|
269
|
+
this.removeDuplicates();
|
|
270
|
+
this.updateMaxSize();
|
|
271
|
+
core.$appDigest();
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
resetSearchModel(defaultQuery) {
|
|
275
|
+
this._unsubscribeDv = true;
|
|
276
|
+
this.searchComponent.clearSearch(void 0, !this.minchars && !defaultQuery);
|
|
277
|
+
this._unsubscribeDv = false;
|
|
278
|
+
}
|
|
279
|
+
addItem($event, widget) {
|
|
280
|
+
const searchComponent = widget;
|
|
281
|
+
let allowAdd;
|
|
282
|
+
let chipObj;
|
|
283
|
+
if (searchComponent && core.isDefined(searchComponent.datavalue) && searchComponent.queryModel !== "") {
|
|
284
|
+
if (!searchComponent.query || !lodashEs.trim(searchComponent.query)) return;
|
|
285
|
+
chipObj = searchComponent.queryModel;
|
|
286
|
+
} else {
|
|
287
|
+
if (this.allowonlyselect) return;
|
|
288
|
+
let dataObj;
|
|
289
|
+
if (this.datafield === base.ALLFIELDS) {
|
|
290
|
+
if (!lodashEs.isObject(this.searchComponent.query) && lodashEs.trim(this.searchComponent.query)) {
|
|
291
|
+
dataObj = this.createCustomDataModel(this.searchComponent.query);
|
|
292
|
+
if (!dataObj) {
|
|
293
|
+
this.resetSearchModel();
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
const data = dataObj || lodashEs.trim(this.searchComponent.query);
|
|
299
|
+
if (data) {
|
|
300
|
+
chipObj = this.getTransformedData(data, true)[0];
|
|
301
|
+
chipObj.iscustom = true;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (!core.isDefined(chipObj) || chipObj === "") return;
|
|
305
|
+
allowAdd = this.invokeEventCallback("beforeadd", {
|
|
306
|
+
$event,
|
|
307
|
+
newItem: chipObj
|
|
308
|
+
});
|
|
309
|
+
if (core.isDefined(allowAdd) && !core.toBoolean(allowAdd)) return;
|
|
310
|
+
if (this.isDuplicate(chipObj)) {
|
|
311
|
+
this.resetSearchModel();
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
this.registerChipItemClass(chipObj, this.chipsList.length);
|
|
315
|
+
this.chipsList.push(chipObj);
|
|
316
|
+
if (!this.datavalue) this._modelByValue = [chipObj.value];
|
|
317
|
+
else this._modelByValue = [...this._modelByValue, chipObj.value];
|
|
318
|
+
this._unsubscribeDv = true;
|
|
319
|
+
this.invokeOnTouched();
|
|
320
|
+
this.invokeOnChange(this._modelByValue, $event || {}, true);
|
|
321
|
+
this.invokeEventCallback("add", {
|
|
322
|
+
$event,
|
|
323
|
+
$item: chipObj
|
|
324
|
+
});
|
|
325
|
+
this.updateMaxSize();
|
|
326
|
+
this.resetSearchModel();
|
|
327
|
+
if ($event && ($event.key === "Enter" || $event.keyCode === 13)) this.stopEvent($event);
|
|
328
|
+
}
|
|
329
|
+
createCustomDataModel(val) {
|
|
330
|
+
const key = this.displayfield || (this.datafield !== base.ALLFIELDS ? this.datafield : void 0);
|
|
331
|
+
if (key) {
|
|
332
|
+
const customObj = {};
|
|
333
|
+
customObj[key] = val;
|
|
334
|
+
return customObj;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
isDuplicate(item) {
|
|
338
|
+
if (this.datafield === base.ALLFIELDS) return lodashEs.findIndex(this.chipsList, { value: item.value }) > -1;
|
|
339
|
+
return lodashEs.findIndex(this.chipsList, { key: item.key }) > -1;
|
|
340
|
+
}
|
|
341
|
+
updateMaxSize() {
|
|
342
|
+
this.saturate = this.maxsize > 0 && this.chipsList.length === this.maxsize;
|
|
343
|
+
}
|
|
344
|
+
getDefaultModel(query, index) {
|
|
345
|
+
this.nextItemIndex++;
|
|
346
|
+
return this.searchComponent.getDataSource(query, true, index).then((response) => {
|
|
347
|
+
return lodashEs.filter(query, (queryVal) => {
|
|
348
|
+
lodashEs.find(response, { value: queryVal });
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
handleChipClick($event, chip) {
|
|
353
|
+
if (this.readonly) return;
|
|
354
|
+
$event.currentTarget.focus();
|
|
355
|
+
this.invokeEventCallback("chipclick", {
|
|
356
|
+
$event,
|
|
357
|
+
$item: chip
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
handleChipFocus($event, chip) {
|
|
361
|
+
if (this.readonly) return;
|
|
362
|
+
chip.active = true;
|
|
363
|
+
this.invokeEventCallback("chipselect", {
|
|
364
|
+
$event,
|
|
365
|
+
$item: chip
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
stopEvent($event) {
|
|
369
|
+
if (($event.target?.value ?? "").trim()) {
|
|
370
|
+
$event.stopPropagation();
|
|
371
|
+
$event.preventDefault();
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
onTextDelete($event) {
|
|
375
|
+
if (core.isAppleProduct) this.onInputClear($event);
|
|
376
|
+
}
|
|
377
|
+
onInputClear($event) {
|
|
378
|
+
if (!this.chipsList?.length || this.searchComponent.query) return;
|
|
379
|
+
this.$element.find("li.chip-item > a.app-chip").last().focus();
|
|
380
|
+
this.stopEvent($event);
|
|
381
|
+
}
|
|
382
|
+
onBackspace($event, $item, $index) {
|
|
383
|
+
if (this.readonly) return;
|
|
384
|
+
this.removeItem($event, $item, $index, true);
|
|
385
|
+
}
|
|
386
|
+
onDelete($event, $item, $index) {
|
|
387
|
+
if (this.readonly) return;
|
|
388
|
+
this.removeItem($event, $item, $index);
|
|
389
|
+
}
|
|
390
|
+
onArrowLeft($item, $index) {
|
|
391
|
+
if (this.readonly) return;
|
|
392
|
+
if (!this.searchComponent.query && !core.isDefined($index) && !core.isDefined($item)) {
|
|
393
|
+
this.$element.find("li.chip-item > a.app-chip").last().focus();
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
if ($index > 0) this.$element.find("li.chip-item > a.app-chip").get($index - 1).focus();
|
|
397
|
+
else this.focusSearchBox();
|
|
398
|
+
}
|
|
399
|
+
onArrowRight($item, $index) {
|
|
400
|
+
if (this.readonly) return;
|
|
401
|
+
if (!this.searchComponent.query && !core.isDefined($index) && !core.isDefined($item)) {
|
|
402
|
+
this.$element.find("li.chip-item > a.app-chip").first().focus();
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
if ($index < this.chipsList.length - 1) this.$element.find("li.chip-item > a.app-chip").get($index + 1).focus();
|
|
406
|
+
else this.focusSearchBox();
|
|
407
|
+
}
|
|
408
|
+
focusSearchBox() {
|
|
409
|
+
this.$element.find(".app-chip-input > input.app-textbox").focus();
|
|
410
|
+
}
|
|
411
|
+
removeItem($event, item, index, canFocus) {
|
|
412
|
+
$event.stopPropagation();
|
|
413
|
+
const indexes = lodashEs.isArray(index) ? index : [index];
|
|
414
|
+
const focusIndex = lodashEs.max(indexes);
|
|
415
|
+
const items = lodashEs.reduce(indexes, (result, i) => {
|
|
416
|
+
result.push(this.chipsList[i]);
|
|
417
|
+
return result;
|
|
418
|
+
}, []);
|
|
419
|
+
const allowRemove = this.invokeEventCallback("beforeremove", {
|
|
420
|
+
$event,
|
|
421
|
+
$item: items.length === 1 ? items[0] : items
|
|
422
|
+
});
|
|
423
|
+
if (core.isDefined(allowRemove) && !core.toBoolean(allowRemove)) return;
|
|
424
|
+
const prevDatavalue = lodashEs.clone(this.datavalue);
|
|
425
|
+
setTimeout(() => {
|
|
426
|
+
const chipsLength = this.chipsList.length;
|
|
427
|
+
const $chipsList = this.$element.find("li.chip-item > a.app-chip");
|
|
428
|
+
if (!chipsLength || !canFocus) this.focusSearchBox();
|
|
429
|
+
else if (chipsLength - 1 < focusIndex) $chipsList.get(chipsLength - 1).focus();
|
|
430
|
+
else {
|
|
431
|
+
this.chipsList[focusIndex].active = true;
|
|
432
|
+
$chipsList.get(focusIndex).focus();
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
lodashEs.pullAt(this.chipsList, indexes).forEach((datasetItem) => {
|
|
436
|
+
this._modelByValue = lodashEs.filter(this._modelByValue, (val) => {
|
|
437
|
+
return !(lodashEs.isObject(val) ? lodashEs.isEqual(val, datasetItem.value) : lodashEs.toString(val) === lodashEs.toString(datasetItem.value));
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
this._unsubscribeDv = false;
|
|
441
|
+
this.invokeOnChange(this._modelByValue, $event, true);
|
|
442
|
+
this.invokeEventCallback("change", {
|
|
443
|
+
$event,
|
|
444
|
+
newVal: this.datavalue,
|
|
445
|
+
oldVal: prevDatavalue
|
|
446
|
+
});
|
|
447
|
+
this.updateMaxSize();
|
|
448
|
+
this.invokeEventCallback("remove", {
|
|
449
|
+
$event,
|
|
450
|
+
$item: items.length === 1 ? items[0] : items
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
swapElementsInArray(data, newIndex, currentIndex) {
|
|
454
|
+
const draggedItem = lodashEs.pullAt(data, currentIndex)[0];
|
|
455
|
+
data.splice(newIndex, 0, draggedItem);
|
|
456
|
+
}
|
|
457
|
+
resetReorder() {
|
|
458
|
+
this.$element.removeData("oldIndex");
|
|
459
|
+
}
|
|
460
|
+
invokeOnBeforeServiceCall(inputData) {
|
|
461
|
+
this.invokeEventCallback("beforeservicecall", { inputData });
|
|
462
|
+
}
|
|
463
|
+
handleEvent(node, eventName, eventCallback, locals) {
|
|
464
|
+
if (eventName === "remove" || eventName === "beforeremove" || eventName === "chipselect" || eventName === "chipclick" || eventName === "add" || eventName === "reorder" || eventName === "change") return;
|
|
465
|
+
super.handleEvent(node, eventName, eventCallback, locals);
|
|
466
|
+
}
|
|
467
|
+
configureDnD() {
|
|
468
|
+
base.configureDnD(this.$element, {
|
|
469
|
+
items: "> li:not(.app-chip-search)",
|
|
470
|
+
placeholder: "chip-placeholder",
|
|
471
|
+
cancel: ".app-chips.readonly"
|
|
472
|
+
}, this.onReorderStart.bind(this), this.update.bind(this));
|
|
473
|
+
}
|
|
474
|
+
onReorderStart(evt, ui) {
|
|
475
|
+
const helper = ui.helper;
|
|
476
|
+
helper.width(helper.width() + 1);
|
|
477
|
+
this.$element.data("oldIndex", ui.item.index() - (this.inputposition === "first" ? 1 : 0));
|
|
478
|
+
}
|
|
479
|
+
update($event, ui) {
|
|
480
|
+
let changedItem, newIndex, oldIndex;
|
|
481
|
+
newIndex = ui.item.index() - (this.inputposition === "first" ? 1 : 0);
|
|
482
|
+
oldIndex = this.$element.data("oldIndex");
|
|
483
|
+
newIndex = this.chipsList.length === newIndex ? newIndex - 1 : newIndex;
|
|
484
|
+
changedItem = {
|
|
485
|
+
oldIndex,
|
|
486
|
+
newIndex,
|
|
487
|
+
item: this.chipsList[oldIndex]
|
|
488
|
+
};
|
|
489
|
+
if (newIndex === oldIndex) {
|
|
490
|
+
this.resetReorder();
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
changedItem.item = this.chipsList[oldIndex];
|
|
494
|
+
const allowReorder = this.invokeEventCallback("beforereorder", {
|
|
495
|
+
$event,
|
|
496
|
+
$data: this.chipsList,
|
|
497
|
+
$changedItem: changedItem
|
|
498
|
+
});
|
|
499
|
+
if (core.isDefined(allowReorder) && core.toBoolean(allowReorder) === false) {
|
|
500
|
+
this.resetReorder();
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
this.swapElementsInArray(this.chipsList, newIndex, oldIndex);
|
|
504
|
+
this.swapElementsInArray(this._modelByValue, newIndex, oldIndex);
|
|
505
|
+
changedItem.item = this.chipsList[newIndex];
|
|
506
|
+
this.chipsList = [...this.chipsList];
|
|
507
|
+
this.resetReorder();
|
|
508
|
+
this.invokeEventCallback("reorder", {
|
|
509
|
+
$event,
|
|
510
|
+
$data: this.chipsList,
|
|
511
|
+
$changedItem: changedItem
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
onPropertyChange(key, nv, ov) {
|
|
515
|
+
if (key === "tabindex") return;
|
|
516
|
+
if (key === "dataoptions") this.searchComponent.dataoptions = nv;
|
|
517
|
+
if (key === "datafield") this.searchComponent.datafield = this.datafield;
|
|
518
|
+
if (key === "displayfield") this.searchComponent.displaylabel = this.displayfield;
|
|
519
|
+
if (key === "displayexpression") this.searchComponent.binddisplaylabel = this.binddisplayexpression ? this.binddisplayexpression : this.displayexpression;
|
|
520
|
+
if (key === "displayimagesrc") this.searchComponent.binddisplayimagesrc = this.binddisplayimagesrc ? this.binddisplayimagesrc : this.displayimagesrc;
|
|
521
|
+
if (key === "limit") this.searchComponent.limit = this.limit;
|
|
522
|
+
if (key === "matchmode") this.searchComponent.matchmode = this.matchmode;
|
|
523
|
+
if (key === "groupby") this.searchComponent.groupby = this.groupby;
|
|
524
|
+
if (key === "enablereorder") {
|
|
525
|
+
if (this.$element.hasClass("ui-sortable")) this.$element.sortable("option", "disabled", !nv);
|
|
526
|
+
else if (nv) this.configureDnD();
|
|
527
|
+
const chipElements = this.$element.find(".chip-item a.app-chip");
|
|
528
|
+
if (!nv) {
|
|
529
|
+
chipElements.addClass("no-drag");
|
|
530
|
+
chipElements.on("dragstart", (e) => {
|
|
531
|
+
e.preventDefault();
|
|
532
|
+
return false;
|
|
533
|
+
});
|
|
534
|
+
} else {
|
|
535
|
+
chipElements.removeClass("no-drag");
|
|
536
|
+
chipElements.off("dragstart");
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
if (key === "readonly") {
|
|
540
|
+
if (nv) this.$element.addClass("readonly");
|
|
541
|
+
else this.$element.removeClass("readonly");
|
|
542
|
+
}
|
|
543
|
+
if (key === "inputposition") {
|
|
544
|
+
const $inputEl = this.$element.find("li.app-chip-search");
|
|
545
|
+
if (nv === "first") this.$element.prepend($inputEl);
|
|
546
|
+
else this.$element.append($inputEl);
|
|
547
|
+
}
|
|
548
|
+
if (key === "autofocus" && nv) setTimeout(() => {
|
|
549
|
+
if (this.$element.find(".app-chip-input > input.app-textbox")?.length) this.focusSearchBox();
|
|
550
|
+
});
|
|
551
|
+
super.onPropertyChange(key, nv, ov);
|
|
552
|
+
}
|
|
553
|
+
ngOnDestroy() {
|
|
554
|
+
this.chipsList = [];
|
|
555
|
+
this._debounceUpdateQueryModel = null;
|
|
556
|
+
this.searchComponent = null;
|
|
557
|
+
if (this.enablereorder && this.$element) try {
|
|
558
|
+
this.$element.sortable("destroy");
|
|
559
|
+
} catch (e) {}
|
|
560
|
+
this.getTransformedData = null;
|
|
561
|
+
this._classExpr = null;
|
|
562
|
+
super.ngOnDestroy();
|
|
563
|
+
}
|
|
564
|
+
static {
|
|
565
|
+
this.ɵfac = i0__namespace.ɵɵngDeclareFactory({
|
|
566
|
+
minVersion: "12.0.0",
|
|
567
|
+
version: "22.2.1",
|
|
568
|
+
ngImport: i0__namespace,
|
|
569
|
+
type: ChipsComponent,
|
|
570
|
+
deps: [
|
|
571
|
+
{ token: i0__namespace.Injector },
|
|
572
|
+
{
|
|
573
|
+
token: "displayfield.bind",
|
|
574
|
+
attribute: true
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
token: "displayexpression.bind",
|
|
578
|
+
attribute: true
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
token: "displayimagesrc.bind",
|
|
582
|
+
attribute: true
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
token: "datafield.bind",
|
|
586
|
+
attribute: true
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
token: "dataset.bind",
|
|
590
|
+
attribute: true
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
token: "chipclass.bind",
|
|
594
|
+
attribute: true
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
token: "EXPLICIT_CONTEXT",
|
|
598
|
+
optional: true
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
target: i0__namespace.ɵɵFactoryTarget.Component
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
static {
|
|
605
|
+
this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({
|
|
606
|
+
minVersion: "17.0.0",
|
|
607
|
+
version: "22.2.1",
|
|
608
|
+
type: ChipsComponent,
|
|
609
|
+
isStandalone: true,
|
|
610
|
+
selector: "[wmChips]",
|
|
611
|
+
providers: [base.provideAs(ChipsComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAsWidgetRef(ChipsComponent)],
|
|
612
|
+
viewQueries: [{
|
|
613
|
+
propertyName: "searchComponent",
|
|
614
|
+
first: true,
|
|
615
|
+
predicate: search.SearchComponent,
|
|
616
|
+
descendants: true,
|
|
617
|
+
static: true
|
|
618
|
+
}],
|
|
619
|
+
usesInheritance: true,
|
|
620
|
+
ngImport: i0__namespace,
|
|
621
|
+
template: "@for (item of chipsList; track item) {\n <li class=\"chip-item {{chipclass && !bindChipclass ? chipclass : ''}}\"\n [ngClass]=\"{'active': item.active, 'disabled': disabled}\">\n <a href=\"javascript:void(0)\" class=\"app-chip\"\n (click)=\"handleChipClick($event, item)\"\n (keydown.delete)=\"onDelete($event, item, $index)\"\n (keydown.backspace)=\"onBackspace($event, item, $index)\"\n (keydown.arrowleft)=\"onArrowLeft(item, $index)\"\n (keydown.arrowright)=\"onArrowRight(item, $index)\"\n (focus)=\"handleChipFocus($event, item)\"\n (blur)=\"readonly ? 0 : item.active = false\"\n [ngClass]=\"{'no-drag': !enablereorder,'chip-duplicate bg-danger': item.isDuplicate, 'chip-picture': item.imgSrc}\">\n @if (item.imgSrc) {\n <img data-identifier=\"img\" alt=\"Chip Image\" class=\"button-image-icon\" [src]=\"item.imgSrc\"/>\n }\n <span class=\"app-chip-title\" [textContent]=\"item.label\" [title]=\"item.label\"></span>\n @if (!readonly) {\n <button type=\"button\" [attr.aria-label]=\"'Clear ' + item.label\" class=\"btn btn-transparent\"\n (click)=\"removeItem($event, item, $index);\">\n <i class=\"app-icon wi wi-close\"></i>\n </button>\n }\n </a>\n </li>\n}\n<li class=\"app-chip-search\" [ngClass]=\"{'full-width': inputwidth === 'full'}\">\n <div #search wmSearch class=\"app-chip-input\"\n name=\"app-chip-search\"\n submit.event=\"addItem($event, widget)\"\n beforeservicecall.event=\"invokeOnBeforeServiceCall(inputData)\"\n disabled.bind=\"disabled || readonly || saturate\"\n datafield.bind=\"datafield\"\n allowonlyselect.bind=\"allowonlyselect\"\n searchkey.bind=\"searchkey\"\n orderby.bind=\"orderby\"\n placeholder.bind=\"saturate ? maxSizeReached : placeholder\"\n showsearchicon.bind=\"showsearchicon\"\n tabindex.bind=\"tabindex\"\n minchars.bind=\"minchars\"\n debouncetime.bind=\"debouncetime\"\n matchmode.bind=\"matchmode\"\n datacompletemsg.bind = \"datacompletemsg\"\n groupby.bind=\"groupby\"\n match.bind=\"match\"\n dateformat.bind=\"dateformat\"\n (keydown.enter)=\"stopEvent($event)\"\n (keydown.delete)=\"onTextDelete($event)\"\n (keydown.backspace)=\"onInputClear($event)\"\n (keydown.arrowleft)=\"onArrowLeft()\"\n (keydown.arrowright)=\"onArrowRight()\">\n </div>\n</li>\n",
|
|
622
|
+
dependencies: [
|
|
623
|
+
{
|
|
624
|
+
kind: "ngmodule",
|
|
625
|
+
type: i1.CommonModule
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
kind: "directive",
|
|
629
|
+
type: i1__namespace.NgClass,
|
|
630
|
+
selector: "[ngClass]",
|
|
631
|
+
inputs: ["class", "ngClass"]
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
kind: "directive",
|
|
635
|
+
type: base.TextContentDirective,
|
|
636
|
+
selector: "[textContent]",
|
|
637
|
+
inputs: ["textContent"]
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
kind: "component",
|
|
641
|
+
type: search.SearchComponent,
|
|
642
|
+
selector: "[wmSearch]"
|
|
643
|
+
}
|
|
644
|
+
],
|
|
645
|
+
changeDetection: i0__namespace.ChangeDetectionStrategy.Eager
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
i0__namespace.ɵɵngDeclareClassMetadata({
|
|
650
|
+
minVersion: "12.0.0",
|
|
651
|
+
version: "22.2.1",
|
|
652
|
+
ngImport: i0__namespace,
|
|
653
|
+
type: ChipsComponent,
|
|
654
|
+
decorators: [{
|
|
655
|
+
type: i0.Component,
|
|
656
|
+
args: [{
|
|
657
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
658
|
+
standalone: true,
|
|
659
|
+
imports: [
|
|
660
|
+
i1.CommonModule,
|
|
661
|
+
base.TextContentDirective,
|
|
662
|
+
search.SearchComponent
|
|
663
|
+
],
|
|
664
|
+
selector: "[wmChips]",
|
|
665
|
+
providers: [base.provideAs(ChipsComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAsWidgetRef(ChipsComponent)],
|
|
666
|
+
template: "@for (item of chipsList; track item) {\n <li class=\"chip-item {{chipclass && !bindChipclass ? chipclass : ''}}\"\n [ngClass]=\"{'active': item.active, 'disabled': disabled}\">\n <a href=\"javascript:void(0)\" class=\"app-chip\"\n (click)=\"handleChipClick($event, item)\"\n (keydown.delete)=\"onDelete($event, item, $index)\"\n (keydown.backspace)=\"onBackspace($event, item, $index)\"\n (keydown.arrowleft)=\"onArrowLeft(item, $index)\"\n (keydown.arrowright)=\"onArrowRight(item, $index)\"\n (focus)=\"handleChipFocus($event, item)\"\n (blur)=\"readonly ? 0 : item.active = false\"\n [ngClass]=\"{'no-drag': !enablereorder,'chip-duplicate bg-danger': item.isDuplicate, 'chip-picture': item.imgSrc}\">\n @if (item.imgSrc) {\n <img data-identifier=\"img\" alt=\"Chip Image\" class=\"button-image-icon\" [src]=\"item.imgSrc\"/>\n }\n <span class=\"app-chip-title\" [textContent]=\"item.label\" [title]=\"item.label\"></span>\n @if (!readonly) {\n <button type=\"button\" [attr.aria-label]=\"'Clear ' + item.label\" class=\"btn btn-transparent\"\n (click)=\"removeItem($event, item, $index);\">\n <i class=\"app-icon wi wi-close\"></i>\n </button>\n }\n </a>\n </li>\n}\n<li class=\"app-chip-search\" [ngClass]=\"{'full-width': inputwidth === 'full'}\">\n <div #search wmSearch class=\"app-chip-input\"\n name=\"app-chip-search\"\n submit.event=\"addItem($event, widget)\"\n beforeservicecall.event=\"invokeOnBeforeServiceCall(inputData)\"\n disabled.bind=\"disabled || readonly || saturate\"\n datafield.bind=\"datafield\"\n allowonlyselect.bind=\"allowonlyselect\"\n searchkey.bind=\"searchkey\"\n orderby.bind=\"orderby\"\n placeholder.bind=\"saturate ? maxSizeReached : placeholder\"\n showsearchicon.bind=\"showsearchicon\"\n tabindex.bind=\"tabindex\"\n minchars.bind=\"minchars\"\n debouncetime.bind=\"debouncetime\"\n matchmode.bind=\"matchmode\"\n datacompletemsg.bind = \"datacompletemsg\"\n groupby.bind=\"groupby\"\n match.bind=\"match\"\n dateformat.bind=\"dateformat\"\n (keydown.enter)=\"stopEvent($event)\"\n (keydown.delete)=\"onTextDelete($event)\"\n (keydown.backspace)=\"onInputClear($event)\"\n (keydown.arrowleft)=\"onArrowLeft()\"\n (keydown.arrowright)=\"onArrowRight()\">\n </div>\n</li>\n"
|
|
667
|
+
}]
|
|
668
|
+
}],
|
|
669
|
+
ctorParameters: () => [
|
|
670
|
+
{ type: i0__namespace.Injector },
|
|
671
|
+
{
|
|
672
|
+
type: void 0,
|
|
673
|
+
decorators: [{
|
|
674
|
+
type: i0.Attribute,
|
|
675
|
+
args: ["displayfield.bind"]
|
|
676
|
+
}]
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
type: void 0,
|
|
680
|
+
decorators: [{
|
|
681
|
+
type: i0.Attribute,
|
|
682
|
+
args: ["displayexpression.bind"]
|
|
683
|
+
}]
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
type: void 0,
|
|
687
|
+
decorators: [{
|
|
688
|
+
type: i0.Attribute,
|
|
689
|
+
args: ["displayimagesrc.bind"]
|
|
690
|
+
}]
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
type: void 0,
|
|
694
|
+
decorators: [{
|
|
695
|
+
type: i0.Attribute,
|
|
696
|
+
args: ["datafield.bind"]
|
|
697
|
+
}]
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
type: void 0,
|
|
701
|
+
decorators: [{
|
|
702
|
+
type: i0.Attribute,
|
|
703
|
+
args: ["dataset.bind"]
|
|
704
|
+
}]
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
type: void 0,
|
|
708
|
+
decorators: [{
|
|
709
|
+
type: i0.Attribute,
|
|
710
|
+
args: ["chipclass.bind"]
|
|
711
|
+
}]
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
type: void 0,
|
|
715
|
+
decorators: [{
|
|
716
|
+
type: i0.Inject,
|
|
717
|
+
args: ["EXPLICIT_CONTEXT"]
|
|
718
|
+
}, { type: i0.Optional }]
|
|
719
|
+
}
|
|
720
|
+
],
|
|
721
|
+
propDecorators: { searchComponent: [{
|
|
722
|
+
type: i0.ViewChild,
|
|
723
|
+
args: [search.SearchComponent, { static: true }]
|
|
724
|
+
}] }
|
|
725
|
+
});
|
|
73
726
|
|
|
74
|
-
|
|
75
|
-
widgetType: 'wm-chips',
|
|
76
|
-
hostClass: 'app-chips nav nav-pills list-inline'
|
|
77
|
-
};
|
|
78
|
-
class ChipsComponent extends datasetAwareForm.DatasetAwareFormComponent {
|
|
79
|
-
static { this.initializeProps = registerProps(); }
|
|
80
|
-
// getter setter is added to pass the datasource to searchcomponent.
|
|
81
|
-
get datasource() {
|
|
82
|
-
return this._datasource;
|
|
83
|
-
}
|
|
84
|
-
set datasource(nv) {
|
|
85
|
-
this._datasource = nv;
|
|
86
|
-
this.searchComponent.datasource = nv;
|
|
87
|
-
if (this._debounceUpdateQueryModel) {
|
|
88
|
-
this._debounceUpdateQueryModel(this.datavalue || this.toBeProcessedDatavalue);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
constructor(inj, bindDisplayField, bindDisplayExpr, bindDisplayImgSrc, bindDataField, bindDataSet, bindChipclass, explicitContext) {
|
|
92
|
-
super(inj, WIDGET_CONFIG, explicitContext);
|
|
93
|
-
this.bindDisplayField = bindDisplayField;
|
|
94
|
-
this.bindDisplayExpr = bindDisplayExpr;
|
|
95
|
-
this.bindDisplayImgSrc = bindDisplayImgSrc;
|
|
96
|
-
this.bindDataField = bindDataField;
|
|
97
|
-
this.bindDataSet = bindDataSet;
|
|
98
|
-
this.bindChipclass = bindChipclass;
|
|
99
|
-
this.chipsList = [];
|
|
100
|
-
this.maxSizeReached = 'Max size reached';
|
|
101
|
-
this._unsubscribeDv = false;
|
|
102
|
-
this._debounceUpdateQueryModel = null;
|
|
103
|
-
base.styler(this.nativeElement, this);
|
|
104
|
-
// set the showsearchicon as false by default.
|
|
105
|
-
if (!core.isDefined(this.showsearchicon)) {
|
|
106
|
-
this.showsearchicon = false;
|
|
107
|
-
}
|
|
108
|
-
this.multiple = true;
|
|
109
|
-
this.nextItemIndex = 0; // default chip index
|
|
110
|
-
this._debounceUpdateQueryModel = core.debounce((val) => {
|
|
111
|
-
this.updateQueryModel(val).then(() => {
|
|
112
|
-
if (this.bindChipclass) {
|
|
113
|
-
lodashEs.forEach(this.chipsList, (item, index) => {
|
|
114
|
-
this.registerChipItemClass(item, index);
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
}, 150);
|
|
119
|
-
const datasetSubscription = this.dataset$.subscribe(() => {
|
|
120
|
-
this.searchComponent.dataset = this.dataset;
|
|
121
|
-
// clearing the last results when dataset is reassigned
|
|
122
|
-
this.searchComponent._lastResult = undefined;
|
|
123
|
-
this.nextItemIndex = this.datasetItems.length;
|
|
124
|
-
if (this._debounceUpdateQueryModel) {
|
|
125
|
-
this._debounceUpdateQueryModel(this.datavalue || this.toBeProcessedDatavalue);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
this.registerDestroyListener(() => datasetSubscription.unsubscribe());
|
|
129
|
-
const datavalueSubscription = this.datavalue$.subscribe((val) => {
|
|
130
|
-
// update queryModel only when parentRef is available.
|
|
131
|
-
if (!this._unsubscribeDv) {
|
|
132
|
-
this.chipsList = [];
|
|
133
|
-
// if the datafield is ALLFILEDS do not fetch the records
|
|
134
|
-
// update the query model with the values we have
|
|
135
|
-
if (this._debounceUpdateQueryModel) {
|
|
136
|
-
this._debounceUpdateQueryModel(val);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
this.registerDestroyListener(() => datavalueSubscription.unsubscribe());
|
|
141
|
-
}
|
|
142
|
-
ngOnInit() {
|
|
143
|
-
super.ngOnInit();
|
|
144
|
-
this.searchComponent.multiple = true;
|
|
145
|
-
this.searchComponent.binddisplayimagesrc = this.bindDisplayImgSrc;
|
|
146
|
-
this.searchComponent.displayimagesrc = this.displayimagesrc;
|
|
147
|
-
this.searchComponent.binddisplaylabel = this.bindDisplayExpr;
|
|
148
|
-
this.searchComponent.displaylabel = this.displayfield;
|
|
149
|
-
this.searchComponent.datafield = this.bindDataField || this.datafield;
|
|
150
|
-
this.searchComponent.binddataset = this.bindDataSet;
|
|
151
|
-
this.searchComponent.dataset = this.dataset;
|
|
152
|
-
this.searchComponent.searchkey = this.searchkey;
|
|
153
|
-
this.searchComponent.limit = this.limit;
|
|
154
|
-
this.searchComponent.debouncetime = this.debouncetime;
|
|
155
|
-
this.searchComponent.matchmode = this.matchmode;
|
|
156
|
-
this.getTransformedData = (val, isCustom) => {
|
|
157
|
-
return this.searchComponent.getTransformedData([val], this.nextItemIndex++, isCustom);
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
ngAfterViewInit() {
|
|
161
|
-
super.ngAfterViewInit();
|
|
162
|
-
if (this.enablereorder) {
|
|
163
|
-
this.configureDnD();
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* This method returns the evaluated class expression.
|
|
168
|
-
* @param $index index of the chip
|
|
169
|
-
* @param item chip object containing the key, value, label
|
|
170
|
-
* @returns {any} evaluated class expression value
|
|
171
|
-
*/
|
|
172
|
-
registerChipItemClass(item, $index) {
|
|
173
|
-
if (this.bindChipclass) {
|
|
174
|
-
const watchName = `${this.widgetId}_chipItemClass_${$index}`;
|
|
175
|
-
core.$unwatch(watchName);
|
|
176
|
-
//[Todo-CSP]: same as list item class
|
|
177
|
-
this.registerDestroyListener(core.$watch(this.bindChipclass, this.viewParent, { item, $index }, (nv, ov) => {
|
|
178
|
-
this.applyItemClass(base.getConditionalClasses(nv, ov), $index);
|
|
179
|
-
}, watchName));
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
applyItemClass(val, index) {
|
|
183
|
-
const chipItems = this.nativeElement.querySelectorAll('.chip-item');
|
|
184
|
-
const chipItem = chipItems.item(index);
|
|
185
|
-
if (chipItem) {
|
|
186
|
-
$(chipItem).removeClass(val.toRemove).addClass(val.toAdd);
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
setTimeout(() => {
|
|
190
|
-
const retryChip = this.nativeElement.querySelectorAll('.chip-item').item(index);
|
|
191
|
-
if (retryChip) {
|
|
192
|
-
$(retryChip).removeClass(val.toRemove).addClass(val.toAdd);
|
|
193
|
-
}
|
|
194
|
-
}, 50);
|
|
195
|
-
}
|
|
196
|
-
removeDuplicates() {
|
|
197
|
-
this.chipsList = base.getUniqObjsByDataField(this.chipsList, this.datafield, this.displayfield || this.displaylabel);
|
|
198
|
-
}
|
|
199
|
-
// This method updates the queryModel.
|
|
200
|
-
// default call to get the default data can be done only when defaultQuery is true.
|
|
201
|
-
updateQueryModel(data) {
|
|
202
|
-
const promises = [];
|
|
203
|
-
if (!data) {
|
|
204
|
-
this.chipsList = [];
|
|
205
|
-
return Promise.resolve();
|
|
206
|
-
}
|
|
207
|
-
// clone the data as the updations on data will change the datavalue.
|
|
208
|
-
let dataValue = lodashEs.clone(data);
|
|
209
|
-
const prevChipsList = this.chipsList;
|
|
210
|
-
this.chipsList = [];
|
|
211
|
-
// update the model when model has items more than maxsize
|
|
212
|
-
if (this.maxsize && dataValue.length > this.maxsize) {
|
|
213
|
-
this._modelByValue = dataValue = lodashEs.slice(dataValue, 0, this.maxsize);
|
|
214
|
-
data = dataValue;
|
|
215
|
-
}
|
|
216
|
-
const searchQuery = [];
|
|
217
|
-
/**
|
|
218
|
-
* For each value in datavalue,
|
|
219
|
-
* 1. check whether value is in datasetItems, if item is found, addd to the chipsList.
|
|
220
|
-
* 2. else make a default query to the filter and get the record.
|
|
221
|
-
* 3. In step 2, if datavalue is not ALLFIELDS, then make a query. Extract the chipsList from the query response.
|
|
222
|
-
* 4. If there is no response for the value and allowonlyselect is true, remove the value from the datavalue. So that datavalue just contains the valid values.
|
|
223
|
-
* 5. In step 2, if datavalue is ALLFIELDS and value is object, then just prepare the datasetItem from the value.
|
|
224
|
-
* 6. If value is not object and allowonlyselect is false, then create a customModel and replace this value with customModel and prepare datasetItem from this value
|
|
225
|
-
*/
|
|
226
|
-
dataValue.forEach((val, i) => {
|
|
227
|
-
const itemFound = lodashEs.find(this.datasetItems, item => {
|
|
228
|
-
return lodashEs.isObject(item.value) ? lodashEs.isEqual(item.value, val) : lodashEs.toString(item.value) === lodashEs.toString(val);
|
|
229
|
-
});
|
|
230
|
-
if (itemFound) {
|
|
231
|
-
this.chipsList.push(itemFound);
|
|
232
|
-
}
|
|
233
|
-
else if (this.datafield !== base.ALLFIELDS) {
|
|
234
|
-
searchQuery.push(val);
|
|
235
|
-
}
|
|
236
|
-
else if (this.datafield === base.ALLFIELDS) {
|
|
237
|
-
let dataObj, isCustom = false;
|
|
238
|
-
if (!lodashEs.isObject(val)) {
|
|
239
|
-
dataObj = this.createCustomDataModel(val);
|
|
240
|
-
isCustom = true;
|
|
241
|
-
if (dataObj) {
|
|
242
|
-
data.splice(i, 1, dataObj);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
// if custom chips is already generated, val will be object as {'dataField_val': 'entered_val'}
|
|
247
|
-
// Hence check this val in previous chipList and assign the iscustom flag
|
|
248
|
-
const prevChipObj = prevChipsList.find(obj => {
|
|
249
|
-
return lodashEs.isEqual(obj.value, val);
|
|
250
|
-
});
|
|
251
|
-
if (prevChipObj) {
|
|
252
|
-
isCustom = prevChipObj.iscustom;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
dataObj = dataObj || val;
|
|
256
|
-
const transformedData = this.getTransformedData(dataObj, isCustom);
|
|
257
|
-
const chipObj = transformedData[0];
|
|
258
|
-
if (isCustom) {
|
|
259
|
-
chipObj.iscustom = isCustom;
|
|
260
|
-
}
|
|
261
|
-
this.chipsList.push(chipObj);
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
// make default query with all the values and if response for the value is not in datavalue then add a custom chip object.
|
|
265
|
-
if (searchQuery.length) {
|
|
266
|
-
promises.push(this.getDefaultModel(searchQuery, this.nextItemIndex)
|
|
267
|
-
.then(response => {
|
|
268
|
-
this.chipsList = this.chipsList.concat(response || []);
|
|
269
|
-
dataValue.forEach((val, i) => {
|
|
270
|
-
const isExists = lodashEs.find(this.chipsList, (obj) => {
|
|
271
|
-
return obj.value.toString() === val.toString();
|
|
272
|
-
});
|
|
273
|
-
if (!isExists) {
|
|
274
|
-
if (this.allowonlyselect) {
|
|
275
|
-
const index = data.indexOf(val);
|
|
276
|
-
if (index > -1) {
|
|
277
|
-
data.splice(index, 1);
|
|
278
|
-
}
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
const transformedData = this.getTransformedData(val, true);
|
|
282
|
-
const chipObj = transformedData[0];
|
|
283
|
-
chipObj.iscustom = true;
|
|
284
|
-
this.chipsList.push(chipObj);
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
}));
|
|
288
|
-
}
|
|
289
|
-
// default chip data is adding focus on to the search input. Hence this flag helps not to focus.
|
|
290
|
-
this.resetSearchModel(true);
|
|
291
|
-
return Promise.all(promises).then(() => {
|
|
292
|
-
this._modelByValue = data;
|
|
293
|
-
this.removeDuplicates();
|
|
294
|
-
this.updateMaxSize();
|
|
295
|
-
core.$appDigest();
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
resetSearchModel(defaultQuery) {
|
|
299
|
-
this._unsubscribeDv = true;
|
|
300
|
-
// clear search will empty the query model and gets the data when minchars is 0 (i.e. autocomplete) on focus
|
|
301
|
-
// defaultQuery flag is set when widget is not active. This will only load the autocomplete dropup with minchars as 0 when widget is focused/active
|
|
302
|
-
this.searchComponent.clearSearch(undefined, !this.minchars && !defaultQuery);
|
|
303
|
-
this._unsubscribeDv = false;
|
|
304
|
-
}
|
|
305
|
-
// Add the newItem to the list
|
|
306
|
-
addItem($event, widget) {
|
|
307
|
-
const searchComponent = widget;
|
|
308
|
-
let allowAdd;
|
|
309
|
-
let chipObj;
|
|
310
|
-
if (searchComponent && core.isDefined(searchComponent.datavalue) && searchComponent.queryModel !== '') {
|
|
311
|
-
if (!searchComponent.query || !lodashEs.trim(searchComponent.query)) {
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
chipObj = searchComponent.queryModel;
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
317
|
-
if (this.allowonlyselect) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
let dataObj;
|
|
321
|
-
if (this.datafield === base.ALLFIELDS) {
|
|
322
|
-
if (!lodashEs.isObject(this.searchComponent.query) && lodashEs.trim(this.searchComponent.query)) {
|
|
323
|
-
dataObj = this.createCustomDataModel(this.searchComponent.query);
|
|
324
|
-
// return if the custom chip is empty
|
|
325
|
-
if (!dataObj) {
|
|
326
|
-
this.resetSearchModel();
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
const data = dataObj || lodashEs.trim(this.searchComponent.query);
|
|
332
|
-
if (data) {
|
|
333
|
-
const transformedData = this.getTransformedData(data, true);
|
|
334
|
-
chipObj = transformedData[0];
|
|
335
|
-
chipObj.iscustom = true;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
if (!core.isDefined(chipObj) || chipObj === '') {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
allowAdd = this.invokeEventCallback('beforeadd', { $event, newItem: chipObj });
|
|
342
|
-
if (core.isDefined(allowAdd) && !core.toBoolean(allowAdd)) {
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
if (this.isDuplicate(chipObj)) {
|
|
346
|
-
this.resetSearchModel();
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
this.registerChipItemClass(chipObj, this.chipsList.length);
|
|
350
|
-
this.chipsList.push(chipObj);
|
|
351
|
-
if (!this.datavalue) {
|
|
352
|
-
this._modelByValue = [chipObj.value];
|
|
353
|
-
}
|
|
354
|
-
else {
|
|
355
|
-
this._modelByValue = [...this._modelByValue, chipObj.value];
|
|
356
|
-
}
|
|
357
|
-
this._unsubscribeDv = true;
|
|
358
|
-
this.invokeOnTouched();
|
|
359
|
-
this.invokeOnChange(this._modelByValue, $event || {}, true);
|
|
360
|
-
this.invokeEventCallback('add', { $event, $item: chipObj });
|
|
361
|
-
this.updateMaxSize();
|
|
362
|
-
// reset input box when item is added.
|
|
363
|
-
this.resetSearchModel();
|
|
364
|
-
// stop the event to not to call the submit event on enter press.
|
|
365
|
-
if ($event && ($event.key === 'Enter' || $event.keyCode === 13)) {
|
|
366
|
-
this.stopEvent($event);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
// Prepare datavalue object from a string(junk) value when datafield is allFields.
|
|
370
|
-
createCustomDataModel(val) {
|
|
371
|
-
const key = this.displayfield || (this.datafield !== base.ALLFIELDS ? this.datafield : undefined);
|
|
372
|
-
if (key) {
|
|
373
|
-
const customObj = {};
|
|
374
|
-
customObj[key] = val;
|
|
375
|
-
return customObj;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
// Check if newItem already exists
|
|
379
|
-
isDuplicate(item) {
|
|
380
|
-
if (this.datafield === base.ALLFIELDS) {
|
|
381
|
-
return lodashEs.findIndex(this.chipsList, { value: item.value }) > -1;
|
|
382
|
-
}
|
|
383
|
-
return lodashEs.findIndex(this.chipsList, { key: item.key }) > -1;
|
|
384
|
-
}
|
|
385
|
-
// Check if max size is reached
|
|
386
|
-
updateMaxSize() {
|
|
387
|
-
this.saturate = this.maxsize > 0 && this.chipsList.length === this.maxsize;
|
|
388
|
-
}
|
|
389
|
-
// Makes call to searchComponent to filter the dataSource based on the query.
|
|
390
|
-
getDefaultModel(query, index) {
|
|
391
|
-
this.nextItemIndex++;
|
|
392
|
-
return this.searchComponent.getDataSource(query, true, index)
|
|
393
|
-
.then((response) => {
|
|
394
|
-
// @ts-ignore
|
|
395
|
-
return lodashEs.filter(query, queryVal => {
|
|
396
|
-
lodashEs.find(response, { value: queryVal });
|
|
397
|
-
});
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
handleChipClick($event, chip) {
|
|
401
|
-
if (this.readonly) {
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
$event.currentTarget.focus();
|
|
405
|
-
this.invokeEventCallback('chipclick', { $event, $item: chip });
|
|
406
|
-
}
|
|
407
|
-
handleChipFocus($event, chip) {
|
|
408
|
-
if (this.readonly) {
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
chip.active = true;
|
|
412
|
-
this.invokeEventCallback('chipselect', { $event, $item: chip });
|
|
413
|
-
}
|
|
414
|
-
// To avoid form submit on pressing enter key
|
|
415
|
-
stopEvent($event) {
|
|
416
|
-
const inputValue = $event.target?.value ?? '';
|
|
417
|
-
if (inputValue.trim()) {
|
|
418
|
-
$event.stopPropagation();
|
|
419
|
-
$event.preventDefault();
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
onTextDelete($event) {
|
|
423
|
-
if (core.isAppleProduct) {
|
|
424
|
-
this.onInputClear($event);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
onInputClear($event) {
|
|
428
|
-
if (!this.chipsList?.length || this.searchComponent.query) {
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
this.$element.find('li.chip-item > a.app-chip').last().focus();
|
|
432
|
-
this.stopEvent($event);
|
|
433
|
-
}
|
|
434
|
-
onBackspace($event, $item, $index) {
|
|
435
|
-
if (this.readonly) {
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
this.removeItem($event, $item, $index, true);
|
|
439
|
-
}
|
|
440
|
-
onDelete($event, $item, $index) {
|
|
441
|
-
if (this.readonly) {
|
|
442
|
-
return;
|
|
443
|
-
}
|
|
444
|
-
this.removeItem($event, $item, $index);
|
|
445
|
-
}
|
|
446
|
-
onArrowLeft($item, $index) {
|
|
447
|
-
if (this.readonly) {
|
|
448
|
-
return;
|
|
449
|
-
}
|
|
450
|
-
// On left arrow click when search input query is empty.
|
|
451
|
-
if (!this.searchComponent.query && !core.isDefined($index) && !core.isDefined($item)) {
|
|
452
|
-
this.$element.find('li.chip-item > a.app-chip').last().focus();
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
if ($index > 0) {
|
|
456
|
-
this.$element.find('li.chip-item > a.app-chip').get($index - 1).focus();
|
|
457
|
-
}
|
|
458
|
-
else {
|
|
459
|
-
this.focusSearchBox();
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
onArrowRight($item, $index) {
|
|
463
|
-
if (this.readonly) {
|
|
464
|
-
return;
|
|
465
|
-
}
|
|
466
|
-
// On right arrow click when search input query is empty.
|
|
467
|
-
if (!this.searchComponent.query && !core.isDefined($index) && !core.isDefined($item)) {
|
|
468
|
-
this.$element.find('li.chip-item > a.app-chip').first().focus();
|
|
469
|
-
return;
|
|
470
|
-
}
|
|
471
|
-
if ($index < (this.chipsList.length - 1)) {
|
|
472
|
-
this.$element.find('li.chip-item > a.app-chip').get($index + 1).focus();
|
|
473
|
-
}
|
|
474
|
-
else {
|
|
475
|
-
this.focusSearchBox();
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
// focus search box.
|
|
479
|
-
focusSearchBox() {
|
|
480
|
-
this.$element.find('.app-chip-input > input.app-textbox').focus();
|
|
481
|
-
}
|
|
482
|
-
// Remove the item from list
|
|
483
|
-
removeItem($event, item, index, canFocus) {
|
|
484
|
-
$event.stopPropagation();
|
|
485
|
-
const indexes = lodashEs.isArray(index) ? index : [index];
|
|
486
|
-
const focusIndex = lodashEs.max(indexes);
|
|
487
|
-
const items = lodashEs.reduce(indexes, (result, i) => {
|
|
488
|
-
result.push(this.chipsList[i]);
|
|
489
|
-
return result;
|
|
490
|
-
}, []);
|
|
491
|
-
// prevent deletion if the before-remove event callback returns false
|
|
492
|
-
const allowRemove = this.invokeEventCallback('beforeremove', { $event, $item: items.length === 1 ? items[0] : items });
|
|
493
|
-
if (core.isDefined(allowRemove) && !core.toBoolean(allowRemove)) {
|
|
494
|
-
return;
|
|
495
|
-
}
|
|
496
|
-
const prevDatavalue = lodashEs.clone(this.datavalue);
|
|
497
|
-
// focus next chip after deletion.
|
|
498
|
-
// if there are no chips in the list focus search box
|
|
499
|
-
setTimeout(() => {
|
|
500
|
-
const chipsLength = this.chipsList.length;
|
|
501
|
-
const $chipsList = this.$element.find('li.chip-item > a.app-chip');
|
|
502
|
-
if (!chipsLength || !canFocus) {
|
|
503
|
-
this.focusSearchBox();
|
|
504
|
-
}
|
|
505
|
-
else if ((chipsLength - 1) < focusIndex) {
|
|
506
|
-
// if focus index is greater than chips length select last chip
|
|
507
|
-
$chipsList.get(chipsLength - 1).focus();
|
|
508
|
-
}
|
|
509
|
-
else {
|
|
510
|
-
// manually set the succeeding chip as active if there is a chip next to the current chip.
|
|
511
|
-
this.chipsList[focusIndex].active = true;
|
|
512
|
-
$chipsList.get(focusIndex).focus();
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
const pulledItems = lodashEs.pullAt(this.chipsList, indexes);
|
|
516
|
-
pulledItems.forEach(datasetItem => {
|
|
517
|
-
this._modelByValue = lodashEs.filter(this._modelByValue, val => {
|
|
518
|
-
return !(lodashEs.isObject(val) ? lodashEs.isEqual(val, datasetItem.value) : lodashEs.toString(val) === lodashEs.toString(datasetItem.value));
|
|
519
|
-
});
|
|
520
|
-
});
|
|
521
|
-
this._unsubscribeDv = false;
|
|
522
|
-
this.invokeOnChange(this._modelByValue, $event, true);
|
|
523
|
-
this.invokeEventCallback('change', { $event, newVal: this.datavalue, oldVal: prevDatavalue });
|
|
524
|
-
this.updateMaxSize();
|
|
525
|
-
this.invokeEventCallback('remove', { $event, $item: items.length === 1 ? items[0] : items });
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* Swaps items in an array if provided with indexes.
|
|
529
|
-
* @param data :- array to be swapped
|
|
530
|
-
* @param newIndex :- new index for the element to be placed
|
|
531
|
-
* @param currentIndex :- the current index of the element.
|
|
532
|
-
*/
|
|
533
|
-
swapElementsInArray(data, newIndex, currentIndex) {
|
|
534
|
-
const draggedItem = lodashEs.pullAt(data, currentIndex)[0];
|
|
535
|
-
data.splice(newIndex, 0, draggedItem);
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* Cancels the reorder by reseting the elements to the original position.
|
|
539
|
-
*/
|
|
540
|
-
resetReorder() {
|
|
541
|
-
this.$element.removeData('oldIndex');
|
|
542
|
-
}
|
|
543
|
-
invokeOnBeforeServiceCall(inputData) {
|
|
544
|
-
this.invokeEventCallback('beforeservicecall', { inputData });
|
|
545
|
-
}
|
|
546
|
-
handleEvent(node, eventName, eventCallback, locals) {
|
|
547
|
-
if (eventName === 'remove' || eventName === 'beforeremove' || eventName === 'chipselect'
|
|
548
|
-
|| eventName === 'chipclick' || eventName === 'add' || eventName === 'reorder' || eventName === 'change') {
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
super.handleEvent(node, eventName, eventCallback, locals);
|
|
552
|
-
}
|
|
553
|
-
// Configures the reordable feature in chips widgets.
|
|
554
|
-
configureDnD() {
|
|
555
|
-
const options = {
|
|
556
|
-
items: '> li:not(.app-chip-search)',
|
|
557
|
-
placeholder: 'chip-placeholder'
|
|
558
|
-
};
|
|
559
|
-
base.configureDnD(this.$element, options, this.onReorderStart.bind(this), this.update.bind(this));
|
|
560
|
-
}
|
|
561
|
-
// Triggered on drag start while reordering.
|
|
562
|
-
onReorderStart(evt, ui) {
|
|
563
|
-
const helper = ui.helper;
|
|
564
|
-
// increasing the width of the dragged item by 1
|
|
565
|
-
helper.width(helper.width() + 1);
|
|
566
|
-
this.$element.data('oldIndex', ui.item.index() - (this.inputposition === 'first' ? 1 : 0));
|
|
567
|
-
}
|
|
568
|
-
// updates the chipsList and datavalue on reorder.
|
|
569
|
-
update($event, ui) {
|
|
570
|
-
let changedItem, newIndex, oldIndex;
|
|
571
|
-
// Get the index of the item at position before drag and after the reorder.
|
|
572
|
-
newIndex = ui.item.index() - (this.inputposition === 'first' ? 1 : 0);
|
|
573
|
-
oldIndex = this.$element.data('oldIndex');
|
|
574
|
-
newIndex = this.chipsList.length === newIndex ? newIndex - 1 : newIndex;
|
|
575
|
-
changedItem = {
|
|
576
|
-
oldIndex: oldIndex,
|
|
577
|
-
newIndex: newIndex,
|
|
578
|
-
item: this.chipsList[oldIndex]
|
|
579
|
-
};
|
|
580
|
-
if (newIndex === oldIndex) {
|
|
581
|
-
this.resetReorder();
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
changedItem.item = this.chipsList[oldIndex];
|
|
585
|
-
const allowReorder = this.invokeEventCallback('beforereorder', { $event, $data: this.chipsList, $changedItem: changedItem });
|
|
586
|
-
if (core.isDefined(allowReorder) && core.toBoolean(allowReorder) === false) {
|
|
587
|
-
this.resetReorder();
|
|
588
|
-
return;
|
|
589
|
-
}
|
|
590
|
-
// modify the chipsList and datavalue after the reorder.
|
|
591
|
-
this.swapElementsInArray(this.chipsList, newIndex, oldIndex);
|
|
592
|
-
this.swapElementsInArray(this._modelByValue, newIndex, oldIndex);
|
|
593
|
-
changedItem.item = this.chipsList[newIndex];
|
|
594
|
-
this.chipsList = [...this.chipsList];
|
|
595
|
-
this.resetReorder();
|
|
596
|
-
this.invokeEventCallback('reorder', { $event, $data: this.chipsList, $changedItem: changedItem });
|
|
597
|
-
}
|
|
598
|
-
onPropertyChange(key, nv, ov) {
|
|
599
|
-
if (key === 'tabindex') {
|
|
600
|
-
return;
|
|
601
|
-
}
|
|
602
|
-
if (key === 'dataoptions') {
|
|
603
|
-
this.searchComponent.dataoptions = nv;
|
|
604
|
-
}
|
|
605
|
-
if (key === 'datafield') {
|
|
606
|
-
this.searchComponent.datafield = this.datafield;
|
|
607
|
-
}
|
|
608
|
-
if (key === 'displayfield') {
|
|
609
|
-
this.searchComponent.displaylabel = this.displayfield;
|
|
610
|
-
}
|
|
611
|
-
if (key === 'displayexpression') {
|
|
612
|
-
this.searchComponent.binddisplaylabel = this.binddisplayexpression ? this.binddisplayexpression : this.displayexpression;
|
|
613
|
-
}
|
|
614
|
-
if (key === 'displayimagesrc') {
|
|
615
|
-
this.searchComponent.binddisplayimagesrc = this.binddisplayimagesrc ? this.binddisplayimagesrc : this.displayimagesrc;
|
|
616
|
-
}
|
|
617
|
-
if (key === 'limit') {
|
|
618
|
-
this.searchComponent.limit = this.limit;
|
|
619
|
-
}
|
|
620
|
-
if (key === 'matchmode') {
|
|
621
|
-
this.searchComponent.matchmode = this.matchmode;
|
|
622
|
-
}
|
|
623
|
-
if (key === 'groupby') {
|
|
624
|
-
this.searchComponent.groupby = this.groupby;
|
|
625
|
-
}
|
|
626
|
-
if (key === 'enablereorder') {
|
|
627
|
-
if (this.$element.hasClass('ui-sortable')) {
|
|
628
|
-
this.$element.sortable('option', 'disabled', !nv);
|
|
629
|
-
}
|
|
630
|
-
else if (nv) {
|
|
631
|
-
this.configureDnD();
|
|
632
|
-
}
|
|
633
|
-
// Add this block to handle drag prevention
|
|
634
|
-
const chipElements = this.$element.find('.chip-item a.app-chip');
|
|
635
|
-
if (!nv) {
|
|
636
|
-
chipElements.addClass('no-drag');
|
|
637
|
-
// Prevent default drag behavior
|
|
638
|
-
chipElements.on('dragstart', (e) => {
|
|
639
|
-
e.preventDefault();
|
|
640
|
-
return false;
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
else {
|
|
644
|
-
chipElements.removeClass('no-drag');
|
|
645
|
-
chipElements.off('dragstart');
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
if (key === 'readonly') {
|
|
649
|
-
if (nv) {
|
|
650
|
-
this.$element.addClass('readonly');
|
|
651
|
-
}
|
|
652
|
-
else {
|
|
653
|
-
this.$element.removeClass('readonly');
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
if (key === 'inputposition') {
|
|
657
|
-
const $inputEl = this.$element.find('li.app-chip-search');
|
|
658
|
-
if (nv === 'first') {
|
|
659
|
-
this.$element.prepend($inputEl);
|
|
660
|
-
}
|
|
661
|
-
else {
|
|
662
|
-
this.$element.append($inputEl);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
if (key === 'autofocus' && nv) {
|
|
666
|
-
// setting the autofocus on the input once after dom is updated
|
|
667
|
-
setTimeout(() => {
|
|
668
|
-
const $chipsList = this.$element.find('.app-chip-input > input.app-textbox');
|
|
669
|
-
if ($chipsList?.length) {
|
|
670
|
-
this.focusSearchBox();
|
|
671
|
-
}
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
super.onPropertyChange(key, nv, ov);
|
|
675
|
-
}
|
|
676
|
-
ngOnDestroy() {
|
|
677
|
-
// MEMORY LEAK FIX: Clear chips list array
|
|
678
|
-
this.chipsList = [];
|
|
679
|
-
// MEMORY LEAK FIX: Nullify debounced function closure
|
|
680
|
-
this._debounceUpdateQueryModel = null;
|
|
681
|
-
// MEMORY LEAK FIX: Clear search component reference
|
|
682
|
-
this.searchComponent = null;
|
|
683
|
-
// MEMORY LEAK FIX: Destroy jQuery sortable if enabled
|
|
684
|
-
if (this.enablereorder && this.$element) {
|
|
685
|
-
try {
|
|
686
|
-
this.$element.sortable('destroy');
|
|
687
|
-
}
|
|
688
|
-
catch (e) {
|
|
689
|
-
// Ignore errors during destroy
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
// MEMORY LEAK FIX: Clear transform function reference
|
|
693
|
-
this.getTransformedData = null;
|
|
694
|
-
// MEMORY LEAK FIX: Clear class expression
|
|
695
|
-
this._classExpr = null;
|
|
696
|
-
// Call parent ngOnDestroy (DatasetAwareFormComponent has cleanup)
|
|
697
|
-
super.ngOnDestroy();
|
|
698
|
-
}
|
|
699
|
-
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: ChipsComponent, deps: [{ token: i0__namespace.Injector }, { token: 'displayfield.bind', attribute: true }, { token: 'displayexpression.bind', attribute: true }, { token: 'displayimagesrc.bind', attribute: true }, { token: 'datafield.bind', attribute: true }, { token: 'dataset.bind', attribute: true }, { token: 'chipclass.bind', attribute: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
|
|
700
|
-
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: ChipsComponent, isStandalone: true, selector: "[wmChips]", providers: [
|
|
701
|
-
base.provideAs(ChipsComponent, forms.NG_VALUE_ACCESSOR, true),
|
|
702
|
-
base.provideAsWidgetRef(ChipsComponent)
|
|
703
|
-
], viewQueries: [{ propertyName: "searchComponent", first: true, predicate: search.SearchComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "@for (item of chipsList; track item) {\n <li class=\"chip-item {{chipclass && !bindChipclass ? chipclass : ''}}\"\n [ngClass]=\"{'active': item.active, 'disabled': disabled}\">\n <a href=\"javascript:void(0)\" class=\"app-chip\"\n (click)=\"handleChipClick($event, item)\"\n (keydown.delete)=\"onDelete($event, item, $index)\"\n (keydown.backspace)=\"onBackspace($event, item, $index)\"\n (keydown.arrowleft)=\"onArrowLeft(item, $index)\"\n (keydown.arrowright)=\"onArrowRight(item, $index)\"\n (focus)=\"handleChipFocus($event, item)\"\n (blur)=\"readonly ? 0 : item.active = false\"\n [ngClass]=\"{'no-drag': !enablereorder,'chip-duplicate bg-danger': item.isDuplicate, 'chip-picture': item.imgSrc}\">\n @if (item.imgSrc) {\n <img data-identifier=\"img\" alt=\"Chip Image\" class=\"button-image-icon\" [src]=\"item.imgSrc\"/>\n }\n <span class=\"app-chip-title\" [textContent]=\"item.label\" [title]=\"item.label\"></span>\n @if (!readonly) {\n <button type=\"button\" [attr.aria-label]=\"'Clear ' + item.label\" class=\"btn btn-transparent\"\n (click)=\"removeItem($event, item, $index);\">\n <i class=\"app-icon wi wi-close\"></i>\n </button>\n }\n </a>\n </li>\n}\n<li class=\"app-chip-search\" [ngClass]=\"{'full-width': inputwidth === 'full'}\">\n <div #search wmSearch class=\"app-chip-input\"\n name=\"app-chip-search\"\n submit.event=\"addItem($event, widget)\"\n beforeservicecall.event=\"invokeOnBeforeServiceCall(inputData)\"\n disabled.bind=\"disabled || readonly || saturate\"\n datafield.bind=\"datafield\"\n allowonlyselect.bind=\"allowonlyselect\"\n searchkey.bind=\"searchkey\"\n orderby.bind=\"orderby\"\n placeholder.bind=\"saturate ? maxSizeReached : placeholder\"\n showsearchicon.bind=\"showsearchicon\"\n tabindex.bind=\"tabindex\"\n minchars.bind=\"minchars\"\n debouncetime.bind=\"debouncetime\"\n matchmode.bind=\"matchmode\"\n datacompletemsg.bind = \"datacompletemsg\"\n groupby.bind=\"groupby\"\n match.bind=\"match\"\n dateformat.bind=\"dateformat\"\n (keydown.enter)=\"stopEvent($event)\"\n (keydown.delete)=\"onTextDelete($event)\"\n (keydown.backspace)=\"onInputClear($event)\"\n (keydown.arrowleft)=\"onArrowLeft()\"\n (keydown.arrowright)=\"onArrowRight()\">\n </div>\n</li>\n", dependencies: [{ kind: "ngmodule", type: i1.CommonModule }, { kind: "directive", type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: base.TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: search.SearchComponent, selector: "[wmSearch]" }] }); }
|
|
704
|
-
}
|
|
705
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: ChipsComponent, decorators: [{
|
|
706
|
-
type: i0.Component,
|
|
707
|
-
args: [{ standalone: true, imports: [i1.CommonModule, base.TextContentDirective, search.SearchComponent], selector: '[wmChips]', providers: [
|
|
708
|
-
base.provideAs(ChipsComponent, forms.NG_VALUE_ACCESSOR, true),
|
|
709
|
-
base.provideAsWidgetRef(ChipsComponent)
|
|
710
|
-
], template: "@for (item of chipsList; track item) {\n <li class=\"chip-item {{chipclass && !bindChipclass ? chipclass : ''}}\"\n [ngClass]=\"{'active': item.active, 'disabled': disabled}\">\n <a href=\"javascript:void(0)\" class=\"app-chip\"\n (click)=\"handleChipClick($event, item)\"\n (keydown.delete)=\"onDelete($event, item, $index)\"\n (keydown.backspace)=\"onBackspace($event, item, $index)\"\n (keydown.arrowleft)=\"onArrowLeft(item, $index)\"\n (keydown.arrowright)=\"onArrowRight(item, $index)\"\n (focus)=\"handleChipFocus($event, item)\"\n (blur)=\"readonly ? 0 : item.active = false\"\n [ngClass]=\"{'no-drag': !enablereorder,'chip-duplicate bg-danger': item.isDuplicate, 'chip-picture': item.imgSrc}\">\n @if (item.imgSrc) {\n <img data-identifier=\"img\" alt=\"Chip Image\" class=\"button-image-icon\" [src]=\"item.imgSrc\"/>\n }\n <span class=\"app-chip-title\" [textContent]=\"item.label\" [title]=\"item.label\"></span>\n @if (!readonly) {\n <button type=\"button\" [attr.aria-label]=\"'Clear ' + item.label\" class=\"btn btn-transparent\"\n (click)=\"removeItem($event, item, $index);\">\n <i class=\"app-icon wi wi-close\"></i>\n </button>\n }\n </a>\n </li>\n}\n<li class=\"app-chip-search\" [ngClass]=\"{'full-width': inputwidth === 'full'}\">\n <div #search wmSearch class=\"app-chip-input\"\n name=\"app-chip-search\"\n submit.event=\"addItem($event, widget)\"\n beforeservicecall.event=\"invokeOnBeforeServiceCall(inputData)\"\n disabled.bind=\"disabled || readonly || saturate\"\n datafield.bind=\"datafield\"\n allowonlyselect.bind=\"allowonlyselect\"\n searchkey.bind=\"searchkey\"\n orderby.bind=\"orderby\"\n placeholder.bind=\"saturate ? maxSizeReached : placeholder\"\n showsearchicon.bind=\"showsearchicon\"\n tabindex.bind=\"tabindex\"\n minchars.bind=\"minchars\"\n debouncetime.bind=\"debouncetime\"\n matchmode.bind=\"matchmode\"\n datacompletemsg.bind = \"datacompletemsg\"\n groupby.bind=\"groupby\"\n match.bind=\"match\"\n dateformat.bind=\"dateformat\"\n (keydown.enter)=\"stopEvent($event)\"\n (keydown.delete)=\"onTextDelete($event)\"\n (keydown.backspace)=\"onInputClear($event)\"\n (keydown.arrowleft)=\"onArrowLeft()\"\n (keydown.arrowright)=\"onArrowRight()\">\n </div>\n</li>\n" }]
|
|
711
|
-
}], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
|
|
712
|
-
type: i0.Attribute,
|
|
713
|
-
args: ['displayfield.bind']
|
|
714
|
-
}] }, { type: undefined, decorators: [{
|
|
715
|
-
type: i0.Attribute,
|
|
716
|
-
args: ['displayexpression.bind']
|
|
717
|
-
}] }, { type: undefined, decorators: [{
|
|
718
|
-
type: i0.Attribute,
|
|
719
|
-
args: ['displayimagesrc.bind']
|
|
720
|
-
}] }, { type: undefined, decorators: [{
|
|
721
|
-
type: i0.Attribute,
|
|
722
|
-
args: ['datafield.bind']
|
|
723
|
-
}] }, { type: undefined, decorators: [{
|
|
724
|
-
type: i0.Attribute,
|
|
725
|
-
args: ['dataset.bind']
|
|
726
|
-
}] }, { type: undefined, decorators: [{
|
|
727
|
-
type: i0.Attribute,
|
|
728
|
-
args: ['chipclass.bind']
|
|
729
|
-
}] }, { type: undefined, decorators: [{
|
|
730
|
-
type: i0.Inject,
|
|
731
|
-
args: ['EXPLICIT_CONTEXT']
|
|
732
|
-
}, {
|
|
733
|
-
type: i0.Optional
|
|
734
|
-
}] }], propDecorators: { searchComponent: [{
|
|
735
|
-
type: i0.ViewChild,
|
|
736
|
-
args: [search.SearchComponent, /* TODO: add static flag */ { static: true }]
|
|
737
|
-
}] } });
|
|
738
|
-
|
|
739
|
-
exports.ChipsComponent = ChipsComponent;
|
|
727
|
+
exports.ChipsComponent = ChipsComponent;
|
|
740
728
|
|
|
741
729
|
}));
|