@aquera/nile-elements 0.1.57-beta-1.9 → 0.1.57
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/README.md +4 -0
- package/demo/index.html +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +195 -6
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -1
- package/dist/nile-slider/index.cjs.js +2 -0
- package/dist/nile-slider/index.cjs.js.map +1 -0
- package/dist/nile-slider/index.esm.js +1 -0
- package/dist/nile-slider/nile-slider.cjs.js +2 -0
- package/dist/nile-slider/nile-slider.cjs.js.map +1 -0
- package/dist/nile-slider/nile-slider.css.cjs.js +2 -0
- package/dist/nile-slider/nile-slider.css.cjs.js.map +1 -0
- package/dist/nile-slider/nile-slider.css.esm.js +106 -0
- package/dist/nile-slider/nile-slider.esm.js +27 -0
- package/dist/nile-slider/nile-slider.template.cjs.js +2 -0
- package/dist/nile-slider/nile-slider.template.cjs.js.map +1 -0
- package/dist/nile-slider/nile-slider.template.esm.js +59 -0
- package/dist/nile-slider/types/nile-slider.enums.cjs.js +2 -0
- package/dist/nile-slider/types/nile-slider.enums.cjs.js.map +1 -0
- package/dist/nile-slider/types/nile-slider.enums.esm.js +1 -0
- package/dist/nile-slider/types/nile-slider.types.cjs.js +2 -0
- package/dist/nile-slider/types/nile-slider.types.cjs.js.map +1 -0
- package/dist/nile-slider/types/nile-slider.types.esm.js +1 -0
- package/dist/nile-slider/utils/nile-slider.utils.cjs.js +2 -0
- package/dist/nile-slider/utils/nile-slider.utils.cjs.js.map +1 -0
- package/dist/nile-slider/utils/nile-slider.utils.esm.js +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +0 -4
- package/dist/src/nile-select/nile-select.js +1 -31
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-slider/nile-slider.css.d.ts +2 -8
- package/dist/src/nile-slider/nile-slider.css.js +21 -13
- package/dist/src/nile-slider/nile-slider.css.js.map +1 -1
- package/dist/src/nile-slider/nile-slider.d.ts +3 -2
- package/dist/src/nile-slider/nile-slider.js +60 -24
- package/dist/src/nile-slider/nile-slider.js.map +1 -1
- package/dist/src/nile-slider/nile-slider.template.js +33 -4
- package/dist/src/nile-slider/nile-slider.template.js.map +1 -1
- package/dist/src/nile-slider/types/nile-slider.enums.js.map +1 -1
- package/dist/src/nile-slider/utils/nile-slider.utils.js +26 -13
- package/dist/src/nile-slider/utils/nile-slider.utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/index.ts +2 -1
- package/src/nile-select/nile-select.ts +1 -37
- package/src/nile-slider/index.ts +1 -0
- package/src/nile-slider/nile-slider.css.ts +119 -0
- package/src/nile-slider/nile-slider.template.ts +77 -0
- package/src/nile-slider/nile-slider.ts +215 -0
- package/src/nile-slider/types/nile-slider.enums.ts +10 -0
- package/src/nile-slider/types/nile-slider.types.ts +13 -0
- package/src/nile-slider/utils/nile-slider.utils.ts +136 -0
- package/vscode-html-custom-data.json +135 -45
- package/dist/axe.min-2b379f29.cjs.js +0 -12
- package/dist/axe.min-2b379f29.cjs.js.map +0 -1
- package/dist/axe.min-c2cd8733.esm.js +0 -12
- package/dist/fixture-2b5b3aba.esm.js +0 -569
- package/dist/fixture-7bfb866e.cjs.js +0 -395
- package/dist/fixture-7bfb866e.cjs.js.map +0 -1
- package/dist/src/nile-file-preview/index.d.ts +0 -1
- package/dist/src/nile-file-preview/index.js +0 -2
- package/dist/src/nile-file-preview/index.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.css.d.ts +0 -12
- package/dist/src/nile-file-preview/nile-file-preview.css.js +0 -568
- package/dist/src/nile-file-preview/nile-file-preview.css.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.d.ts +0 -50
- package/dist/src/nile-file-preview/nile-file-preview.js +0 -171
- package/dist/src/nile-file-preview/nile-file-preview.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +0 -13
- package/dist/src/nile-file-preview/nile-file-preview.template.js +0 -210
- package/dist/src/nile-file-preview/nile-file-preview.template.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +0 -7
- package/dist/src/nile-file-preview/nile-file-preview.test.js +0 -30
- package/dist/src/nile-file-preview/nile-file-preview.test.js.map +0 -1
- package/dist/src/nile-file-preview/types/index.d.ts +0 -2
- package/dist/src/nile-file-preview/types/index.js +0 -3
- package/dist/src/nile-file-preview/types/index.js.map +0 -1
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.d.ts +0 -28
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.js +0 -33
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.js.map +0 -1
- package/dist/src/nile-file-preview/types/nile-file-preview.interface.d.ts +0 -4
- package/dist/src/nile-file-preview/types/nile-file-preview.interface.js +0 -2
- package/dist/src/nile-file-preview/types/nile-file-preview.interface.js.map +0 -1
- package/dist/src/nile-file-preview/utils/index.d.ts +0 -1
- package/dist/src/nile-file-preview/utils/index.js +0 -2
- package/dist/src/nile-file-preview/utils/index.js.map +0 -1
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +0 -4
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +0 -38
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js.map +0 -1
- package/dist/src/nile-file-upload/index.d.ts +0 -1
- package/dist/src/nile-file-upload/index.js +0 -2
- package/dist/src/nile-file-upload/index.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.css.d.ts +0 -12
- package/dist/src/nile-file-upload/nile-file-upload.css.js +0 -569
- package/dist/src/nile-file-upload/nile-file-upload.css.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.d.ts +0 -48
- package/dist/src/nile-file-upload/nile-file-upload.js +0 -165
- package/dist/src/nile-file-upload/nile-file-upload.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +0 -11
- package/dist/src/nile-file-upload/nile-file-upload.template.js +0 -171
- package/dist/src/nile-file-upload/nile-file-upload.template.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +0 -7
- package/dist/src/nile-file-upload/nile-file-upload.test.js +0 -30
- package/dist/src/nile-file-upload/nile-file-upload.test.js.map +0 -1
- package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +0 -35
- package/dist/src/nile-file-upload/types/file-upload.enums.js +0 -42
- package/dist/src/nile-file-upload/types/file-upload.enums.js.map +0 -1
- package/dist/src/nile-file-upload/types/file-upload.type.d.ts +0 -4
- package/dist/src/nile-file-upload/types/file-upload.type.js +0 -2
- package/dist/src/nile-file-upload/types/file-upload.type.js.map +0 -1
- package/dist/src/nile-file-upload/types/index.d.ts +0 -2
- package/dist/src/nile-file-upload/types/index.js +0 -3
- package/dist/src/nile-file-upload/types/index.js.map +0 -1
- package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +0 -23
- package/dist/src/nile-file-upload/utils/drag-drop.util.js +0 -85
- package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +0 -1
- package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +0 -11
- package/dist/src/nile-file-upload/utils/file-validation.util.js +0 -120
- package/dist/src/nile-file-upload/utils/file-validation.util.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-activity.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-activity.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-activity.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-align-center.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-align-center.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-align-center.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-annotation-x.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-down.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-arrow-up.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-bell-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bell-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bell-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-bold-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bold-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-bold-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-calendar.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-calendar.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-calendar.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-check-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-circle.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-down.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-left.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-right.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-chevron-up.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-copy-03.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-copy-03.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-copy-03.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dots-grid.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-download-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-download-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-download-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-dropdown.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dropdown.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-dropdown.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-edit-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-edit-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-edit-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-edit-05.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-edit-05.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-edit-05.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-expand-06.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-expand-06.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-expand-06.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-file-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-check-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-file-question-03.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-filter-lines.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-grid-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-grid-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-grid-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-help-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-help-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-help-circle.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-image-user-left.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-info-circle.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-info-circle.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-info-circle.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-italic-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-italic-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-italic-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-list.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-list.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-list.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-log-out-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-mail-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-mail-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-mail-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-mail-04.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-mail-04.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-mail-04.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-menu-05.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-menu-05.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-menu-05.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-minimize-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-plus.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-plus.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-plus.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-rocket-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-search-lg.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-search-lg.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-search-lg.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-send-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-send-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-send-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-settings-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-settings-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-settings-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-share-04.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-share-04.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-share-04.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-share-06.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-share-06.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-share-06.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-stars-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-stars-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-stars-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-trash-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trash-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trash-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-trash-03.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trash-03.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trash-03.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-underline-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-underline-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-underline-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-upload-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-upload-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-upload-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-check-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-user-right-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-users-01.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-users-01.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-users-01.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-x-close.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-close.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-close.js.map +0 -1
- package/dist/src/nile-icon/icons/svg/ng-x-square.d.ts +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-square.js +0 -5
- package/dist/src/nile-icon/icons/svg/ng-x-square.js.map +0 -1
@@ -1,165 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright Aquera Inc 2025
|
3
|
-
*
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
6
|
-
*/
|
7
|
-
import { __decorate } from "tslib";
|
8
|
-
import { styles } from './nile-file-upload.css';
|
9
|
-
import NileElement from '../internal/nile-element';
|
10
|
-
import { DragHandler } from './utils/drag-drop.util';
|
11
|
-
import { getDragHandler } from './nile-file-upload.template';
|
12
|
-
import { FileUploadDefaults } from './types/file-upload.enums';
|
13
|
-
import { html } from 'lit';
|
14
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
15
|
-
import { FileUploadState, FileUploadVariant, FileUploadError, FileUploadEvent } from './types/file-upload.enums';
|
16
|
-
import { setUpDragHandler, addGlobalListeners, addInternalListeners, uploadFiles } from './utils/file-validation.util';
|
17
|
-
import { getHorizontalDefaultState, getHorizontalDisabledtState, getHorizontalDragState, getVerticalDefaultState, getVerticalDisabledState, getVerticalDragState, } from './nile-file-upload.template';
|
18
|
-
/**
|
19
|
-
* Nile file-upload component.
|
20
|
-
*
|
21
|
-
* @tag nile-file-upload
|
22
|
-
*
|
23
|
-
*/
|
24
|
-
let NileFileUpload = class NileFileUpload extends NileElement {
|
25
|
-
constructor() {
|
26
|
-
super(...arguments);
|
27
|
-
this.size = 0;
|
28
|
-
this.error = false;
|
29
|
-
this.errorMessage = "";
|
30
|
-
this.allowMultiple = true;
|
31
|
-
this.allowDuplicates = false;
|
32
|
-
this.uploadedFiles = [];
|
33
|
-
this.title = FileUploadDefaults.TITLE;
|
34
|
-
this.subtitle = FileUploadDefaults.SUBTITLE;
|
35
|
-
this.state = FileUploadState.DEFAULT;
|
36
|
-
this.variant = FileUploadVariant.HORIZONTAL;
|
37
|
-
this.fileUploadUrl = "";
|
38
|
-
this.autoUpload = true;
|
39
|
-
this.uploadRequests = new Map();
|
40
|
-
this.setState = (newState) => {
|
41
|
-
this.state = newState;
|
42
|
-
};
|
43
|
-
}
|
44
|
-
/**
|
45
|
-
* The styles for nile-file-upload
|
46
|
-
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
47
|
-
*/
|
48
|
-
static get styles() {
|
49
|
-
return [styles];
|
50
|
-
}
|
51
|
-
connectedCallback() {
|
52
|
-
super.connectedCallback();
|
53
|
-
this.emit(FileUploadEvent.NILE_INIT);
|
54
|
-
}
|
55
|
-
firstUpdated(changedProps) {
|
56
|
-
super.firstUpdated(changedProps);
|
57
|
-
this.dragHandler = new DragHandler();
|
58
|
-
getDragHandler(this.dragHandler);
|
59
|
-
setUpDragHandler(this, this.dragHandler);
|
60
|
-
addInternalListeners(this, this.dragHandler, this.uploadRequests);
|
61
|
-
addGlobalListeners(this.dragHandler);
|
62
|
-
}
|
63
|
-
updated(changedProps) {
|
64
|
-
super.updated(changedProps);
|
65
|
-
if (changedProps.has('uploadedFiles')) {
|
66
|
-
if (this.uploadedFiles.length === 0)
|
67
|
-
this.errorMessage = "";
|
68
|
-
if (!this.fileUploadUrl) {
|
69
|
-
this.errorMessage = FileUploadError.UPLOAD_URL_REQUIRED;
|
70
|
-
return;
|
71
|
-
}
|
72
|
-
uploadFiles(this);
|
73
|
-
this.emit(FileUploadEvent.NILE_CHANGE, { files: this.uploadedFiles });
|
74
|
-
}
|
75
|
-
else if (changedProps.has('state')) {
|
76
|
-
this.dragHandler.setValuesInDragHandler(this.state, this.size, this.uploadedFiles);
|
77
|
-
}
|
78
|
-
}
|
79
|
-
browseFiles() {
|
80
|
-
this.emit(FileUploadEvent.NILE_BROWSE);
|
81
|
-
this.errorMessage = "";
|
82
|
-
this.input.click();
|
83
|
-
}
|
84
|
-
render() {
|
85
|
-
return html `
|
86
|
-
${this.getState()}
|
87
|
-
`;
|
88
|
-
}
|
89
|
-
getState() {
|
90
|
-
return this.variant === FileUploadVariant.HORIZONTAL
|
91
|
-
? this.getHorizontalState()
|
92
|
-
: this.getVerticalState();
|
93
|
-
}
|
94
|
-
getHorizontalState() {
|
95
|
-
switch (this.state) {
|
96
|
-
case FileUploadState.DEFAULT:
|
97
|
-
return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);
|
98
|
-
case FileUploadState.DISABLED:
|
99
|
-
return getHorizontalDisabledtState(this.browseFiles, this.title, this.subtitle);
|
100
|
-
case FileUploadState.DRAG:
|
101
|
-
return getHorizontalDragState();
|
102
|
-
default:
|
103
|
-
return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);
|
104
|
-
}
|
105
|
-
}
|
106
|
-
getVerticalState() {
|
107
|
-
switch (this.state) {
|
108
|
-
case FileUploadState.DEFAULT:
|
109
|
-
return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);
|
110
|
-
case FileUploadState.DISABLED:
|
111
|
-
return getVerticalDisabledState(this.browseFiles, this.title, this.subtitle);
|
112
|
-
case FileUploadState.DRAG:
|
113
|
-
return getVerticalDragState();
|
114
|
-
default:
|
115
|
-
return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);
|
116
|
-
}
|
117
|
-
}
|
118
|
-
disconnectedCallback() {
|
119
|
-
this.emit(FileUploadEvent.NILE_DESTROY);
|
120
|
-
}
|
121
|
-
};
|
122
|
-
__decorate([
|
123
|
-
property({ type: Number })
|
124
|
-
], NileFileUpload.prototype, "size", void 0);
|
125
|
-
__decorate([
|
126
|
-
property({ type: Boolean })
|
127
|
-
], NileFileUpload.prototype, "error", void 0);
|
128
|
-
__decorate([
|
129
|
-
property({ type: String })
|
130
|
-
], NileFileUpload.prototype, "errorMessage", void 0);
|
131
|
-
__decorate([
|
132
|
-
property({ type: Boolean })
|
133
|
-
], NileFileUpload.prototype, "allowMultiple", void 0);
|
134
|
-
__decorate([
|
135
|
-
property({ type: Boolean })
|
136
|
-
], NileFileUpload.prototype, "allowDuplicates", void 0);
|
137
|
-
__decorate([
|
138
|
-
property({ type: Array })
|
139
|
-
], NileFileUpload.prototype, "uploadedFiles", void 0);
|
140
|
-
__decorate([
|
141
|
-
property({ type: String })
|
142
|
-
], NileFileUpload.prototype, "title", void 0);
|
143
|
-
__decorate([
|
144
|
-
property({ type: String })
|
145
|
-
], NileFileUpload.prototype, "subtitle", void 0);
|
146
|
-
__decorate([
|
147
|
-
property({ type: String })
|
148
|
-
], NileFileUpload.prototype, "state", void 0);
|
149
|
-
__decorate([
|
150
|
-
property({ type: String })
|
151
|
-
], NileFileUpload.prototype, "variant", void 0);
|
152
|
-
__decorate([
|
153
|
-
property({ type: String })
|
154
|
-
], NileFileUpload.prototype, "fileUploadUrl", void 0);
|
155
|
-
__decorate([
|
156
|
-
property({ type: Boolean })
|
157
|
-
], NileFileUpload.prototype, "autoUpload", void 0);
|
158
|
-
__decorate([
|
159
|
-
query('input')
|
160
|
-
], NileFileUpload.prototype, "input", void 0);
|
161
|
-
NileFileUpload = __decorate([
|
162
|
-
customElement('nile-file-upload')
|
163
|
-
], NileFileUpload);
|
164
|
-
export { NileFileUpload };
|
165
|
-
//# sourceMappingURL=nile-file-upload.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"nile-file-upload.js","sourceRoot":"","sources":["../../../src/nile-file-upload/nile-file-upload.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,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AAC/C;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAkD;AACjD;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAA2D;AAC1D;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAA4B;AAC3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;kDAA4B;AACvC;IAAf,KAAK,CAAC,OAAO,CAAC;6CAA0B;AArB9B,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAmH1B","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { styles } from './nile-file-upload.css';\nimport { ChangedPropsInterface } from './types/file-upload.type'\nimport NileElement from '../internal/nile-element';\nimport { DragHandler } from './utils/drag-drop.util';\nimport { getDragHandler } from './nile-file-upload.template'\nimport { FileUploadDefaults } from './types/file-upload.enums';\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { FileUploadState, FileUploadVariant, FileUploadError, FileUploadEvent } from './types/file-upload.enums';\nimport { setUpDragHandler, addGlobalListeners, addInternalListeners, uploadFiles, cancelFileUpload } from './utils/file-validation.util';\nimport {\n getHorizontalDefaultState,\n getHorizontalDisabledtState,\n getHorizontalDragState,\n getVerticalDefaultState,\n getVerticalDisabledState,\n getVerticalDragState,\n} from './nile-file-upload.template';\n\n/**\n * Nile file-upload component.\n *\n * @tag nile-file-upload\n *\n */\n@customElement('nile-file-upload')\nexport class NileFileUpload extends NileElement {\n /**\n * The styles for nile-file-upload\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Number }) size: number = 0;\n @property({ type: Boolean}) error: boolean = false;\n @property({ type: String }) errorMessage: string = \"\";\n @property({ type: Boolean}) allowMultiple: boolean = true;\n @property({ type: Boolean}) allowDuplicates: boolean = false;\n @property({ type: Array }) uploadedFiles: File[] = [];\n @property({ type: String }) title: string = FileUploadDefaults.TITLE;\n @property({ type: String }) subtitle: string = FileUploadDefaults.SUBTITLE;\n @property({ type: String }) state: FileUploadState = FileUploadState.DEFAULT; \n @property({ type: String }) variant: FileUploadVariant = FileUploadVariant.HORIZONTAL;\n @property({ type: String }) fileUploadUrl: string = \"\";\n @property({ type: Boolean}) autoUpload: boolean = true;\n @query('input') input!: HTMLInputElement;\n public uploadRequests = new Map<File, XMLHttpRequest>();\n \n private dragHandler!: DragHandler;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit(FileUploadEvent.NILE_INIT);\n }\n\n firstUpdated(changedProps: ChangedPropsInterface): void {\n super.firstUpdated(changedProps);\n\n this.dragHandler = new DragHandler();\n getDragHandler(this.dragHandler);\n setUpDragHandler(this, this.dragHandler);\n addInternalListeners(this, this.dragHandler, this.uploadRequests);\n addGlobalListeners(this.dragHandler);\n }\n\n updated(changedProps: ChangedPropsInterface): void {\n super.updated(changedProps);\n\n if (changedProps.has('uploadedFiles')) {\n if(this.uploadedFiles.length === 0) this.errorMessage = \"\";\n if(!this.fileUploadUrl) {\n this.errorMessage = FileUploadError.UPLOAD_URL_REQUIRED;\n return;\n }\n uploadFiles(this);\n this.emit(FileUploadEvent.NILE_CHANGE, { files: this.uploadedFiles });\n\n } else if (changedProps.has('state')) {\n this.dragHandler.setValuesInDragHandler(this.state, this.size, this.uploadedFiles);\n }\n }\n\n private browseFiles(): void {\n this.emit(FileUploadEvent.NILE_BROWSE);\n this.errorMessage = \"\";\n this.input.click();\n }\n\n public setState = (newState: FileUploadState): void => {\n this.state = newState;\n }\n\n render(): TemplateResult {\n return html`\n ${this.getState()}\n `;\n }\n\n private getState(): TemplateResult {\n return this.variant === FileUploadVariant.HORIZONTAL\n ? this.getHorizontalState()\n : this.getVerticalState();\n }\n\n private getHorizontalState(): TemplateResult {\n switch(this.state) {\n case FileUploadState.DEFAULT:\n return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);\n\n case FileUploadState.DISABLED:\n return getHorizontalDisabledtState(this.browseFiles, this.title, this.subtitle);\n\n case FileUploadState.DRAG:\n return getHorizontalDragState();\n\n default:\n return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);\n }\n }\n\n private getVerticalState(): TemplateResult {\n switch(this.state) {\n case FileUploadState.DEFAULT:\n return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);\n\n case FileUploadState.DISABLED:\n return getVerticalDisabledState(this.browseFiles, this.title, this.subtitle);\n\n case FileUploadState.DRAG:\n return getVerticalDragState();\n\n default:\n return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);\n }\n }\n\n disconnectedCallback(): void {\n this.emit(FileUploadEvent.NILE_DESTROY);\n }\n}\n"]}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { TemplateResult } from 'lit';
|
2
|
-
import './nile-file-upload.css';
|
3
|
-
import { DragHandler } from './utils/drag-drop.util';
|
4
|
-
import { FileUploadState } from './types/file-upload.enums';
|
5
|
-
export declare const getDragHandler: (dragHandler: DragHandler) => void;
|
6
|
-
export declare const getHorizontalDefaultState: (browseFiles: Function, title: string, subtitle: string, errorMessage: string, state: FileUploadState) => TemplateResult;
|
7
|
-
export declare const getHorizontalDisabledtState: (browseFiles: Function, title: string, subtitle: string) => TemplateResult;
|
8
|
-
export declare const getHorizontalDragState: () => TemplateResult;
|
9
|
-
export declare const getVerticalDefaultState: (browseFiles: Function, title: string, subtitle: string, errorMessage: string, state: FileUploadState) => TemplateResult;
|
10
|
-
export declare const getVerticalDisabledState: (browseFiles: Function, title: string, subtitle: string) => TemplateResult;
|
11
|
-
export declare const getVerticalDragState: () => TemplateResult;
|
@@ -1,171 +0,0 @@
|
|
1
|
-
import { html } from 'lit';
|
2
|
-
import './nile-file-upload.css';
|
3
|
-
import { classMap } from 'lit-html/directives/class-map.js';
|
4
|
-
let dragHandlerInstance;
|
5
|
-
export const getDragHandler = (dragHandler) => {
|
6
|
-
dragHandlerInstance = dragHandler;
|
7
|
-
};
|
8
|
-
export const getHorizontalDefaultState = (browseFiles, title, subtitle, errorMessage, state) => html `
|
9
|
-
<div>
|
10
|
-
<div class=${classMap({ 'hover-border': state === "hover", 'horizontal-div': true })}>
|
11
|
-
<div class="inner-div">
|
12
|
-
<slot name="uploadIcon">
|
13
|
-
<nile-icon name="upload" size="24"></nile-icon>
|
14
|
-
</slot>
|
15
|
-
<div class="content">
|
16
|
-
<slot name="title">
|
17
|
-
<h4>${title}</h4>
|
18
|
-
</slot>
|
19
|
-
<slot name="subtitle">
|
20
|
-
<p>${subtitle}</p>
|
21
|
-
</slot>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
<input
|
25
|
-
type="file"
|
26
|
-
@change=${(e) => dragHandlerInstance.handleFiles(e)}
|
27
|
-
multiple
|
28
|
-
/>
|
29
|
-
<slot @click=${browseFiles} name="browseFileButton">
|
30
|
-
<nile-button variant="tertiary">
|
31
|
-
Browse File
|
32
|
-
</nile-button>
|
33
|
-
</slot>
|
34
|
-
</div>
|
35
|
-
${errorMessage ?
|
36
|
-
html `<div class="upload-error">
|
37
|
-
<nile-icon name="warning" size="12" color="red"></nile-icon>
|
38
|
-
<span>${errorMessage}</span>
|
39
|
-
</div>` :
|
40
|
-
html ``}
|
41
|
-
</div>
|
42
|
-
`;
|
43
|
-
export const getHorizontalDisabledtState = (browseFiles, title, subtitle) => html `
|
44
|
-
<div
|
45
|
-
class="horizontal-div disable"
|
46
|
-
>
|
47
|
-
<div class="inner-div">
|
48
|
-
<slot name="uploadIcon">
|
49
|
-
<nile-icon name="upload" size="24"></nile-icon>
|
50
|
-
</slot>
|
51
|
-
<div class="content">
|
52
|
-
<slot name="title">
|
53
|
-
<h4>${title}</h4>
|
54
|
-
</slot>
|
55
|
-
<slot name="subtitle">
|
56
|
-
<p>${subtitle}</p>
|
57
|
-
</slot>
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
<input
|
61
|
-
type="file"
|
62
|
-
@change=${(e) => dragHandlerInstance.handleFiles(e)}
|
63
|
-
multiple
|
64
|
-
/>
|
65
|
-
<slot @click=${browseFiles} name="browseFileButton">
|
66
|
-
<nile-button variant="tertiary">
|
67
|
-
Browse File
|
68
|
-
</nile-button>
|
69
|
-
</slot>
|
70
|
-
</div>
|
71
|
-
`;
|
72
|
-
export const getHorizontalDragState = () => html `
|
73
|
-
<div class="horizontal-div dragging">
|
74
|
-
<div class="icons-container">
|
75
|
-
<nile-icon
|
76
|
-
color="var(--nile-colors-blue-500)"
|
77
|
-
name="general"
|
78
|
-
size="20"
|
79
|
-
class="general-icon"
|
80
|
-
></nile-icon>
|
81
|
-
<nile-icon
|
82
|
-
color="var(--nile-colors-blue-500)"
|
83
|
-
name="image"
|
84
|
-
size="24"
|
85
|
-
class="image-icon"
|
86
|
-
></nile-icon>
|
87
|
-
</div>
|
88
|
-
<p>Drop files here to upload</p>
|
89
|
-
</div>
|
90
|
-
`;
|
91
|
-
// Vertical States
|
92
|
-
export const getVerticalDefaultState = (browseFiles, title, subtitle, errorMessage, state) => html `
|
93
|
-
<div>
|
94
|
-
<div class=${classMap({ 'hover-border': state === "hover", 'vertical-div': true })}>
|
95
|
-
<slot name="uploadIcon">
|
96
|
-
<nile-icon name="upload" size="24"></nile-icon>
|
97
|
-
</slot>
|
98
|
-
<div class="content-container">
|
99
|
-
<slot name="title">
|
100
|
-
<h4>${title}</h4>
|
101
|
-
</slot>
|
102
|
-
<slot name="subtitle">
|
103
|
-
<p>${subtitle}</p>
|
104
|
-
</slot>
|
105
|
-
</div>
|
106
|
-
<input
|
107
|
-
type="file"
|
108
|
-
@change=${(e) => dragHandlerInstance.handleFiles(e)}
|
109
|
-
multiple
|
110
|
-
/>
|
111
|
-
<slot @click=${browseFiles} name="browseFileButton">
|
112
|
-
<nile-button variant="tertiary">
|
113
|
-
Browse File
|
114
|
-
</nile-button>
|
115
|
-
</slot>
|
116
|
-
</div>
|
117
|
-
${errorMessage ?
|
118
|
-
html `<div class="upload-error">
|
119
|
-
<nile-icon name="warning" size="12" color="red"></nile-icon>
|
120
|
-
<span>${errorMessage}</span>
|
121
|
-
</div>` :
|
122
|
-
html ``}
|
123
|
-
</div>
|
124
|
-
`;
|
125
|
-
export const getVerticalDisabledState = (browseFiles, title, subtitle) => html `
|
126
|
-
<div
|
127
|
-
class="vertical-deafult vertical-div disable"
|
128
|
-
>
|
129
|
-
<slot name="uploadIcon">
|
130
|
-
<nile-icon name="upload" size="24"></nile-icon>
|
131
|
-
</slot>
|
132
|
-
<div class="content-container">
|
133
|
-
<slot name="title">
|
134
|
-
<h4>${title}</h4>
|
135
|
-
</slot>
|
136
|
-
<slot name="title">
|
137
|
-
<p>${subtitle}</p>
|
138
|
-
</slot>
|
139
|
-
</div>
|
140
|
-
<input
|
141
|
-
type="file"
|
142
|
-
@change=${(e) => dragHandlerInstance.handleFiles(e)}
|
143
|
-
multiple
|
144
|
-
/>
|
145
|
-
<slot @click=${browseFiles} name="browseFileButton">
|
146
|
-
<nile-button variant="tertiary">
|
147
|
-
Browse File
|
148
|
-
</nile-button>
|
149
|
-
</slot>
|
150
|
-
</div>
|
151
|
-
`;
|
152
|
-
export const getVerticalDragState = () => html `
|
153
|
-
<div class="vertical-div vertical-drag">
|
154
|
-
<div class="icons-container">
|
155
|
-
<nile-icon
|
156
|
-
color="var(--nile-colors-blue-500)"
|
157
|
-
name="general"
|
158
|
-
size="20"
|
159
|
-
class="general-icon"
|
160
|
-
></nile-icon>
|
161
|
-
<nile-icon
|
162
|
-
color="var(--nile-colors-blue-500)"
|
163
|
-
name="image"
|
164
|
-
size="24"
|
165
|
-
class="image-icon"
|
166
|
-
></nile-icon>
|
167
|
-
</div>
|
168
|
-
<p>Drop files here to upload</p>
|
169
|
-
</div>
|
170
|
-
`;
|
171
|
-
//# sourceMappingURL=nile-file-upload.template.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"nile-file-upload.template.js","sourceRoot":"","sources":["../../../src/nile-file-upload/nile-file-upload.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,wBAAwB,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAG5D,IAAI,mBAAgC,CAAC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,WAAwB,EAAQ,EAAE;IAC/D,mBAAmB,GAAG,WAAW,CAAC;AACpC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,WAAqB,EACrB,KAAa,EACb,QAAgB,EAChB,YAAoB,EACpB,KAAsB,EACN,EAAE,CAAC,IAAI,CAAA;;iBAER,QAAQ,CAAC,EAAE,cAAc,EAAE,KAAK,KAAK,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;;;;;;;kBAOtE,KAAK;;;iBAGN,QAAQ;;;;;;kBAMP,CAAC,CAAoB,EAAE,EAAE,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;;;qBAGzD,WAAW;;;;;;MAM1B,YAAY,CAAC,CAAC;IACd,IAAI,CAAA;;gBAEM,YAAY;aACf,CAAC,CAAC;IACT,IAAI,CAAA,EACN;;CAEH,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,WAAqB,EACrB,KAAa,EACb,QAAgB,EACA,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;gBAUT,KAAK;;;eAGN,QAAQ;;;;;;gBAMP,CAAC,CAAoB,EAAE,EAAE,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;;;mBAGzD,WAAW;;;;;;CAM7B,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAmB,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;CAkB/D,CAAC;AAEF,mBAAmB;AACnB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,WAAqB,EACrB,KAAa,EACb,QAAgB,EAChB,YAAoB,EACpB,KAAsB,EACN,EAAE,CAAC,IAAI,CAAA;;iBAER,QAAQ,CAAC,EAAE,cAAc,EAAE,KAAK,KAAK,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;;;;;;gBAMtE,KAAK;;;eAGN,QAAQ;;;;;kBAKL,CAAC,CAAoB,EAAE,EAAE,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;;;qBAGzD,WAAW;;;;;;MAM1B,YAAY,CAAC,CAAC;IACd,IAAI,CAAA;;gBAEM,YAAY;aACf,CAAC,CAAC;IACT,IAAI,CAAA,EACN;;CAEH,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,WAAqB,EACrB,KAAa,EACb,QAAgB,EACA,EAAE,CAAC,IAAI,CAAA;;;;;;;;;cASX,KAAK;;;aAGN,QAAQ;;;;;gBAKL,CAAC,CAAoB,EAAE,EAAE,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;;;mBAGzD,WAAW;;;;;;CAM7B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAmB,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;CAkB7D,CAAC","sourcesContent":["import { html, TemplateResult } from 'lit';\nimport './nile-file-upload.css';\nimport { DragHandler } from './utils/drag-drop.util';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { FileUploadState } from './types/file-upload.enums';\n\nlet dragHandlerInstance: DragHandler;\nexport const getDragHandler = (dragHandler: DragHandler): void => {\n dragHandlerInstance = dragHandler;\n}\n\nexport const getHorizontalDefaultState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n errorMessage: string,\n state: FileUploadState\n): TemplateResult => html`\n <div>\n <div class=${classMap({ 'hover-border': state === \"hover\", 'horizontal-div': true })}>\n <div class=\"inner-div\">\n <slot name=\"uploadIcon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div class=\"content\">\n <slot name=\"title\">\n <h4>${title}</h4>\n </slot>\n <slot name=\"subtitle\">\n <p>${subtitle}</p>\n </slot>\n </div>\n </div>\n <input\n type=\"file\"\n @change=${(e: Event | DragEvent) => dragHandlerInstance.handleFiles(e)}\n multiple\n />\n <slot @click=${browseFiles} name=\"browseFileButton\">\n <nile-button variant=\"tertiary\">\n Browse File\n </nile-button>\n </slot>\n </div>\n ${errorMessage ?\n html`<div class=\"upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"red\"></nile-icon>\n <span>${errorMessage}</span>\n </div>` :\n html``\n }\n </div>\n`;\n\nexport const getHorizontalDisabledtState = (\n browseFiles: Function,\n title: string,\n subtitle: string\n): TemplateResult => html`\n <div\n class=\"horizontal-div disable\"\n >\n <div class=\"inner-div\">\n <slot name=\"uploadIcon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div class=\"content\">\n <slot name=\"title\">\n <h4>${title}</h4>\n </slot>\n <slot name=\"subtitle\">\n <p>${subtitle}</p>\n </slot>\n </div>\n </div>\n <input\n type=\"file\"\n @change=${(e: Event | DragEvent) => dragHandlerInstance.handleFiles(e)}\n multiple\n />\n <slot @click=${browseFiles} name=\"browseFileButton\">\n <nile-button variant=\"tertiary\">\n Browse File\n </nile-button>\n </slot>\n </div>\n`;\n\nexport const getHorizontalDragState = (): TemplateResult => html`\n <div class=\"horizontal-div dragging\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>Drop files here to upload</p>\n </div>\n`;\n\n// Vertical States\nexport const getVerticalDefaultState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n errorMessage: string,\n state: FileUploadState\n): TemplateResult => html`\n <div>\n <div class=${classMap({ 'hover-border': state === \"hover\", 'vertical-div': true })}>\n <slot name=\"uploadIcon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div class=\"content-container\">\n <slot name=\"title\">\n <h4>${title}</h4>\n </slot>\n <slot name=\"subtitle\">\n <p>${subtitle}</p>\n </slot>\n </div>\n <input\n type=\"file\"\n @change=${(e: Event | DragEvent) => dragHandlerInstance.handleFiles(e)}\n multiple\n />\n <slot @click=${browseFiles} name=\"browseFileButton\">\n <nile-button variant=\"tertiary\">\n Browse File\n </nile-button>\n </slot>\n </div>\n ${errorMessage ?\n html`<div class=\"upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"red\"></nile-icon>\n <span>${errorMessage}</span>\n </div>` :\n html``\n }\n </div>\n`;\n\nexport const getVerticalDisabledState = (\n browseFiles: Function,\n title: string,\n subtitle: string\n): TemplateResult => html`\n <div\n class=\"vertical-deafult vertical-div disable\"\n >\n <slot name=\"uploadIcon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div class=\"content-container\">\n <slot name=\"title\">\n <h4>${title}</h4>\n </slot>\n <slot name=\"title\">\n <p>${subtitle}</p>\n </slot>\n </div>\n <input\n type=\"file\"\n @change=${(e: Event | DragEvent) => dragHandlerInstance.handleFiles(e)}\n multiple\n />\n <slot @click=${browseFiles} name=\"browseFileButton\">\n <nile-button variant=\"tertiary\">\n Browse File\n </nile-button>\n </slot>\n </div>\n`;\n\nexport const getVerticalDragState = (): TemplateResult => html`\n <div class=\"vertical-div vertical-drag\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>Drop files here to upload</p>\n </div>\n`;"]}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright Aquera Inc 2025
|
3
|
-
*
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
6
|
-
*/
|
7
|
-
import { fixture, assert, expect, html } from '@open-wc/testing';
|
8
|
-
import './nile-file-upload'; // Just import to register the element
|
9
|
-
describe('<nile-file-upload>', () => {
|
10
|
-
let element;
|
11
|
-
beforeEach(async () => {
|
12
|
-
element = await fixture(html `<nile-file-upload></nile-file-upload>`);
|
13
|
-
});
|
14
|
-
it('passes accessibility test', async () => {
|
15
|
-
await expect(element).to.be.accessible();
|
16
|
-
});
|
17
|
-
it('renders with the correct tag name', () => {
|
18
|
-
expect(element.tagName.toLowerCase()).to.equal('nile-file-upload');
|
19
|
-
});
|
20
|
-
it('renders with slot content when provided', async () => {
|
21
|
-
const testContent = 'Test Content';
|
22
|
-
element = await fixture(html `<nile-file-upload>${testContent}</nile-file-upload>`);
|
23
|
-
const slot = element.shadowRoot.querySelector('slot');
|
24
|
-
assert.exists(slot, 'Slot should exist');
|
25
|
-
const assignedNodes = slot.assignedNodes({ flatten: true });
|
26
|
-
expect(assignedNodes.length).to.be.greaterThan(0);
|
27
|
-
expect(assignedNodes[0].textContent?.trim()).to.equal(testContent);
|
28
|
-
});
|
29
|
-
});
|
30
|
-
//# sourceMappingURL=nile-file-upload.test.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"nile-file-upload.test.js","sourceRoot":"","sources":["../../../src/nile-file-upload/nile-file-upload.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,oBAAoB,CAAC,CAAC,sCAAsC;A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["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n \nimport { fixture, assert, expect, html } from '@open-wc/testing';\nimport './nile-file-upload'; // Just import to register the element\n\ndescribe('<nile-file-upload>', () => {\n let element: HTMLElement;\n\n beforeEach(async () => {\n element = await fixture(html`<nile-file-upload></nile-file-upload>`);\n });\n\n it('passes accessibility test', async () => {\n await expect(element).to.be.accessible();\n });\n\n it('renders with the correct tag name', () => {\n expect(element.tagName.toLowerCase()).to.equal('nile-file-upload');\n });\n\n it('renders with slot content when provided', async () => {\n const testContent = 'Test Content';\n element = await fixture(html`<nile-file-upload>${testContent}</nile-file-upload>`);\n \n const slot = (element.shadowRoot!.querySelector('slot') as HTMLSlotElement);\n assert.exists(slot, 'Slot should exist');\n\n const assignedNodes = slot.assignedNodes({ flatten: true });\n expect(assignedNodes.length).to.be.greaterThan(0);\n expect(assignedNodes[0].textContent?.trim()).to.equal(testContent);\n });\n});"]}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
export declare enum FileUploadState {
|
2
|
-
DEFAULT = "default",
|
3
|
-
DISABLED = "disabled",
|
4
|
-
HOVER = "hover",
|
5
|
-
DRAG = "drag"
|
6
|
-
}
|
7
|
-
export declare enum FileUploadVariant {
|
8
|
-
HORIZONTAL = "horizontal",
|
9
|
-
VERTICAL = "vertical"
|
10
|
-
}
|
11
|
-
export declare enum FileUploadError {
|
12
|
-
INVALID_FORMAT = "Invalid file format! Upload valid file.",
|
13
|
-
SIZE_EXCEEDED = "File exceeds size limit! Upload smaller file.",
|
14
|
-
MULTIPLE_NOT_ALLOWED = "Please Upload Single File!",
|
15
|
-
DUPLICATES_NOT_ALLOWED = "Duplicate Files Are Not Allowed!",
|
16
|
-
UPLOAD_URL_REQUIRED = "Upload URL is required!"
|
17
|
-
}
|
18
|
-
export declare enum FileUploadEvent {
|
19
|
-
NILE_INIT = "nile-init",
|
20
|
-
NILE_BROWSE = "nile-browse",
|
21
|
-
NILE_DRAG = "nile-drag",
|
22
|
-
NILE_CHANGE = "nile-change",
|
23
|
-
NILE_UPLOAD_PROGRESS = "nile-upload-progress",
|
24
|
-
NILE_UPLOAD_SUCCESS = "nile-upload-success",
|
25
|
-
NILE_UPLOAD_CANCELLED = "nile-upload-cancelled",
|
26
|
-
NILE_CANCEL_UPLOAD = "nile-cancel-upload",
|
27
|
-
NILE_NETWORK_ERROR = "nile-network-error",
|
28
|
-
SERVER_SIDE_ERROR = "nile-server-error",
|
29
|
-
NILE_DESTROY = "nile-destroy"
|
30
|
-
}
|
31
|
-
export declare enum FileUploadDefaults {
|
32
|
-
TITLE = "Drag and drop to upload",
|
33
|
-
SUBTITLE = "PNG, JPG or SVG (upto 1MB) | 1:1 ratio",
|
34
|
-
ERROR_MESSAGE = "Invalid File Format."
|
35
|
-
}
|
@@ -1,42 +0,0 @@
|
|
1
|
-
export var FileUploadState;
|
2
|
-
(function (FileUploadState) {
|
3
|
-
FileUploadState["DEFAULT"] = "default";
|
4
|
-
FileUploadState["DISABLED"] = "disabled";
|
5
|
-
FileUploadState["HOVER"] = "hover";
|
6
|
-
FileUploadState["DRAG"] = "drag";
|
7
|
-
})(FileUploadState || (FileUploadState = {}));
|
8
|
-
export var FileUploadVariant;
|
9
|
-
(function (FileUploadVariant) {
|
10
|
-
FileUploadVariant["HORIZONTAL"] = "horizontal";
|
11
|
-
FileUploadVariant["VERTICAL"] = "vertical";
|
12
|
-
})(FileUploadVariant || (FileUploadVariant = {}));
|
13
|
-
export var FileUploadError;
|
14
|
-
(function (FileUploadError) {
|
15
|
-
FileUploadError["INVALID_FORMAT"] = "Invalid file format! Upload valid file.";
|
16
|
-
FileUploadError["SIZE_EXCEEDED"] = "File exceeds size limit! Upload smaller file.";
|
17
|
-
FileUploadError["MULTIPLE_NOT_ALLOWED"] = "Please Upload Single File!";
|
18
|
-
FileUploadError["DUPLICATES_NOT_ALLOWED"] = "Duplicate Files Are Not Allowed!";
|
19
|
-
FileUploadError["UPLOAD_URL_REQUIRED"] = "Upload URL is required!";
|
20
|
-
})(FileUploadError || (FileUploadError = {}));
|
21
|
-
export var FileUploadEvent;
|
22
|
-
(function (FileUploadEvent) {
|
23
|
-
FileUploadEvent["NILE_INIT"] = "nile-init";
|
24
|
-
FileUploadEvent["NILE_BROWSE"] = "nile-browse";
|
25
|
-
FileUploadEvent["NILE_DRAG"] = "nile-drag";
|
26
|
-
FileUploadEvent["NILE_CHANGE"] = "nile-change";
|
27
|
-
FileUploadEvent["NILE_UPLOAD_PROGRESS"] = "nile-upload-progress";
|
28
|
-
FileUploadEvent["NILE_UPLOAD_SUCCESS"] = "nile-upload-success";
|
29
|
-
FileUploadEvent["NILE_UPLOAD_CANCELLED"] = "nile-upload-cancelled";
|
30
|
-
FileUploadEvent["NILE_CANCEL_UPLOAD"] = "nile-cancel-upload";
|
31
|
-
FileUploadEvent["NILE_NETWORK_ERROR"] = "nile-network-error";
|
32
|
-
FileUploadEvent["SERVER_SIDE_ERROR"] = "nile-server-error";
|
33
|
-
FileUploadEvent["NILE_DESTROY"] = "nile-destroy";
|
34
|
-
})(FileUploadEvent || (FileUploadEvent = {}));
|
35
|
-
export var FileUploadDefaults;
|
36
|
-
(function (FileUploadDefaults) {
|
37
|
-
FileUploadDefaults["TITLE"] = "Drag and drop to upload";
|
38
|
-
FileUploadDefaults["SUBTITLE"] = "PNG, JPG or SVG (upto 1MB) | 1:1 ratio";
|
39
|
-
FileUploadDefaults["ERROR_MESSAGE"] = "Invalid File Format.";
|
40
|
-
})(FileUploadDefaults || (FileUploadDefaults = {}));
|
41
|
-
;
|
42
|
-
//# sourceMappingURL=file-upload.enums.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file-upload.enums.js","sourceRoot":"","sources":["../../../../src/nile-file-upload/types/file-upload.enums.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;IACf,gCAAa,CAAA;AACf,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,8CAAyB,CAAA;IACzB,0CAAqB,CAAA;AACvB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,6EAA0D,CAAA;IAC1D,kFAA+D,CAAA;IAC/D,sEAAmD,CAAA;IACnD,8EAA2D,CAAA;IAC3D,kEAA+C,CAAA;AACjD,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,eAYX;AAZD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,8CAA2B,CAAA;IAC3B,0CAAuB,CAAA;IACvB,8CAA2B,CAAA;IAC3B,gEAA6C,CAAA;IAC7C,8DAA2C,CAAA;IAC3C,kEAA+C,CAAA;IAC/C,4DAAyC,CAAA;IACzC,4DAAyC,CAAA;IACzC,0DAAuC,CAAA;IACvC,gDAA6B,CAAA;AAC/B,CAAC,EAZW,eAAe,KAAf,eAAe,QAY1B;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,uDAAiC,CAAA;IACjC,yEAAmD,CAAA;IACnD,4DAAsC,CAAA;AACxC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAAA,CAAC","sourcesContent":["export enum FileUploadState {\n DEFAULT = 'default',\n DISABLED = 'disabled',\n HOVER = 'hover',\n DRAG = 'drag'\n}\n\nexport enum FileUploadVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical'\n}\n\nexport enum FileUploadError {\n INVALID_FORMAT = \"Invalid file format! Upload valid file.\",\n SIZE_EXCEEDED = \"File exceeds size limit! Upload smaller file.\",\n MULTIPLE_NOT_ALLOWED = \"Please Upload Single File!\",\n DUPLICATES_NOT_ALLOWED = \"Duplicate Files Are Not Allowed!\",\n UPLOAD_URL_REQUIRED = \"Upload URL is required!\",\n}\n\nexport enum FileUploadEvent {\n NILE_INIT = \"nile-init\",\n NILE_BROWSE = \"nile-browse\",\n NILE_DRAG = \"nile-drag\",\n NILE_CHANGE = \"nile-change\",\n NILE_UPLOAD_PROGRESS = \"nile-upload-progress\",\n NILE_UPLOAD_SUCCESS = \"nile-upload-success\",\n NILE_UPLOAD_CANCELLED = \"nile-upload-cancelled\",\n NILE_CANCEL_UPLOAD = \"nile-cancel-upload\",\n NILE_NETWORK_ERROR = \"nile-network-error\",\n SERVER_SIDE_ERROR = \"nile-server-error\",\n NILE_DESTROY = \"nile-destroy\"\n}\n\nexport enum FileUploadDefaults {\n TITLE = 'Drag and drop to upload',\n SUBTITLE = 'PNG, JPG or SVG (upto 1MB) | 1:1 ratio',\n ERROR_MESSAGE = 'Invalid File Format.',\n};"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file-upload.type.js","sourceRoot":"","sources":["../../../../src/nile-file-upload/types/file-upload.type.ts"],"names":[],"mappings":"","sourcesContent":["import { PropertyValueMap } from 'lit';\n\nexport interface ChangedPropsInterface extends PropertyValueMap<any> {\n [key: string]: unknown;\n}"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/nile-file-upload/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAA","sourcesContent":["export * from './file-upload.enums';\nexport * from './file-upload.type'"]}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import { FileUploadState } from "../types";
|
2
|
-
export declare class DragHandler {
|
3
|
-
private currentState;
|
4
|
-
private size;
|
5
|
-
private uploadedFiles;
|
6
|
-
private stateChangeCallback?;
|
7
|
-
private fileDropCallback?;
|
8
|
-
private errorMessageCallback?;
|
9
|
-
constructor();
|
10
|
-
setErrorMessage(callback: (errorMessage: string) => void): void;
|
11
|
-
setValuesInDragHandler(state: FileUploadState, size: number, uploadedFiles: File[]): void;
|
12
|
-
onFileDrop(callback: (files: File[]) => void): void;
|
13
|
-
onStateChange(callback: (state: FileUploadState) => void): void;
|
14
|
-
private setState;
|
15
|
-
dragEnter(e: DragEvent): void;
|
16
|
-
dragLeave(e: DragEvent): void;
|
17
|
-
dragOver(e: DragEvent): void;
|
18
|
-
drop(e: DragEvent): void;
|
19
|
-
handleDocumentDrop(e: DragEvent): void;
|
20
|
-
preventDragOver(e: DragEvent): void;
|
21
|
-
preventDrop(e: DragEvent): void;
|
22
|
-
handleFiles(event: Event | DragEvent): void;
|
23
|
-
}
|