@clickview/library-editor 1.1.19-dev.0 → 1.1.19-rc.1
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/dist/css/1.chunk.css.map +1 -0
- package/dist/css/10.chunk.css.map +1 -0
- package/dist/css/11.chunk.css +137 -0
- package/dist/css/11.chunk.css.map +1 -0
- package/dist/css/12.chunk.css.map +1 -0
- package/dist/css/13.chunk.css.map +1 -0
- package/dist/css/14.chunk.css.map +1 -0
- package/dist/css/16.chunk.css.map +1 -0
- package/dist/css/17.chunk.css.map +1 -0
- package/dist/css/18.chunk.css.map +1 -0
- package/dist/css/2.chunk.css.map +1 -0
- package/dist/css/21.chunk.css.map +1 -0
- package/dist/css/22.chunk.css.map +1 -0
- package/dist/css/23.chunk.css.map +1 -0
- package/dist/css/25.chunk.css.map +1 -0
- package/dist/css/26.chunk.css.map +1 -0
- package/dist/css/28.chunk.css.map +1 -0
- package/dist/css/29.chunk.css.map +1 -0
- package/dist/css/3.chunk.css +17 -0
- package/dist/css/3.chunk.css.map +1 -0
- package/dist/css/30.chunk.css.map +1 -0
- package/dist/css/31.chunk.css.map +1 -0
- package/dist/css/32.chunk.css.map +1 -0
- package/dist/css/33.chunk.css +16 -0
- package/dist/css/33.chunk.css.map +1 -0
- package/dist/css/34.chunk.css +21 -0
- package/dist/css/34.chunk.css.map +1 -0
- package/dist/css/35.chunk.css +20 -0
- package/dist/css/35.chunk.css.map +1 -0
- package/dist/css/36.chunk.css.map +1 -0
- package/dist/css/37.chunk.css.map +1 -0
- package/dist/css/38.chunk.css.map +1 -0
- package/dist/css/40.chunk.css.map +1 -0
- package/dist/css/41.chunk.css.map +1 -0
- package/dist/css/42.chunk.css.map +1 -0
- package/dist/css/43.chunk.css.map +1 -0
- package/dist/css/44.chunk.css.map +1 -0
- package/dist/css/45.chunk.css.map +1 -0
- package/dist/css/46.chunk.css.map +1 -0
- package/dist/css/47.chunk.css.map +1 -0
- package/dist/css/48.chunk.css.map +1 -0
- package/dist/css/49.chunk.css +35 -0
- package/dist/css/49.chunk.css.map +1 -0
- package/dist/css/50.chunk.css.map +1 -0
- package/dist/css/51.chunk.css.map +1 -0
- package/dist/css/52.chunk.css +66 -0
- package/dist/css/52.chunk.css.map +1 -0
- package/dist/css/55.chunk.css.map +1 -0
- package/dist/css/56.chunk.css.map +1 -0
- package/dist/css/58.chunk.css.map +1 -0
- package/dist/css/59.chunk.css.map +1 -0
- package/dist/css/6.chunk.css.map +1 -0
- package/dist/css/60.chunk.css +18 -0
- package/dist/css/60.chunk.css.map +1 -0
- package/dist/css/62.chunk.css.map +1 -0
- package/dist/css/63.chunk.css +170 -0
- package/dist/css/63.chunk.css.map +1 -0
- package/dist/css/67.chunk.css +78 -0
- package/dist/css/67.chunk.css.map +1 -0
- package/dist/css/68.chunk.css +17 -0
- package/dist/css/68.chunk.css.map +1 -0
- package/dist/css/69.chunk.css +17 -0
- package/dist/css/69.chunk.css.map +1 -0
- package/dist/css/7.chunk.css.map +1 -0
- package/dist/css/70.chunk.css +23 -0
- package/dist/css/70.chunk.css.map +1 -0
- package/dist/css/71.chunk.css +40 -0
- package/dist/css/71.chunk.css.map +1 -0
- package/dist/css/72.chunk.css +16 -0
- package/dist/css/72.chunk.css.map +1 -0
- package/dist/css/73.chunk.css +37 -0
- package/dist/css/73.chunk.css.map +1 -0
- package/dist/css/74.chunk.css +29 -0
- package/dist/css/74.chunk.css.map +1 -0
- package/dist/css/75.chunk.css +6 -0
- package/dist/css/75.chunk.css.map +1 -0
- package/dist/css/76.chunk.css +6 -0
- package/dist/css/76.chunk.css.map +1 -0
- package/dist/css/8.chunk.css.map +1 -0
- package/dist/css/library-editor-app.css +2 -0
- package/dist/css/library-editor-app.css.map +1 -0
- package/dist/en.json +1 -1
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +49 -5
- package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +5 -1
- package/dist/libs/shared/src/apps/search/components/instant-search/classification/ClassificationSearchResultComponent.d.ts +17 -0
- package/dist/libs/shared/src/apps/search/components/instant-search/index.d.ts +1 -0
- package/dist/libs/shared/src/apps/search/enums/SearchQueryType.d.ts +1 -1
- package/dist/libs/shared/src/apps/search/utils/InstantSearchHelper.d.ts +1 -0
- package/dist/libs/shared/src/apps/search/views/search-bar/SearchBarView.d.ts +2 -0
- package/dist/libs/shared/src/apps/upload/services/UploadService.d.ts +3 -2
- package/dist/libs/shared/src/constants/BootstrapKeys.d.ts +1 -0
- package/dist/libs/shared/src/enums/CountryCode.d.ts +5 -0
- package/dist/libs/shared/src/enums/SubtitleExtractionOptions.d.ts +4 -0
- package/dist/libs/shared/src/enums/WidgetContents.d.ts +2 -1
- package/dist/libs/shared/src/interfaces/app-variables/BaseSearchAppVariables.d.ts +1 -1
- package/dist/libs/shared/src/interfaces/models/Classification.d.ts +1 -0
- package/dist/libs/shared/src/interfaces/models/Config.d.ts +3 -1
- package/dist/libs/shared/src/interfaces/models/Group.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Theme.d.ts +1 -2
- package/dist/libs/shared/src/interfaces/models/User.d.ts +2 -1
- package/dist/libs/shared/src/interfaces/models/UserChannel.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/index.d.ts +2 -0
- package/dist/libs/shared/src/legacy/components/thumbnail/ThumbnailComponent.d.ts +1 -0
- package/dist/projects/library-editor/src/apps/default/DefaultApplication.d.ts +1 -1
- package/dist/scripts/{0-48b01028ea.chunk.js → 0-8cdf48d69e.chunk.js} +1 -1
- package/dist/scripts/0.chunk.js +1034 -0
- package/dist/scripts/0.chunk.js.map +1 -0
- package/dist/scripts/1-a197f0efeb.chunk.js +1 -0
- package/dist/scripts/1.chunk.js +442 -0
- package/dist/scripts/1.chunk.js.map +1 -0
- package/dist/scripts/{10-b4b24c05f8.chunk.js → 10-48aa375ebe.chunk.js} +1 -1
- package/dist/scripts/10.chunk.js +820 -0
- package/dist/scripts/10.chunk.js.map +1 -0
- package/dist/scripts/{11-e79fc84dc9.chunk.js → 11-805aab3b80.chunk.js} +1 -1
- package/dist/scripts/11.chunk.js +4091 -0
- package/dist/scripts/11.chunk.js.map +1 -0
- package/dist/scripts/{12-58284faf21.chunk.js → 12-57671136e8.chunk.js} +1 -1
- package/dist/scripts/12.chunk.js +555 -0
- package/dist/scripts/12.chunk.js.map +1 -0
- package/dist/scripts/{13-2c4cd203ec.chunk.js → 13-46bc40cc23.chunk.js} +1 -1
- package/dist/scripts/13.chunk.js +373 -0
- package/dist/scripts/13.chunk.js.map +1 -0
- package/dist/scripts/{14-2eeb73cd11.chunk.js → 14-556e982a73.chunk.js} +1 -1
- package/dist/scripts/14.chunk.js +2386 -0
- package/dist/scripts/14.chunk.js.map +1 -0
- package/dist/scripts/15-2edbad42a0.chunk.js +1 -0
- package/dist/scripts/15.chunk.js +314 -0
- package/dist/scripts/15.chunk.js.map +1 -0
- package/dist/scripts/{16-68c900303f.chunk.js → 16-60b9a789b4.chunk.js} +1 -1
- package/dist/scripts/16.chunk.js +1290 -0
- package/dist/scripts/16.chunk.js.map +1 -0
- package/dist/scripts/{17-af7eca54ed.chunk.js → 17-d6083dbd9b.chunk.js} +1 -1
- package/dist/scripts/17.chunk.js +381 -0
- package/dist/scripts/17.chunk.js.map +1 -0
- package/dist/scripts/{18-087b42c483.chunk.js → 18-31ce9284d0.chunk.js} +1 -1
- package/dist/scripts/18.chunk.js +393 -0
- package/dist/scripts/18.chunk.js.map +1 -0
- package/dist/scripts/19.chunk.js +364 -0
- package/dist/scripts/19.chunk.js.map +1 -0
- package/dist/scripts/{2-c70309751f.chunk.js → 2-33fcca96e3.chunk.js} +1 -1
- package/dist/scripts/2.chunk.js +519 -0
- package/dist/scripts/2.chunk.js.map +1 -0
- package/dist/scripts/{20-caf95bbe64.chunk.js → 20-3c2f3fb166.chunk.js} +1 -1
- package/dist/scripts/20.chunk.js +317 -0
- package/dist/scripts/20.chunk.js.map +1 -0
- package/dist/scripts/21-9497f03cd8.chunk.js +1 -0
- package/dist/scripts/21.chunk.js +531 -0
- package/dist/scripts/21.chunk.js.map +1 -0
- package/dist/scripts/{22-f2b4962990.chunk.js → 22-22cd929ad4.chunk.js} +1 -1
- package/dist/scripts/22.chunk.js +354 -0
- package/dist/scripts/22.chunk.js.map +1 -0
- package/dist/scripts/{23-d575c690b9.chunk.js → 23-16b02d09f5.chunk.js} +1 -1
- package/dist/scripts/23.chunk.js +605 -0
- package/dist/scripts/23.chunk.js.map +1 -0
- package/dist/scripts/{24-dc5b027075.chunk.js → 24-24699f9007.chunk.js} +1 -1
- package/dist/scripts/24.chunk.js +318 -0
- package/dist/scripts/24.chunk.js.map +1 -0
- package/dist/scripts/{25-956d1e9caf.chunk.js → 25-7a210f731b.chunk.js} +1 -1
- package/dist/scripts/25.chunk.js +365 -0
- package/dist/scripts/25.chunk.js.map +1 -0
- package/dist/scripts/{26-7a3d12d816.chunk.js → 26-263cf0ebce.chunk.js} +1 -1
- package/dist/scripts/26.chunk.js +437 -0
- package/dist/scripts/26.chunk.js.map +1 -0
- package/dist/scripts/{27-dc6045c275.chunk.js → 27-707d8b29f0.chunk.js} +1 -1
- package/dist/scripts/27.chunk.js +3565 -0
- package/dist/scripts/27.chunk.js.map +1 -0
- package/dist/scripts/{28-e7ce349a42.chunk.js → 28-d748f747fa.chunk.js} +1 -1
- package/dist/scripts/28.chunk.js +3129 -0
- package/dist/scripts/28.chunk.js.map +1 -0
- package/dist/scripts/{29-e281d8346a.chunk.js → 29-ef4aaa5fd8.chunk.js} +1 -1
- package/dist/scripts/29.chunk.js +3088 -0
- package/dist/scripts/29.chunk.js.map +1 -0
- package/dist/scripts/{3-afb156ea3e.chunk.js → 3-9ac062f7ab.chunk.js} +1 -1
- package/dist/scripts/3.chunk.js +782 -0
- package/dist/scripts/3.chunk.js.map +1 -0
- package/dist/scripts/{30-d4b6c1cd1d.chunk.js → 30-1b84ae2ac7.chunk.js} +1 -1
- package/dist/scripts/30.chunk.js +1809 -0
- package/dist/scripts/30.chunk.js.map +1 -0
- package/dist/scripts/{31-c1d42342dd.chunk.js → 31-b51d47f02b.chunk.js} +1 -1
- package/dist/scripts/31.chunk.js +958 -0
- package/dist/scripts/31.chunk.js.map +1 -0
- package/dist/scripts/{32-1b1e4c86f5.chunk.js → 32-3f5cffb858.chunk.js} +1 -1
- package/dist/scripts/32.chunk.js +1235 -0
- package/dist/scripts/32.chunk.js.map +1 -0
- package/dist/scripts/33-bd5b8ad402.chunk.js +1 -0
- package/dist/scripts/33.chunk.js +792 -0
- package/dist/scripts/33.chunk.js.map +1 -0
- package/dist/scripts/34-16c6ce9391.chunk.js +1 -0
- package/dist/scripts/34.chunk.js +990 -0
- package/dist/scripts/34.chunk.js.map +1 -0
- package/dist/scripts/35-f0ff6077b5.chunk.js +1 -0
- package/dist/scripts/35.chunk.js +518 -0
- package/dist/scripts/35.chunk.js.map +1 -0
- package/dist/scripts/{36-37f9fd0ad1.chunk.js → 36-6d5df4dbb0.chunk.js} +1 -1
- package/dist/scripts/36.chunk.js +335 -0
- package/dist/scripts/36.chunk.js.map +1 -0
- package/dist/scripts/{37-06db9481cd.chunk.js → 37-1aedf84774.chunk.js} +1 -1
- package/dist/scripts/37.chunk.js +236 -0
- package/dist/scripts/37.chunk.js.map +1 -0
- package/dist/scripts/{38-528abd1bba.chunk.js → 38-9411624870.chunk.js} +1 -1
- package/dist/scripts/38.chunk.js +315 -0
- package/dist/scripts/38.chunk.js.map +1 -0
- package/dist/scripts/{39-80001e779c.chunk.js → 39-f46d2f69b1.chunk.js} +1 -1
- package/dist/scripts/39.chunk.js +116 -0
- package/dist/scripts/39.chunk.js.map +1 -0
- package/dist/scripts/{4-f8a4d0b62a.chunk.js → 4-2bf2f1b864.chunk.js} +1 -1
- package/dist/scripts/4.chunk.js +335 -0
- package/dist/scripts/4.chunk.js.map +1 -0
- package/dist/scripts/{40-d59ee7c3e1.chunk.js → 40-2134ac47ae.chunk.js} +1 -1
- package/dist/scripts/40.chunk.js +1782 -0
- package/dist/scripts/40.chunk.js.map +1 -0
- package/dist/scripts/{41-8c75d122fc.chunk.js → 41-38841ce7ed.chunk.js} +1 -1
- package/dist/scripts/41.chunk.js +2347 -0
- package/dist/scripts/41.chunk.js.map +1 -0
- package/dist/scripts/{42-a68ee26f34.chunk.js → 42-06cb96ddaf.chunk.js} +1 -1
- package/dist/scripts/42.chunk.js +2111 -0
- package/dist/scripts/42.chunk.js.map +1 -0
- package/dist/scripts/{43-bde1af67cb.chunk.js → 43-164d1aaf84.chunk.js} +1 -1
- package/dist/scripts/43.chunk.js +2243 -0
- package/dist/scripts/43.chunk.js.map +1 -0
- package/dist/scripts/{44-abdd275e46.chunk.js → 44-234dd1aac7.chunk.js} +1 -1
- package/dist/scripts/44.chunk.js +1024 -0
- package/dist/scripts/44.chunk.js.map +1 -0
- package/dist/scripts/{45-6b745e57af.chunk.js → 45-26c33d7856.chunk.js} +1 -1
- package/dist/scripts/45.chunk.js +1065 -0
- package/dist/scripts/45.chunk.js.map +1 -0
- package/dist/scripts/{46-bee29b02a3.chunk.js → 46-07c390591d.chunk.js} +1 -1
- package/dist/scripts/46.chunk.js +613 -0
- package/dist/scripts/46.chunk.js.map +1 -0
- package/dist/scripts/{47-c142425de4.chunk.js → 47-6a9c70d236.chunk.js} +1 -1
- package/dist/scripts/47.chunk.js +735 -0
- package/dist/scripts/47.chunk.js.map +1 -0
- package/dist/scripts/{48-81efa76f40.chunk.js → 48-ee3bf3e841.chunk.js} +1 -1
- package/dist/scripts/48.chunk.js +994 -0
- package/dist/scripts/48.chunk.js.map +1 -0
- package/dist/scripts/{49-cbd218d6e4.chunk.js → 49-73ebbe96d0.chunk.js} +1 -1
- package/dist/scripts/49.chunk.js +759 -0
- package/dist/scripts/49.chunk.js.map +1 -0
- package/dist/scripts/{5-1b6768e719.chunk.js → 5-19ce45d023.chunk.js} +1 -1
- package/dist/scripts/5.chunk.js +40 -0
- package/dist/scripts/5.chunk.js.map +1 -0
- package/dist/scripts/{50-ec2f179d8c.chunk.js → 50-a1439e0fa7.chunk.js} +1 -1
- package/dist/scripts/50.chunk.js +528 -0
- package/dist/scripts/50.chunk.js.map +1 -0
- package/dist/scripts/{51-9b91910fc0.chunk.js → 51-cad32e2046.chunk.js} +1 -1
- package/dist/scripts/51.chunk.js +932 -0
- package/dist/scripts/51.chunk.js.map +1 -0
- package/dist/scripts/{52-d2e93491a5.chunk.js → 52-1d3e8eb21e.chunk.js} +1 -1
- package/dist/scripts/52.chunk.js +408 -0
- package/dist/scripts/52.chunk.js.map +1 -0
- package/dist/scripts/{53-1c8ff136ad.chunk.js → 53-5e80e33e98.chunk.js} +1 -1
- package/dist/scripts/53.chunk.js +754 -0
- package/dist/scripts/53.chunk.js.map +1 -0
- package/dist/scripts/{54-34116d34e6.chunk.js → 54-8df01312cc.chunk.js} +1 -1
- package/dist/scripts/54.chunk.js +681 -0
- package/dist/scripts/54.chunk.js.map +1 -0
- package/dist/scripts/{55-02803101de.chunk.js → 55-4c8d7b57f9.chunk.js} +1 -1
- package/dist/scripts/55.chunk.js +645 -0
- package/dist/scripts/55.chunk.js.map +1 -0
- package/dist/scripts/{56-19ec4b6ccd.chunk.js → 56-1d96fdfcd3.chunk.js} +1 -1
- package/dist/scripts/56.chunk.js +346 -0
- package/dist/scripts/56.chunk.js.map +1 -0
- package/dist/scripts/{57-17e93c944c.chunk.js → 57-c17cdf728f.chunk.js} +1 -1
- package/dist/scripts/57.chunk.js +422 -0
- package/dist/scripts/57.chunk.js.map +1 -0
- package/dist/scripts/{58-dd77463e63.chunk.js → 58-ce34e558f4.chunk.js} +1 -1
- package/dist/scripts/58.chunk.js +437 -0
- package/dist/scripts/58.chunk.js.map +1 -0
- package/dist/scripts/{59-08e8830b9c.chunk.js → 59-cc8e184cce.chunk.js} +1 -1
- package/dist/scripts/59.chunk.js +342 -0
- package/dist/scripts/59.chunk.js.map +1 -0
- package/dist/scripts/6-e9685801b5.chunk.js +1 -0
- package/dist/scripts/6.chunk.js +484 -0
- package/dist/scripts/6.chunk.js.map +1 -0
- package/dist/scripts/{60-720797bb78.chunk.js → 60-8d73b65e4e.chunk.js} +1 -1
- package/dist/scripts/60.chunk.js +254 -0
- package/dist/scripts/60.chunk.js.map +1 -0
- package/dist/scripts/{61-66e55ae6e1.chunk.js → 61-bd804db13e.chunk.js} +1 -1
- package/dist/scripts/61.chunk.js +318 -0
- package/dist/scripts/61.chunk.js.map +1 -0
- package/dist/scripts/{62-beb29b208b.chunk.js → 62-827229b727.chunk.js} +1 -1
- package/dist/scripts/62.chunk.js +142 -0
- package/dist/scripts/62.chunk.js.map +1 -0
- package/dist/scripts/{63-bbc787afe7.chunk.js → 63-7251ac44d0.chunk.js} +1 -1
- package/dist/scripts/63.chunk.js +147 -0
- package/dist/scripts/63.chunk.js.map +1 -0
- package/dist/scripts/{64-b10c083c61.chunk.js → 64-33ca5259e4.chunk.js} +1 -1
- package/dist/scripts/64.chunk.js +439 -0
- package/dist/scripts/64.chunk.js.map +1 -0
- package/dist/scripts/{65-40c1cc2f53.chunk.js → 65-50d52bf3df.chunk.js} +1 -1
- package/dist/scripts/65.chunk.js +582 -0
- package/dist/scripts/65.chunk.js.map +1 -0
- package/dist/scripts/{66-32ae3ca73f.chunk.js → 66-fe41a3b54a.chunk.js} +1 -1
- package/dist/scripts/66.chunk.js +442 -0
- package/dist/scripts/66.chunk.js.map +1 -0
- package/dist/scripts/{67-1f082de6fd.chunk.js → 67-1508455eb9.chunk.js} +1 -1
- package/dist/scripts/67.chunk.js +295 -0
- package/dist/scripts/67.chunk.js.map +1 -0
- package/dist/scripts/{68-f53fbad25f.chunk.js → 68-21e8520126.chunk.js} +1 -1
- package/dist/scripts/68.chunk.js +165 -0
- package/dist/scripts/68.chunk.js.map +1 -0
- package/dist/scripts/{69-984061e3b8.chunk.js → 69-4d26485024.chunk.js} +1 -1
- package/dist/scripts/69.chunk.js +248 -0
- package/dist/scripts/69.chunk.js.map +1 -0
- package/dist/scripts/{7-7d12e809a2.chunk.js → 7-d0085fdf2e.chunk.js} +1 -1
- package/dist/scripts/7.chunk.js +309 -0
- package/dist/scripts/7.chunk.js.map +1 -0
- package/dist/scripts/{70-8edf7afb7b.chunk.js → 70-8e1d03a7d8.chunk.js} +1 -1
- package/dist/scripts/70.chunk.js +207 -0
- package/dist/scripts/70.chunk.js.map +1 -0
- package/dist/scripts/{71-6365b9e3d4.chunk.js → 71-b835514c89.chunk.js} +1 -1
- package/dist/scripts/71.chunk.js +237 -0
- package/dist/scripts/71.chunk.js.map +1 -0
- package/dist/scripts/{72-85505b2300.chunk.js → 72-23d6083900.chunk.js} +1 -1
- package/dist/scripts/72.chunk.js +331 -0
- package/dist/scripts/72.chunk.js.map +1 -0
- package/dist/scripts/73.chunk.js +404 -0
- package/dist/scripts/73.chunk.js.map +1 -0
- package/dist/scripts/74.chunk.js +301 -0
- package/dist/scripts/74.chunk.js.map +1 -0
- package/dist/scripts/75.chunk.js +231 -0
- package/dist/scripts/75.chunk.js.map +1 -0
- package/dist/scripts/76.chunk.js +157 -0
- package/dist/scripts/76.chunk.js.map +1 -0
- package/dist/scripts/77.chunk.js +307 -0
- package/dist/scripts/77.chunk.js.map +1 -0
- package/dist/scripts/78.chunk.js +249 -0
- package/dist/scripts/78.chunk.js.map +1 -0
- package/dist/scripts/79.chunk.js +282 -0
- package/dist/scripts/79.chunk.js.map +1 -0
- package/dist/scripts/{8-76e9f1bbc7.chunk.js → 8-0ebd446b65.chunk.js} +1 -1
- package/dist/scripts/8.chunk.js +307 -0
- package/dist/scripts/8.chunk.js.map +1 -0
- package/dist/scripts/80.chunk.js +308 -0
- package/dist/scripts/80.chunk.js.map +1 -0
- package/dist/scripts/81.chunk.js +366 -0
- package/dist/scripts/81.chunk.js.map +1 -0
- package/dist/scripts/82.chunk.js +314 -0
- package/dist/scripts/82.chunk.js.map +1 -0
- package/dist/scripts/83.chunk.js +328 -0
- package/dist/scripts/83.chunk.js.map +1 -0
- package/dist/scripts/84.chunk.js +313 -0
- package/dist/scripts/84.chunk.js.map +1 -0
- package/dist/scripts/85.chunk.js +291 -0
- package/dist/scripts/85.chunk.js.map +1 -0
- package/dist/scripts/86.chunk.js +119 -0
- package/dist/scripts/86.chunk.js.map +1 -0
- package/dist/scripts/87.chunk.js +219 -0
- package/dist/scripts/87.chunk.js.map +1 -0
- package/dist/scripts/88.chunk.js +194 -0
- package/dist/scripts/88.chunk.js.map +1 -0
- package/dist/scripts/89.chunk.js +522 -0
- package/dist/scripts/89.chunk.js.map +1 -0
- package/dist/scripts/9-0476e7c063.chunk.js +1 -0
- package/dist/scripts/9.chunk.js +222 -0
- package/dist/scripts/9.chunk.js.map +1 -0
- package/dist/scripts/90.chunk.js +337 -0
- package/dist/scripts/90.chunk.js.map +1 -0
- package/dist/scripts/91.chunk.js +131 -0
- package/dist/scripts/91.chunk.js.map +1 -0
- package/dist/scripts/92.chunk.js +266 -0
- package/dist/scripts/92.chunk.js.map +1 -0
- package/dist/scripts/bundle-511dc1956b.min.js +1 -0
- package/dist/scripts/bundle-8468900bf9.min.js +1 -0
- package/dist/scripts/bundle.js +57527 -0
- package/dist/scripts/bundle.js.map +1 -0
- package/dist/scripts/bundles.json +1 -1
- package/package.json +99 -99
- package/dist/scripts/1-098c567081.chunk.js +0 -1
- package/dist/scripts/15-6fa6f47a8b.chunk.js +0 -1
- package/dist/scripts/21-5d5cda7f47.chunk.js +0 -1
- package/dist/scripts/33-7ef65d086d.chunk.js +0 -1
- package/dist/scripts/34-6d7e7405af.chunk.js +0 -1
- package/dist/scripts/35-7d7e41a203.chunk.js +0 -1
- package/dist/scripts/6-e87b3c0be1.chunk.js +0 -1
- package/dist/scripts/9-a04919dbb2.chunk.js +0 -1
- package/dist/scripts/bundle-f3260e8016.min.js +0 -1
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
(window["webpackJsonp_clickview_library_editor"] = window["webpackJsonp_clickview_library_editor"] || []).push([[13],{
|
|
2
|
+
|
|
3
|
+
/***/ "./src/shared/components/select/Select.hbs":
|
|
4
|
+
/*!*************************************************!*\
|
|
5
|
+
!*** ./src/shared/components/select/Select.hbs ***!
|
|
6
|
+
\*************************************************/
|
|
7
|
+
/*! no static exports found */
|
|
8
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
9
|
+
|
|
10
|
+
var Handlebars = __webpack_require__(/*! handlebars */ "handlebars");
|
|
11
|
+
module.exports = (Handlebars['default'] || Handlebars).template({"1":function(container,depth0,helpers,partials,data) {
|
|
12
|
+
var stack1, alias1=container.propertyIsEnumerable;
|
|
13
|
+
|
|
14
|
+
return container.escapeExpression(container.lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.disabled : stack1), depth0));
|
|
15
|
+
},"3":function(container,depth0,helpers,partials,data) {
|
|
16
|
+
return " disabled";
|
|
17
|
+
},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
|
|
18
|
+
var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {});
|
|
19
|
+
|
|
20
|
+
return "<button \r\n class=\"dropdown-toggle form-control btn-block text-left position-relative "
|
|
21
|
+
+ alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.selectButton : stack1), depth0))
|
|
22
|
+
+ " "
|
|
23
|
+
+ ((stack1 = helpers["if"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
|
24
|
+
+ "\" \r\n type=\"button\" \r\n id=\"dropdownMenuButton\" \r\n data-toggle=\"dropdown\" \r\n aria-haspopup=\"true\" \r\n aria-expanded=\"false\"\r\n "
|
|
25
|
+
+ ((stack1 = helpers["if"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
|
26
|
+
+ " \r\n name=\""
|
|
27
|
+
+ alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.inputName : stack1), depth0))
|
|
28
|
+
+ "\"\r\n >\r\n "
|
|
29
|
+
+ alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.placeholderText : stack1), depth0))
|
|
30
|
+
+ "\r\n</button>\r\n<div class=\"dropdown-region\"></div>\r\n<div class=\"form-feedback\"></div>";
|
|
31
|
+
},"useData":true});
|
|
32
|
+
|
|
33
|
+
/***/ }),
|
|
34
|
+
|
|
35
|
+
/***/ "./src/shared/components/select/SelectComponent.ts":
|
|
36
|
+
/*!*********************************************************!*\
|
|
37
|
+
!*** ./src/shared/components/select/SelectComponent.ts ***!
|
|
38
|
+
\*********************************************************/
|
|
39
|
+
/*! exports provided: SelectComponent */
|
|
40
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
41
|
+
|
|
42
|
+
"use strict";
|
|
43
|
+
__webpack_require__.r(__webpack_exports__);
|
|
44
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectComponent", function() { return SelectComponent; });
|
|
45
|
+
/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! underscore */ "underscore");
|
|
46
|
+
/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(underscore__WEBPACK_IMPORTED_MODULE_0__);
|
|
47
|
+
/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! backbone */ "backbone");
|
|
48
|
+
/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(backbone__WEBPACK_IMPORTED_MODULE_1__);
|
|
49
|
+
/* harmony import */ var _libs_common_src_backbone__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../libs/common/src/backbone */ "../../libs/common/src/backbone/index.ts");
|
|
50
|
+
/* harmony import */ var _dropdown_DropdownComponentCollection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dropdown/DropdownComponentCollection */ "./src/shared/components/dropdown/DropdownComponentCollection.ts");
|
|
51
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/shared/utils/index.ts");
|
|
52
|
+
/* harmony import */ var _Select_hbs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Select.hbs */ "./src/shared/components/select/Select.hbs");
|
|
53
|
+
/* harmony import */ var _Select_hbs__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_Select_hbs__WEBPACK_IMPORTED_MODULE_5__);
|
|
54
|
+
/* harmony import */ var _select_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./select.scss */ "./src/shared/components/select/select.scss");
|
|
55
|
+
/* harmony import */ var _select_scss__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_select_scss__WEBPACK_IMPORTED_MODULE_6__);
|
|
56
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
57
|
+
|
|
58
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
59
|
+
|
|
60
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
61
|
+
|
|
62
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
63
|
+
|
|
64
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
65
|
+
|
|
66
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
67
|
+
|
|
68
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
69
|
+
|
|
70
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
71
|
+
|
|
72
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
73
|
+
|
|
74
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
75
|
+
|
|
76
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
var ENTER_KEYCODE = 13;
|
|
86
|
+
var UP_ARROW_KEYCODE = 38;
|
|
87
|
+
var DOWN_ARROW_KEYCODE = 40;
|
|
88
|
+
var TYPING_TIMEOUT = 500;
|
|
89
|
+
var SelectComponent = /*#__PURE__*/function (_Core$Component) {
|
|
90
|
+
_inherits(SelectComponent, _Core$Component);
|
|
91
|
+
|
|
92
|
+
var _super = _createSuper(SelectComponent);
|
|
93
|
+
|
|
94
|
+
function SelectComponent(options) {
|
|
95
|
+
var _this;
|
|
96
|
+
|
|
97
|
+
_classCallCheck(this, SelectComponent);
|
|
98
|
+
|
|
99
|
+
_this = _super.call(this, options); // Component state
|
|
100
|
+
|
|
101
|
+
_this.selectSearch = '';
|
|
102
|
+
_this.sameCharIndex = 1;
|
|
103
|
+
_this.optionStep = 1;
|
|
104
|
+
return _this;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
_createClass(SelectComponent, [{
|
|
108
|
+
key: "initialize",
|
|
109
|
+
value: function initialize() {
|
|
110
|
+
this.setModel();
|
|
111
|
+
this.bindListeners();
|
|
112
|
+
}
|
|
113
|
+
}, {
|
|
114
|
+
key: "regions",
|
|
115
|
+
value: function regions() {
|
|
116
|
+
return {
|
|
117
|
+
dropdown: {
|
|
118
|
+
el: '.dropdown-region',
|
|
119
|
+
replaceElement: true
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
key: "events",
|
|
125
|
+
value: function events() {
|
|
126
|
+
return {
|
|
127
|
+
'keydown': 'onKeydown',
|
|
128
|
+
'shown.bs.dropdown': 'onShowDropdown'
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
key: "bindListeners",
|
|
133
|
+
value: function bindListeners() {
|
|
134
|
+
this.listenTo(this.options.channelName, this.options.childOptions.eventName, this.onSelect);
|
|
135
|
+
}
|
|
136
|
+
}, {
|
|
137
|
+
key: "onShowDropdown",
|
|
138
|
+
value: function onShowDropdown(e) {
|
|
139
|
+
var radio = backbone__WEBPACK_IMPORTED_MODULE_1__["Radio"].channel(this.options.channelName);
|
|
140
|
+
radio.trigger('center:dropdown');
|
|
141
|
+
}
|
|
142
|
+
}, {
|
|
143
|
+
key: "onKeydown",
|
|
144
|
+
value: function onKeydown(event) {
|
|
145
|
+
if (event.keyCode === UP_ARROW_KEYCODE || event.keyCode === DOWN_ARROW_KEYCODE) {
|
|
146
|
+
this.onArrowKeyDown(event);
|
|
147
|
+
} else if (event.keyCode === ENTER_KEYCODE) {
|
|
148
|
+
this.render();
|
|
149
|
+
} else {
|
|
150
|
+
this.onType(event);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
var radio = backbone__WEBPACK_IMPORTED_MODULE_1__["Radio"].channel(this.options.channelName);
|
|
154
|
+
radio.trigger('center:dropdown');
|
|
155
|
+
}
|
|
156
|
+
}, {
|
|
157
|
+
key: "onArrowKeyDown",
|
|
158
|
+
value: function onArrowKeyDown(event) {
|
|
159
|
+
if (_utils__WEBPACK_IMPORTED_MODULE_4__["CollectionHelpers"].getSelected(this.collection)) {
|
|
160
|
+
this.optionStep = 1;
|
|
161
|
+
} else {
|
|
162
|
+
this.optionStep = 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
var selectedModel = this.getNextModel(event.keyCode);
|
|
166
|
+
|
|
167
|
+
if (!selectedModel) {
|
|
168
|
+
_utils__WEBPACK_IMPORTED_MODULE_4__["CollectionHelpers"].deselectAll(this.collection);
|
|
169
|
+
selectedModel = this.getNextModel(event.keyCode);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
while (this.isDisabled(selectedModel)) {
|
|
173
|
+
this.optionStep++;
|
|
174
|
+
selectedModel = this.getNextModel(event.keyCode);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
this.onSelect(selectedModel);
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
key: "onType",
|
|
181
|
+
value: function onType(event) {
|
|
182
|
+
// Returns if keys such as "Tab" or "Backspace" are pressed
|
|
183
|
+
if (event.key.toString().length !== 1) return;
|
|
184
|
+
var modelMatch = this.getModelMatch(event);
|
|
185
|
+
if (modelMatch) this.onSelect(modelMatch);
|
|
186
|
+
this.runTimer();
|
|
187
|
+
}
|
|
188
|
+
}, {
|
|
189
|
+
key: "onSelect",
|
|
190
|
+
value: function onSelect(model) {
|
|
191
|
+
if (this.isDisabled(model)) return;
|
|
192
|
+
_utils__WEBPACK_IMPORTED_MODULE_4__["CollectionHelpers"].setSelected(model.get('id'), this.collection);
|
|
193
|
+
this.setModel();
|
|
194
|
+
this.getUI('dropdownToggle').text(this.getButtonText());
|
|
195
|
+
var radio = backbone__WEBPACK_IMPORTED_MODULE_1__["Radio"].channel(this.options.channelName);
|
|
196
|
+
radio.trigger('select:option:selected', model);
|
|
197
|
+
}
|
|
198
|
+
}, {
|
|
199
|
+
key: "setModel",
|
|
200
|
+
value: function setModel() {
|
|
201
|
+
this.model = _utils__WEBPACK_IMPORTED_MODULE_4__["CollectionHelpers"].getSelected(this.collection);
|
|
202
|
+
}
|
|
203
|
+
}, {
|
|
204
|
+
key: "getNextModel",
|
|
205
|
+
value: function getNextModel(key) {
|
|
206
|
+
var currentModel = _utils__WEBPACK_IMPORTED_MODULE_4__["CollectionHelpers"].getSelected(this.collection) || this.collection.first();
|
|
207
|
+
var index = this.collection.indexOf(currentModel);
|
|
208
|
+
var nextModel;
|
|
209
|
+
|
|
210
|
+
if (key === UP_ARROW_KEYCODE) {
|
|
211
|
+
nextModel = this.collection.at(index - this.optionStep);
|
|
212
|
+
} else {
|
|
213
|
+
nextModel = this.collection.at(index + this.optionStep);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* This handles cases where users downstroke into 1 or more
|
|
217
|
+
* disabled folders that stretch until the end of the collection.
|
|
218
|
+
* This will wrap their selection back to the top.
|
|
219
|
+
*/
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
if (!nextModel) {
|
|
223
|
+
_utils__WEBPACK_IMPORTED_MODULE_4__["CollectionHelpers"].deselectAll(this.collection);
|
|
224
|
+
nextModel = this.collection.first();
|
|
225
|
+
this.optionStep = 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return nextModel;
|
|
229
|
+
}
|
|
230
|
+
}, {
|
|
231
|
+
key: "getModelMatch",
|
|
232
|
+
value: function getModelMatch(event) {
|
|
233
|
+
var _this2 = this;
|
|
234
|
+
|
|
235
|
+
var modelSearchResult;
|
|
236
|
+
|
|
237
|
+
if (this.selectSearch.length === 1 && this.selectSearch === event.key) {
|
|
238
|
+
modelSearchResult = this.handleSameCharIndex(event.key);
|
|
239
|
+
} else {
|
|
240
|
+
this.selectSearch += event.key;
|
|
241
|
+
this.sameCharIndex = 1;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (!modelSearchResult) {
|
|
245
|
+
modelSearchResult = underscore__WEBPACK_IMPORTED_MODULE_0__["find"](this.collection.models, function (model) {
|
|
246
|
+
return model.get(_this2.options.displayProperty).toLowerCase().slice(0, _this2.selectSearch.length).includes(_this2.selectSearch.toLowerCase());
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return modelSearchResult;
|
|
251
|
+
}
|
|
252
|
+
}, {
|
|
253
|
+
key: "handleSameCharIndex",
|
|
254
|
+
value: function handleSameCharIndex(keyCode) {
|
|
255
|
+
var _this3 = this;
|
|
256
|
+
|
|
257
|
+
var models = underscore__WEBPACK_IMPORTED_MODULE_0__["filter"](this.collection.models, function (model) {
|
|
258
|
+
return model.get(_this3.options.displayProperty).toLowerCase().slice(0, 1) === keyCode;
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
if (models.length > 1) {
|
|
262
|
+
/**
|
|
263
|
+
* When a user types the first char of their search, then they
|
|
264
|
+
* type that char again, rather than append that char to the search
|
|
265
|
+
* string (e.g. "aa"), we instead search for the next option in the
|
|
266
|
+
* dropdown that starts with "a", then increment sameCharIndex for cases
|
|
267
|
+
* where the user continues pressing "a" for example.
|
|
268
|
+
*/
|
|
269
|
+
var modelSearchResult = models[this.sameCharIndex];
|
|
270
|
+
|
|
271
|
+
if (!modelSearchResult) {
|
|
272
|
+
modelSearchResult = underscore__WEBPACK_IMPORTED_MODULE_0__["first"](models);
|
|
273
|
+
this.sameCharIndex = 0;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
this.sameCharIndex++;
|
|
277
|
+
return modelSearchResult;
|
|
278
|
+
} else {
|
|
279
|
+
return underscore__WEBPACK_IMPORTED_MODULE_0__["first"](models);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}, {
|
|
283
|
+
key: "runTimer",
|
|
284
|
+
value: function runTimer() {
|
|
285
|
+
var _this4 = this;
|
|
286
|
+
|
|
287
|
+
if (this.scopedTimerIndex) clearTimeout(this.scopedTimerIndex);
|
|
288
|
+
this.scopedTimerIndex = window.setTimeout(function () {
|
|
289
|
+
_this4.selectSearch = '';
|
|
290
|
+
}, TYPING_TIMEOUT);
|
|
291
|
+
}
|
|
292
|
+
}, {
|
|
293
|
+
key: "isDisabled",
|
|
294
|
+
value: function isDisabled(model) {
|
|
295
|
+
if (model.get('divider')) return true;
|
|
296
|
+
if (!underscore__WEBPACK_IMPORTED_MODULE_0__["isFunction"](this.options.childOptions.isDisabled)) return false;
|
|
297
|
+
return this.options.childOptions.isDisabled.apply(this, arguments);
|
|
298
|
+
}
|
|
299
|
+
}, {
|
|
300
|
+
key: "getButtonText",
|
|
301
|
+
value: function getButtonText() {
|
|
302
|
+
if (this.options.disabled) return this.options.noOptionsText;
|
|
303
|
+
var selection = _utils__WEBPACK_IMPORTED_MODULE_4__["CollectionHelpers"].getSelected(this.collection);
|
|
304
|
+
return selection && selection.get(this.options.displayProperty) || this.options.placeholderText;
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
key: "viewOptions",
|
|
308
|
+
value: function viewOptions() {
|
|
309
|
+
return {
|
|
310
|
+
styles: _select_scss__WEBPACK_IMPORTED_MODULE_6___default.a,
|
|
311
|
+
inputName: this.options.inputName,
|
|
312
|
+
disabled: this.options.disabled,
|
|
313
|
+
placeholderText: this.getButtonText()
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
}, {
|
|
317
|
+
key: "onRender",
|
|
318
|
+
value: function onRender() {
|
|
319
|
+
this.showChildView('dropdown', new _dropdown_DropdownComponentCollection__WEBPACK_IMPORTED_MODULE_3__["DropdownComponentCollection"]({
|
|
320
|
+
collection: this.collection,
|
|
321
|
+
channelName: this.options.channelName,
|
|
322
|
+
childOptions: underscore__WEBPACK_IMPORTED_MODULE_0__["extend"](this.options.childOptions),
|
|
323
|
+
displayOptions: {
|
|
324
|
+
extraClasses: "w-100 ".concat(_select_scss__WEBPACK_IMPORTED_MODULE_6___default.a.dropdownMenu)
|
|
325
|
+
},
|
|
326
|
+
analyticsHelper: this.options.analyticsHelper
|
|
327
|
+
}));
|
|
328
|
+
}
|
|
329
|
+
}, {
|
|
330
|
+
key: "name",
|
|
331
|
+
get: function get() {
|
|
332
|
+
return 'SelectComponent';
|
|
333
|
+
}
|
|
334
|
+
}, {
|
|
335
|
+
key: "template",
|
|
336
|
+
get: function get() {
|
|
337
|
+
return _Select_hbs__WEBPACK_IMPORTED_MODULE_5___default.a;
|
|
338
|
+
}
|
|
339
|
+
}, {
|
|
340
|
+
key: "defaults",
|
|
341
|
+
get: function get() {
|
|
342
|
+
return {
|
|
343
|
+
displayProperty: 'name'
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
}, {
|
|
347
|
+
key: "elements",
|
|
348
|
+
get: function get() {
|
|
349
|
+
return {
|
|
350
|
+
dropdownToggle: '.dropdown-toggle'
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
}]);
|
|
354
|
+
|
|
355
|
+
return SelectComponent;
|
|
356
|
+
}(_libs_common_src_backbone__WEBPACK_IMPORTED_MODULE_2__["Core"].Component);
|
|
357
|
+
|
|
358
|
+
/***/ }),
|
|
359
|
+
|
|
360
|
+
/***/ "./src/shared/components/select/select.scss":
|
|
361
|
+
/*!**************************************************!*\
|
|
362
|
+
!*** ./src/shared/components/select/select.scss ***!
|
|
363
|
+
\**************************************************/
|
|
364
|
+
/*! no static exports found */
|
|
365
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
366
|
+
|
|
367
|
+
// extracted by mini-css-extract-plugin
|
|
368
|
+
module.exports = {"dropdownMenu":"cv--dropdownMenu--2RaQu","selectButton":"cv--selectButton--2xGqi","disabled":"cv--disabled--15kWr"};
|
|
369
|
+
|
|
370
|
+
/***/ })
|
|
371
|
+
|
|
372
|
+
}]);
|
|
373
|
+
//# sourceMappingURL=13.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/shared/components/select/Select.hbs","file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/shared/components/select/SelectComponent.ts","webpack://@clickview/library-editor/./src/shared/components/select/select.scss?d7a2"],"names":[],"mappings":";;;;;;;;;AAAA,iBAAiB,mBAAO,CAAC,8BAAY;AACrC,iEAAiE;AACjE;;AAEA;AACA,CAAC;AACD;AACA,CAAC;AACD,gLAAgL;;AAEhL;AACA;AACA;AACA,uIAAuI,qBAAqB,yEAAyE;AACrO;AACA,uIAAuI,qBAAqB,yEAAyE;AACrO;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrBjB;AACA;AAEA;AAEA;AACA;AAEA;AACA;AAwBA,IAAM,aAAa,GAAG,EAAtB;AACA,IAAM,gBAAgB,GAAG,EAAzB;AACA,IAAM,kBAAkB,GAAG,EAA3B;AACA,IAAM,cAAc,GAAG,GAAvB;AAEO,IAAM,eAAb;AAAA;;AAAA;;AAUE,2BAAmB,OAAnB,EAAkD;AAAA;;AAAA;;AA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A;AAAA,EAAqC,8DAAI,CAAC,SAA1C,E;;;;;;;;;;;ACtCA;AACA,kBAAkB,oH","file":"scripts/13.chunk.js","sourcesContent":["var Handlebars = require('handlebars');\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return container.escapeExpression(container.lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.disabled : stack1), depth0));\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \" disabled\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"<button \\r\\n class=\\\"dropdown-toggle form-control btn-block text-left position-relative \"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.selectButton : stack1), depth0))\n + \" \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" \\r\\n type=\\\"button\\\" \\r\\n id=\\\"dropdownMenuButton\\\" \\r\\n data-toggle=\\\"dropdown\\\" \\r\\n aria-haspopup=\\\"true\\\" \\r\\n aria-expanded=\\\"false\\\"\\r\\n \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \\r\\n name=\\\"\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.inputName : stack1), depth0))\n + \"\\\"\\r\\n >\\r\\n \"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.placeholderText : stack1), depth0))\n + \"\\r\\n</button>\\r\\n<div class=\\\"dropdown-region\\\"></div>\\r\\n<div class=\\\"form-feedback\\\"></div>\";\n},\"useData\":true});","import * as _ from 'underscore';\r\nimport { ObjectHash, Radio } from 'backbone';\r\n\r\nimport { Core } from 'libs/common/core';\r\n\r\nimport { DropdownComponentCollection, DropdownAnalyticsHelper } from 'shared/components/dropdown/DropdownComponentCollection';\r\nimport { CollectionHelpers } from 'shared/utils';\r\n\r\nimport SelectTemplate from './Select.hbs';\r\nimport styles from './select.scss';\r\n\r\nexport interface SelectChildOptions {\r\n channelName?: string;\r\n titleProperty?: string;\r\n eventName: string;\r\n extraClasses?: string;\r\n prefixHandler?: () => string;\r\n currentSelectedMessage?: string;\r\n isDisabled?: (model: Core.Model) => boolean;\r\n truncateOptionNames?: boolean;\r\n}\r\n\r\nexport interface SelectComponentOptions extends Core.ComponentCollectionOptions {\r\n channelName: string;\r\n childOptions: SelectChildOptions;\r\n placeholderText: string;\r\n noOptionsText?: string;\r\n inputName?: string;\r\n disabled?: boolean;\r\n displayProperty?: string;\r\n analyticsHelper: DropdownAnalyticsHelper;\r\n}\r\n\r\nconst ENTER_KEYCODE = 13;\r\nconst UP_ARROW_KEYCODE = 38;\r\nconst DOWN_ARROW_KEYCODE = 40;\r\nconst TYPING_TIMEOUT = 500;\r\n\r\nexport class SelectComponent extends Core.Component {\r\n public collection: Core.Collection;\r\n public options: SelectComponentOptions;\r\n\r\n // Component state\r\n private selectSearch: string = '';\r\n private sameCharIndex: number = 1;\r\n private scopedTimerIndex: number;\r\n private optionStep: number = 1;\r\n\r\n public constructor(options: SelectComponentOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.setModel();\r\n\r\n this.bindListeners();\r\n }\r\n\r\n public get name(): string {\r\n return 'SelectComponent';\r\n }\r\n\r\n public get template(): any {\r\n return SelectTemplate;\r\n }\r\n\r\n public regions(): ObjectHash {\r\n return {\r\n dropdown: {\r\n el: '.dropdown-region',\r\n replaceElement: true\r\n }\r\n };\r\n }\r\n\r\n public events(): ObjectHash {\r\n return {\r\n 'keydown': 'onKeydown',\r\n 'shown.bs.dropdown': 'onShowDropdown'\r\n };\r\n }\r\n\r\n public get defaults(): ObjectHash {\r\n return {\r\n displayProperty: 'name'\r\n };\r\n }\r\n\r\n public get elements(): ObjectHash {\r\n return {\r\n dropdownToggle: '.dropdown-toggle'\r\n };\r\n }\r\n\r\n private bindListeners(): void {\r\n this.listenTo(this.options.channelName, this.options.childOptions.eventName, this.onSelect);\r\n }\r\n\r\n private onShowDropdown(e: JQuery.Event): void {\r\n const radio = Radio.channel(this.options.channelName);\r\n radio.trigger('center:dropdown');\r\n }\r\n\r\n private onKeydown(event: JQueryEventObject): void {\r\n if (event.keyCode === UP_ARROW_KEYCODE || event.keyCode === DOWN_ARROW_KEYCODE) {\r\n this.onArrowKeyDown(event);\r\n } else if (event.keyCode === ENTER_KEYCODE) {\r\n this.render();\r\n } else {\r\n this.onType(event);\r\n }\r\n\r\n const radio = Radio.channel(this.options.channelName);\r\n radio.trigger('center:dropdown');\r\n }\r\n\r\n private onArrowKeyDown(event: JQueryEventObject): void {\r\n if (CollectionHelpers.getSelected(this.collection)) {\r\n this.optionStep = 1;\r\n } else {\r\n this.optionStep = 0;\r\n }\r\n\r\n let selectedModel: Core.Model = this.getNextModel(event.keyCode);\r\n\r\n if (!selectedModel) {\r\n CollectionHelpers.deselectAll(this.collection);\r\n selectedModel = this.getNextModel(event.keyCode);\r\n }\r\n\r\n while (this.isDisabled(selectedModel)) {\r\n this.optionStep++;\r\n selectedModel = this.getNextModel(event.keyCode);\r\n }\r\n\r\n this.onSelect(selectedModel);\r\n }\r\n\r\n private onType(event: JQueryEventObject): void {\r\n // Returns if keys such as \"Tab\" or \"Backspace\" are pressed\r\n if (event.key.toString().length !== 1) return;\r\n\r\n const modelMatch: Core.Model = this.getModelMatch(event);\r\n if (modelMatch)\r\n this.onSelect(modelMatch);\r\n\r\n this.runTimer();\r\n }\r\n\r\n public onSelect(model: Core.Model): void {\r\n if (this.isDisabled(model))\r\n return;\r\n\r\n CollectionHelpers.setSelected(model.get('id'), this.collection);\r\n this.setModel();\r\n this.getUI('dropdownToggle').text(this.getButtonText());\r\n\r\n const radio = Radio.channel(this.options.channelName);\r\n radio.trigger('select:option:selected', model);\r\n }\r\n\r\n public setModel(): void {\r\n this.model = CollectionHelpers.getSelected(this.collection);\r\n }\r\n\r\n private getNextModel(key: number): Core.Model {\r\n const currentModel: Core.Model = CollectionHelpers.getSelected(this.collection) || this.collection.first();\r\n const index: number = this.collection.indexOf(currentModel);\r\n\r\n let nextModel: Core.Model;\r\n if (key === UP_ARROW_KEYCODE) {\r\n nextModel = this.collection.at(index - this.optionStep);\r\n } else {\r\n nextModel = this.collection.at(index + this.optionStep);\r\n }\r\n\r\n /**\r\n * This handles cases where users downstroke into 1 or more\r\n * disabled folders that stretch until the end of the collection.\r\n * This will wrap their selection back to the top.\r\n */\r\n if (!nextModel) {\r\n CollectionHelpers.deselectAll(this.collection);\r\n nextModel = this.collection.first();\r\n this.optionStep = 0;\r\n }\r\n\r\n return nextModel;\r\n }\r\n\r\n private getModelMatch(event: JQueryEventObject): Core.Model {\r\n let modelSearchResult: Core.Model;\r\n if (this.selectSearch.length === 1 && this.selectSearch === event.key) {\r\n modelSearchResult = this.handleSameCharIndex(event.key);\r\n } else {\r\n this.selectSearch += event.key;\r\n this.sameCharIndex = 1;\r\n }\r\n\r\n if (!modelSearchResult) {\r\n modelSearchResult = _.find(this.collection.models, (model: Core.Model) =>\r\n model.get(this.options.displayProperty)\r\n .toLowerCase().slice(0, this.selectSearch.length).includes(this.selectSearch.toLowerCase()));\r\n }\r\n\r\n return modelSearchResult;\r\n }\r\n\r\n private handleSameCharIndex(keyCode: string): Core.Model {\r\n const models: Core.Model[] = _.filter(\r\n this.collection.models, (model: Core.Model) => {\r\n return model.get(this.options.displayProperty).toLowerCase().slice(0, 1) === keyCode;\r\n }\r\n );\r\n if (models.length > 1) {\r\n /**\r\n * When a user types the first char of their search, then they\r\n * type that char again, rather than append that char to the search\r\n * string (e.g. \"aa\"), we instead search for the next option in the\r\n * dropdown that starts with \"a\", then increment sameCharIndex for cases\r\n * where the user continues pressing \"a\" for example.\r\n */\r\n let modelSearchResult = models[this.sameCharIndex];\r\n if (!modelSearchResult) {\r\n modelSearchResult = _.first(models);\r\n this.sameCharIndex = 0;\r\n }\r\n this.sameCharIndex++;\r\n return modelSearchResult;\r\n } else {\r\n return _.first(models);\r\n }\r\n }\r\n\r\n private runTimer(): void {\r\n if (this.scopedTimerIndex)\r\n clearTimeout(this.scopedTimerIndex);\r\n\r\n this.scopedTimerIndex = window.setTimeout(() => {\r\n this.selectSearch = '';\r\n }, TYPING_TIMEOUT);\r\n }\r\n\r\n private isDisabled(model: Core.Model): boolean {\r\n if (model.get('divider'))\r\n return true;\r\n\r\n if (!_.isFunction(this.options.childOptions.isDisabled))\r\n return false;\r\n\r\n return this.options.childOptions.isDisabled.apply(this, arguments);\r\n }\r\n\r\n private getButtonText(): string {\r\n if (this.options.disabled)\r\n return this.options.noOptionsText;\r\n\r\n const selection = CollectionHelpers.getSelected(this.collection);\r\n return (selection && selection.get(this.options.displayProperty)) || this.options.placeholderText;\r\n }\r\n\r\n public viewOptions(): ObjectHash {\r\n return {\r\n styles,\r\n inputName: this.options.inputName,\r\n disabled: this.options.disabled,\r\n placeholderText: this.getButtonText()\r\n };\r\n }\r\n\r\n public onRender(): void {\r\n this.showChildView('dropdown', new DropdownComponentCollection({\r\n collection: this.collection,\r\n channelName: this.options.channelName,\r\n childOptions: _.extend(this.options.childOptions),\r\n displayOptions: {\r\n extraClasses: `w-100 ${styles.dropdownMenu}`\r\n },\r\n analyticsHelper: this.options.analyticsHelper\r\n }));\r\n }\r\n}","// extracted by mini-css-extract-plugin\nmodule.exports = {\"dropdownMenu\":\"cv--dropdownMenu--2RaQu\",\"selectButton\":\"cv--selectButton--2xGqi\",\"disabled\":\"cv--disabled--15kWr\"};"],"sourceRoot":""}
|