@fleetbase/ember-ui 0.3.4 → 0.3.6
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/addon/components/activity-log.hbs +137 -0
- package/addon/components/activity-log.js +310 -0
- package/addon/components/badge.hbs +1 -1
- package/addon/components/bulk-search-dropdown.hbs +14 -0
- package/addon/components/bulk-search-dropdown.js +26 -0
- package/addon/components/button.hbs +5 -1
- package/addon/components/comment-thread/comment.hbs +7 -7
- package/addon/components/comment-thread.hbs +2 -2
- package/addon/components/content-panel.hbs +104 -31
- package/addon/components/content-panel.js +10 -1
- package/addon/components/coordinates-input.hbs +17 -2
- package/addon/components/country-select.hbs +1 -1
- package/addon/components/country-select.js +3 -2
- package/addon/components/custom-field/form.hbs +77 -0
- package/addon/components/custom-field/form.js +103 -0
- package/addon/components/custom-field/input.hbs +93 -0
- package/addon/components/custom-field/input.js +151 -0
- package/addon/components/custom-field/options-input.hbs +17 -0
- package/addon/components/custom-field/options-input.js +123 -0
- package/addon/components/custom-field/value.hbs +10 -0
- package/addon/components/custom-field/value.js +23 -0
- package/addon/components/custom-field/yield.hbs +30 -0
- package/addon/components/custom-field/yield.js +107 -0
- package/addon/components/custom-fields-manager.hbs +103 -0
- package/addon/components/custom-fields-manager.js +231 -0
- package/addon/components/dashboard/create.hbs +13 -10
- package/addon/components/dashboard/widget-panel.hbs +5 -3
- package/addon/components/dashboard/widget-panel.js +0 -1
- package/addon/components/dashboard.hbs +35 -39
- package/addon/components/dashboard.js +6 -2
- package/addon/components/date-picker.js +17 -5
- package/addon/components/drawer.js +12 -16
- package/addon/components/dropdown-button.hbs +25 -1
- package/addon/components/fetch-select.js +22 -18
- package/addon/components/file.hbs +2 -2
- package/addon/components/filter/multi-option.hbs +1 -1
- package/addon/components/filter/multi-option.js +16 -23
- package/addon/components/filter/select.js +17 -22
- package/addon/components/filters-picker/button.hbs +9 -1
- package/addon/components/filters-picker.hbs +11 -8
- package/addon/components/full-calendar/draggable.hbs +8 -1
- package/addon/components/info-block.hbs +1 -1
- package/addon/components/kanban/card.hbs +23 -0
- package/addon/components/kanban/card.js +94 -0
- package/addon/components/kanban/column.hbs +83 -0
- package/addon/components/kanban/column.js +165 -0
- package/addon/components/kanban.hbs +56 -11
- package/addon/components/kanban.js +136 -1
- package/addon/components/layout/resource/card/body.hbs +3 -0
- package/addon/components/layout/resource/card/body.js +12 -0
- package/addon/components/layout/resource/card/footer.hbs +3 -0
- package/addon/components/layout/resource/card/footer.js +12 -0
- package/addon/components/layout/resource/card/header.hbs +3 -0
- package/addon/components/layout/resource/card/header.js +12 -0
- package/addon/components/layout/resource/card.hbs +11 -0
- package/addon/components/layout/resource/card.js +31 -0
- package/addon/components/layout/resource/cards-grid.hbs +28 -0
- package/addon/components/layout/resource/cards-grid.js +52 -0
- package/addon/components/layout/resource/panel/header-actions.hbs +115 -0
- package/addon/components/layout/resource/panel/header-actions.js +16 -0
- package/addon/components/layout/resource/panel/header.hbs +23 -0
- package/addon/components/layout/resource/panel/header.js +16 -0
- package/addon/components/layout/resource/panel.hbs +56 -0
- package/addon/components/layout/resource/panel.js +111 -0
- package/addon/components/layout/resource/tabular-actions.hbs +122 -0
- package/addon/components/layout/resource/tabular-actions.js +6 -0
- package/addon/components/layout/resource/tabular.hbs +138 -0
- package/addon/components/layout/resource/tabular.js +22 -0
- package/addon/components/layout/section/header.hbs +19 -13
- package/addon/components/layout/sidebar/item.hbs +2 -1
- package/addon/components/layout/sidebar/panel.hbs +2 -0
- package/addon/components/layout/sidebar.js +6 -1
- package/addon/components/layout/yield-sidebar.hbs +3 -0
- package/addon/components/metadata-editor.hbs +121 -0
- package/addon/components/metadata-editor.js +263 -0
- package/addon/components/metadata-viewer.hbs +46 -0
- package/addon/components/metadata-viewer.js +16 -0
- package/addon/components/modal/default.hbs +14 -3
- package/addon/components/modal/default.js +7 -0
- package/addon/components/modal/title-with-buttons.hbs +8 -1
- package/addon/components/modal.hbs +7 -4
- package/addon/components/modal.js +56 -16
- package/addon/components/modals/custom-field-group-form.hbs +5 -0
- package/addon/components/modals/edit-metadata.hbs +3 -0
- package/addon/components/modals/export-report.hbs +46 -0
- package/addon/components/modals/import-form.hbs +1 -1
- package/addon/components/modals/resource.hbs +9 -0
- package/addon/components/modals/save-report.hbs +38 -0
- package/addon/components/modals/verify-by-sms.hbs +1 -1
- package/addon/components/modals/view-metadata.hbs +3 -0
- package/addon/components/modals/view-raw-metadata.hbs +7 -0
- package/addon/components/modals-container.hbs +9 -7
- package/addon/components/modals-container.js +4 -4
- package/addon/components/model-coordinates-input.hbs +8 -0
- package/addon/components/model-coordinates-input.js +71 -0
- package/addon/components/model-multi-file-upload.hbs +67 -0
- package/addon/components/model-multi-file-upload.js +122 -0
- package/addon/components/model-select-multiple.hbs +0 -6
- package/addon/components/model-select.js +1 -1
- package/addon/components/model-tag-input.hbs +15 -0
- package/addon/components/model-tag-input.js +31 -0
- package/addon/components/money-input.hbs +1 -1
- package/addon/components/money-input.js +4 -0
- package/addon/components/overlay/header.hbs +99 -24
- package/addon/components/overlay.hbs +1 -0
- package/addon/components/overlay.js +19 -15
- package/addon/components/query-builder/actions.hbs +19 -0
- package/addon/components/query-builder/actions.js +22 -0
- package/addon/components/query-builder/column-select.hbs +85 -0
- package/addon/components/query-builder/column-select.js +77 -0
- package/addon/components/query-builder/conditions.hbs +242 -0
- package/addon/components/query-builder/conditions.js +496 -0
- package/addon/components/query-builder/group-by.hbs +174 -0
- package/addon/components/query-builder/group-by.js +183 -0
- package/addon/components/query-builder/joins.hbs +142 -0
- package/addon/components/query-builder/joins.js +283 -0
- package/addon/components/query-builder/limit.hbs +74 -0
- package/addon/components/query-builder/limit.js +50 -0
- package/addon/components/query-builder/sort-by.hbs +153 -0
- package/addon/components/query-builder/sort-by.js +175 -0
- package/addon/components/query-builder/table-select.hbs +45 -0
- package/addon/components/query-builder/table-select.js +19 -0
- package/addon/components/query-builder.hbs +79 -0
- package/addon/components/query-builder.js +205 -0
- package/addon/components/report/data.hbs +34 -0
- package/addon/components/report/details.hbs +32 -0
- package/addon/components/report/details.js +3 -0
- package/addon/components/report/form.hbs +3 -0
- package/addon/components/report/form.js +3 -0
- package/addon/components/report-builder/condition-value.hbs +11 -0
- package/addon/components/report-builder/condition-value.js +29 -0
- package/addon/components/report-builder/export-options.hbs +15 -0
- package/addon/components/report-builder/export-options.js +21 -0
- package/addon/components/report-builder/query-builder.hbs +38 -0
- package/addon/components/report-builder/query-builder.js +6 -0
- package/addon/components/report-builder/results-table.hbs +73 -0
- package/addon/components/report-builder/results-table.js +28 -0
- package/addon/components/report-builder.hbs +92 -0
- package/addon/components/report-builder.js +107 -0
- package/addon/components/resource-context-panel.hbs +74 -0
- package/addon/components/resource-context-panel.js +232 -0
- package/addon/components/rules-builder.js +3 -0
- package/addon/components/select.hbs +7 -3
- package/addon/components/spinner.hbs +1 -1
- package/addon/components/spinner.js +38 -1
- package/addon/components/tab-navigation.hbs +120 -0
- package/addon/components/tab-navigation.js +113 -0
- package/addon/components/table/cell/base.hbs +6 -2
- package/addon/components/table.js +8 -0
- package/addon/components/toggle.js +4 -62
- package/addon/components/upload-button.hbs +5 -0
- package/addon/components/view-raw-metadata.hbs +1 -0
- package/addon/components/visible-column-picker.hbs +4 -3
- package/addon/components/with-record.hbs +1 -0
- package/addon/components/with-record.js +40 -0
- package/addon/helpers/can-action.js +27 -0
- package/addon/helpers/can-delete.js +26 -0
- package/addon/helpers/can-write.js +27 -0
- package/addon/helpers/cannot-action.js +24 -0
- package/addon/helpers/cannot-delete.js +23 -0
- package/addon/helpers/cannot-write.js +23 -0
- package/addon/helpers/cfg-edit-buttons.js +21 -0
- package/addon/helpers/component-resolvable.js +13 -4
- package/addon/helpers/format-date-fns.js +63 -0
- package/addon/helpers/get-file-url.js +50 -0
- package/addon/helpers/get-model-name.js +25 -0
- package/addon/helpers/get-write-permission.js +6 -0
- package/addon/helpers/is-model.js +6 -0
- package/addon/helpers/is-url.js +12 -0
- package/addon/helpers/is-uuid.js +6 -0
- package/addon/helpers/join-column-list.js +17 -0
- package/addon/helpers/json-stringify.js +33 -0
- package/addon/helpers/resolve-component.js +23 -0
- package/addon/helpers/resource-context-panel-save-disabled.js +21 -0
- package/addon/helpers/set-has-item.js +5 -0
- package/addon/helpers/set-model-attr.js +23 -0
- package/addon/modifiers/set-height.js +5 -2
- package/addon/modifiers/set-z-index.js +5 -0
- package/addon/modifiers/translate-x.js +5 -0
- package/addon/services/dashboard.js +16 -0
- package/addon/services/modals-manager.js +245 -66
- package/addon/services/resource-context-panel.js +500 -0
- package/addon/services/sidebar.js +39 -0
- package/addon/styles/addon.css +6 -0
- package/addon/styles/components/activity-log.css +31 -0
- package/addon/styles/components/badge.css +41 -1
- package/addon/styles/components/basic-dropdown.css +17 -0
- package/addon/styles/components/button.css +6 -1
- package/addon/styles/components/card-grid.css +53 -0
- package/addon/styles/components/dashboard.css +7 -0
- package/addon/styles/components/ember-power-select.css +10 -0
- package/addon/styles/components/input.css +15 -1
- package/addon/styles/components/kanban.css +170 -25
- package/addon/styles/components/modal.css +14 -2
- package/addon/styles/components/overlay.css +1 -1
- package/addon/styles/components/panel.css +12 -27
- package/addon/styles/components/query-builder.css +387 -0
- package/addon/styles/components/report-builder.css +37 -0
- package/addon/styles/components/resource-context-panel.css +59 -0
- package/addon/styles/components/tab-navigation.css +275 -0
- package/addon/styles/layout/legacy.css +0 -15
- package/addon/styles/layout/next.css +283 -41
- package/addon/styles/layout/utilities.css +19 -2
- package/addon/utils/dom.js +65 -7
- package/addon/utils/get-custom-field-type-map.js +37 -0
- package/addon/utils/options.js +3 -0
- package/addon/utils/permission-check.js +97 -0
- package/addon/utils/remove-nullish.js +4 -0
- package/addon/utils/report-builder.js +63 -0
- package/addon/utils/to-power-select-groups.js +74 -0
- package/app/components/activity-log.js +1 -0
- package/app/components/bulk-search-dropdown.js +1 -0
- package/app/components/custom-field/form.js +1 -0
- package/app/components/custom-field/input.js +1 -0
- package/app/components/custom-field/options-input.js +1 -0
- package/app/components/custom-field/value.js +1 -0
- package/app/components/custom-field/yield.js +1 -0
- package/app/components/custom-fields-manager.js +1 -0
- package/app/components/kanban/card.js +1 -0
- package/app/components/kanban/column.js +1 -0
- package/app/components/layout/resource/card/body.js +1 -0
- package/app/components/layout/resource/card/footer.js +1 -0
- package/app/components/layout/resource/card/header.js +1 -0
- package/app/components/layout/resource/card.js +1 -0
- package/app/components/layout/resource/cards-grid.js +1 -0
- package/app/components/layout/resource/panel/header-actions.js +1 -0
- package/app/components/layout/resource/panel/header.js +1 -0
- package/app/components/layout/resource/panel.js +1 -0
- package/app/components/layout/resource/tabular-actions.js +1 -0
- package/app/components/layout/resource/tabular.js +1 -0
- package/app/components/layout/yield-sidebar.js +1 -0
- package/app/components/metadata-editor.js +1 -0
- package/app/components/metadata-viewer.js +1 -0
- package/app/components/modals/custom-field-group-form.js +1 -0
- package/app/components/modals/edit-metadata.js +1 -0
- package/app/components/modals/export-report.js +1 -0
- package/app/components/modals/resource.js +1 -0
- package/app/components/modals/save-report.js +1 -0
- package/app/components/modals/view-metadata.js +1 -0
- package/app/components/modals/view-raw-metadata.js +1 -0
- package/app/components/model-coordinates-input.js +1 -0
- package/app/components/model-multi-file-upload.js +1 -0
- package/app/components/model-tag-input.js +1 -0
- package/app/components/query-builder/actions.js +1 -0
- package/app/components/query-builder/column-select.js +1 -0
- package/app/components/query-builder/conditions.js +1 -0
- package/app/components/query-builder/group-by.js +1 -0
- package/app/components/query-builder/joins.js +1 -0
- package/app/components/query-builder/limit.js +1 -0
- package/app/components/query-builder/sort-by.js +1 -0
- package/app/components/query-builder/table-select.js +1 -0
- package/app/components/query-builder.js +1 -0
- package/app/components/report/data.js +1 -0
- package/app/components/report/details.js +1 -0
- package/app/components/report/form.js +1 -0
- package/app/components/report-builder/condition-value.js +1 -0
- package/app/components/report-builder/export-options.js +1 -0
- package/app/components/report-builder/query-builder.js +1 -0
- package/app/components/report-builder/results-table.js +1 -0
- package/app/components/report-builder.js +1 -0
- package/app/components/resource-context-panel.js +1 -0
- package/app/components/rules-builder.js +1 -0
- package/app/components/tab-navigation.js +1 -0
- package/app/components/view-raw-metadata.js +1 -0
- package/app/components/with-record.js +1 -0
- package/app/helpers/can-action.js +1 -0
- package/app/helpers/can-delete.js +1 -0
- package/app/helpers/can-write.js +1 -0
- package/app/helpers/cannot-action.js +1 -0
- package/app/helpers/cannot-delete.js +1 -0
- package/app/helpers/cannot-write.js +1 -0
- package/app/helpers/cfg-edit-buttons.js +1 -0
- package/app/helpers/{format-date.js → format-date-fns.js} +1 -1
- package/app/helpers/get-file-url.js +1 -0
- package/app/helpers/get-model-name.js +1 -0
- package/app/helpers/get-write-permission.js +1 -0
- package/app/helpers/is-model.js +1 -0
- package/app/helpers/is-url.js +1 -0
- package/app/helpers/is-uuid.js +1 -0
- package/app/helpers/join-column-list.js +1 -0
- package/app/helpers/json-stringify.js +1 -0
- package/app/helpers/resolve-component.js +1 -0
- package/app/helpers/resource-context-panel-save-disabled.js +1 -0
- package/app/helpers/set-has-item.js +1 -0
- package/app/helpers/set-model-attr.js +1 -0
- package/app/modifiers/set-z-index.js +1 -0
- package/app/modifiers/translate-x.js +1 -0
- package/app/services/resource-context-panel.js +1 -0
- package/app/services/sidebar.js +1 -0
- package/app/utils/get-custom-field-type-map.js +1 -0
- package/app/utils/options.js +1 -0
- package/app/utils/permission-check.js +1 -0
- package/app/utils/remove-nullish.js +1 -0
- package/app/utils/report-builder.js +1 -0
- package/app/utils/to-power-select-groups.js +1 -0
- package/index.js +1 -2
- package/package.json +3 -1
- package/addon/components/kanban/item.js +0 -3
- package/addon/helpers/format-date.js +0 -17
- package/app/components/kanban/item.js +0 -1
- /package/addon/components/{kanban/item.hbs → rules-builder.hbs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<div class="next-content-panel-wrapper {{@wrapperClass}} {{if @isLoading 'is-loading'}}">
|
|
2
|
-
<div class="next-content-panel-container {{@containerClass}}">
|
|
1
|
+
<div class="next-content-panel-wrapper {{if this.isOpen 'is-open' 'is-closed'}} {{@wrapperClass}} {{if @isLoading 'is-loading'}}" {{did-update this.handleArgsChange @open}}>
|
|
2
|
+
<div class="next-content-panel-container {{if this.isOpen 'is-open' 'is-closed'}} {{@containerClass}}">
|
|
3
3
|
<div class="next-content-panel {{if this.isOpen 'next-content-panel-is-open' 'next-content-panel-is-closed'}} {{@panelClass}} {{if @isLoading 'is-loading'}}">
|
|
4
4
|
<div
|
|
5
5
|
class="next-content-panel-header next-content-panel-toggle
|
|
@@ -7,15 +7,19 @@
|
|
|
7
7
|
{{@panelHeaderClass}}
|
|
8
8
|
{{if @isLoading 'is-loading'}}"
|
|
9
9
|
>
|
|
10
|
-
<a
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
<a
|
|
11
|
+
href="javascript:;"
|
|
12
|
+
aria-expanded={{this.isOpen}}
|
|
13
|
+
class="next-content-panel-header-left {{if this.disabled 'opacity-50'}} {{@panelHeaderLeftClass}}"
|
|
14
|
+
disabled={{this.disabled}}
|
|
15
|
+
{{on "click" this.toggle}}
|
|
16
|
+
>
|
|
17
|
+
{{#if (and @caretLeft (not @hideCaret))}}
|
|
18
|
+
<span class="icon-container" {{did-insert this.trackIconContainer}} {{on "click" this.toggle}}>
|
|
19
|
+
<FaIcon @icon={{if this.isOpen (concat (or @caretIcon "chevron") "-down") (concat (or @caretIcon "chevron") "-up")}} @prefix="fas" />
|
|
14
20
|
</span>
|
|
15
|
-
{{/unless}}
|
|
16
|
-
{{#if @isLoading}}
|
|
17
|
-
<Spinner @iconClass="text-sky-500 fa-spin-800ms" class="flex mr-2i" />
|
|
18
21
|
{{/if}}
|
|
22
|
+
|
|
19
23
|
{{#if @titleIcon}}
|
|
20
24
|
<span class="icon-container {{@titleIconWrapperClass}}" {{did-insert this.trackIconContainer}}>
|
|
21
25
|
<FaIcon @icon={{@titleIcon}} @prefix={{@titleIconPrefix}} @size={{or @titleIconSize "xs"}} class={{@titleIconClass}} />
|
|
@@ -36,7 +40,12 @@
|
|
|
36
40
|
</div>
|
|
37
41
|
<div class="panel-title flex-shrink-0 {{@panelTitleClass}}">
|
|
38
42
|
<div class="flex flex-col {{@panelTitleWrapperClass}}">
|
|
39
|
-
<
|
|
43
|
+
<div class="flex flex-row items-center space-x-2">
|
|
44
|
+
<span class={{@panelTitleInlineClass}}>{{@title}}</span>
|
|
45
|
+
{{#if @isLoading}}
|
|
46
|
+
<Spinner />
|
|
47
|
+
{{/if}}
|
|
48
|
+
</div>
|
|
40
49
|
{{#if @subtitle}}
|
|
41
50
|
<span class={{@panelSubtitleInlineClass}}>{{@subtitle}}</span>
|
|
42
51
|
{{/if}}
|
|
@@ -47,6 +56,7 @@
|
|
|
47
56
|
</span>
|
|
48
57
|
{{/if}}
|
|
49
58
|
</div>
|
|
59
|
+
{{yield to="title"}}
|
|
50
60
|
{{/if}}
|
|
51
61
|
</div>
|
|
52
62
|
{{#if this.doesntHavePermissions}}
|
|
@@ -60,6 +70,7 @@
|
|
|
60
70
|
{{/if}}
|
|
61
71
|
</a>
|
|
62
72
|
<div class="next-content-panel-header-right {{@panelHeaderRightClass}}">
|
|
73
|
+
{{yield to="actions"}}
|
|
63
74
|
{{#if @titleRightSideComponent}}
|
|
64
75
|
{{component @titleRightSideComponent context=@titleRightSideComponentContext}}
|
|
65
76
|
{{else}}
|
|
@@ -89,19 +100,84 @@
|
|
|
89
100
|
{{/if}}
|
|
90
101
|
</span>
|
|
91
102
|
{{/if}}
|
|
92
|
-
{{#each @actionButtons as |
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
{{#each @actionButtons as |actionButton|}}
|
|
104
|
+
{{#if actionButton.items}}
|
|
105
|
+
<DropdownButton
|
|
106
|
+
@icon={{or actionButton.icon "ellipsis"}}
|
|
107
|
+
@size={{or actionButton.size "xs"}}
|
|
108
|
+
@iconPrefix={{actionButton.prefix}}
|
|
109
|
+
@triggerClass={{actionButton.triggerClass}}
|
|
110
|
+
@renderInPlace={{or actionButton.renderInPlace true}}
|
|
111
|
+
as |dd|
|
|
112
|
+
>
|
|
113
|
+
<div class="next-dd-menu mt-1 mx-0" aria-labelledby="user-menu">
|
|
114
|
+
{{#each actionButton.items as |item|}}
|
|
115
|
+
{{#if item.separator}}
|
|
116
|
+
<div class="next-dd-menu-seperator"></div>
|
|
117
|
+
{{else}}
|
|
118
|
+
<div class="px-1 {{item.wrapperClass}}">
|
|
119
|
+
<a
|
|
120
|
+
href="javascript:;"
|
|
121
|
+
class="next-dd-item {{item.class}} {{if item.disabled 'disabled'}}"
|
|
122
|
+
disabled={{item.disabled}}
|
|
123
|
+
{{on "click" (dropdown-fn dd (or item.fn item.onClick))}}
|
|
124
|
+
>
|
|
125
|
+
<div class="w-7 flex-grow-0 flex-shrink-0">
|
|
126
|
+
<FaIcon @icon={{item.icon}} />
|
|
127
|
+
</div>
|
|
128
|
+
<span>{{or item.text item.label}}</span>
|
|
129
|
+
</a>
|
|
130
|
+
</div>
|
|
131
|
+
{{/if}}
|
|
132
|
+
{{/each}}
|
|
133
|
+
</div>
|
|
134
|
+
</DropdownButton>
|
|
135
|
+
{{else if actionButton.component}}
|
|
136
|
+
{{component
|
|
137
|
+
actionButton.component
|
|
138
|
+
icon=actionButton.icon
|
|
139
|
+
iconPrefix=actionButton.iconPrefix
|
|
140
|
+
iconComponent=actionButton.iconComponent
|
|
141
|
+
size=(or actionButton.size "xs")
|
|
142
|
+
text=actionButton.text
|
|
143
|
+
options=actionButton.options
|
|
144
|
+
items=actionButton.items
|
|
145
|
+
permission=actionButton.permission
|
|
146
|
+
isLoading=actionButton.isLoading
|
|
147
|
+
renderInPlace=actionButton.renderInPlace
|
|
148
|
+
triggerClass=actionButton.triggerClass
|
|
149
|
+
disabled=actionButton.disabled
|
|
150
|
+
onClick=actionButton.onClick
|
|
151
|
+
fn=actionButton.fn
|
|
152
|
+
perform=actionButton.perform
|
|
153
|
+
onSelect=actionButton.onSelect
|
|
154
|
+
onChange=actionButton.onChange
|
|
155
|
+
}}
|
|
156
|
+
{{else}}
|
|
157
|
+
<Button
|
|
158
|
+
@type={{actionButton.type}}
|
|
159
|
+
@text={{actionButton.text}}
|
|
160
|
+
@onClick={{if actionButton.perform (perform actionButton.perform) (or actionButton.onClick actionButton.fn)}}
|
|
161
|
+
@size={{or actionButton.size "xs"}}
|
|
162
|
+
@buttonType={{actionButton.buttonType}}
|
|
163
|
+
@disabled={{actionButton.disabled}}
|
|
164
|
+
@exampleText={{actionButton.exampleText}}
|
|
165
|
+
@helpText={{actionButton.helpText}}
|
|
166
|
+
@icon={{actionButton.icon}}
|
|
167
|
+
@iconClass={{actionButton.iconClass}}
|
|
168
|
+
@iconFlip={{actionButton.iconFlip}}
|
|
169
|
+
@iconPrefix={{actionButton.iconPrefix}}
|
|
170
|
+
@iconRotation={{actionButton.iconRotation}}
|
|
171
|
+
@iconSize={{actionButton.iconSize}}
|
|
172
|
+
@isLoading={{actionButton.isLoading}}
|
|
173
|
+
@outline={{actionButton.outline}}
|
|
174
|
+
@permission={{actionButton.permission}}
|
|
175
|
+
@wrapperClass={{actionButton.wrapperClass}}
|
|
176
|
+
@textClass={{actionButton.textClass}}
|
|
177
|
+
@tooltipPlacement={{actionButton.tooltipPlacement}}
|
|
178
|
+
@visible={{actionButton.visible}}
|
|
179
|
+
/>
|
|
180
|
+
{{/if}}
|
|
105
181
|
{{/each}}
|
|
106
182
|
{{#if @dropdownButton}}
|
|
107
183
|
<DropdownButton
|
|
@@ -150,6 +226,11 @@
|
|
|
150
226
|
</DropdownButton>
|
|
151
227
|
{{/if}}
|
|
152
228
|
{{/if}}
|
|
229
|
+
{{#unless (or @caretLeft @hideCaret)}}
|
|
230
|
+
<a href="#" class="icon-container" {{did-insert this.trackIconContainer}} {{on "click" this.toggle}}>
|
|
231
|
+
<FaIcon @icon={{if this.isOpen (concat (or @caretIcon "chevron") "-down") (concat (or @caretIcon "chevron") "-up")}} @prefix="fas" />
|
|
232
|
+
</a>
|
|
233
|
+
{{/unless}}
|
|
153
234
|
</div>
|
|
154
235
|
</div>
|
|
155
236
|
<div class="next-content-panel-body {{if this.isOpen 'next-content-panel-is-open' 'next-content-panel-is-closed'}} {{@panelBodyClass}} {{if @isLoading 'is-loading'}}">
|
|
@@ -161,14 +242,6 @@
|
|
|
161
242
|
{{if @isLoading 'opacity-50'}}
|
|
162
243
|
{{if @isLoading 'is-loading'}}"
|
|
163
244
|
>
|
|
164
|
-
{{#if @isLoading}}
|
|
165
|
-
<div class="absolute w-full h-full inset-0 bg-opacity-50 bg-gray-900 flex items-center justify-center">
|
|
166
|
-
<div class="flex flex-row items-center">
|
|
167
|
-
<Spinner @iconClass="text-sky-500 fa-spin-800ms" class="flex mr-2i" />
|
|
168
|
-
<span>Loading...</span>
|
|
169
|
-
</div>
|
|
170
|
-
</div>
|
|
171
|
-
{{/if}}
|
|
172
245
|
{{yield}}
|
|
173
246
|
</div>
|
|
174
247
|
{{/if}}
|
|
@@ -67,7 +67,7 @@ export default class ContentPanelComponent extends Component {
|
|
|
67
67
|
if (!disabled) {
|
|
68
68
|
this.disabled = this.doesntHavePermissions = permission && this.abilities.cannot(permission);
|
|
69
69
|
}
|
|
70
|
-
this.isOpen = open
|
|
70
|
+
this.isOpen = Boolean(open);
|
|
71
71
|
this.toggleOnCaretOnly = toggleOnCaretOnly === true;
|
|
72
72
|
this.dropdownButtonRenderInPlace = dropdownButtonRenderInPlace === true;
|
|
73
73
|
|
|
@@ -87,6 +87,15 @@ export default class ContentPanelComponent extends Component {
|
|
|
87
87
|
close: this.close.bind(this),
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Handle arguments changed
|
|
92
|
+
*
|
|
93
|
+
* @memberof ContentPanelComponent
|
|
94
|
+
*/
|
|
95
|
+
@action handleArgsChange(el, [open]) {
|
|
96
|
+
this.isOpen = Boolean(open);
|
|
97
|
+
}
|
|
98
|
+
|
|
90
99
|
/**
|
|
91
100
|
* Toggles the content panel's open/closed state based on click events.
|
|
92
101
|
*
|
|
@@ -42,8 +42,23 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
<div class="flex flex-col">
|
|
44
44
|
<div class="flex flex-row items-center pb-4">
|
|
45
|
-
<Input
|
|
46
|
-
|
|
45
|
+
<Input
|
|
46
|
+
@type="text"
|
|
47
|
+
class="form-input mr-2"
|
|
48
|
+
@value={{this.lookupQuery}}
|
|
49
|
+
aria-label="Address Search"
|
|
50
|
+
disabled={{or this.disabled this.reverseLookup.isRunning}}
|
|
51
|
+
placeholder="Enter address"
|
|
52
|
+
/>
|
|
53
|
+
<Button
|
|
54
|
+
@wrapperClass="mr-2"
|
|
55
|
+
@icon="search-location"
|
|
56
|
+
@type="primary"
|
|
57
|
+
@size="sm"
|
|
58
|
+
@text="Lookup"
|
|
59
|
+
@onClick={{perform this.reverseLookup}}
|
|
60
|
+
@isLoading={{this.reverseLookup.isRunning}}
|
|
61
|
+
/>
|
|
47
62
|
<Button @type="default" @iconPrefix="fas" @icon="times" @size="sm" @text="Done" @onClick={{dd.actions.close}} />
|
|
48
63
|
</div>
|
|
49
64
|
</div>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@onChange={{this.selectCountry}}
|
|
9
9
|
@triggerClass="form-select form-input {{@triggerClass}}"
|
|
10
10
|
@dropdownClass={{or @dropdownClass "ember-model-select__dropdown"}}
|
|
11
|
-
@placeholder={{or @placeholder "
|
|
11
|
+
@placeholder={{or @placeholder (t "common.select-field" field=(t "common.country"))}}
|
|
12
12
|
@disabled={{or this.disabled this.fetchCountries.isRunning}}
|
|
13
13
|
@allowClear={{@allowClear}}
|
|
14
14
|
...attributes
|
|
@@ -4,6 +4,7 @@ import { tracked } from '@glimmer/tracking';
|
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import { guidFor } from '@ember/object/internals';
|
|
6
6
|
import { task } from 'ember-concurrency';
|
|
7
|
+
import { later } from '@ember/runloop';
|
|
7
8
|
|
|
8
9
|
export default class CountrySelectComponent extends Component {
|
|
9
10
|
@service fetch;
|
|
@@ -40,7 +41,7 @@ export default class CountrySelectComponent extends Component {
|
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
@action listenForInputChanges(element) {
|
|
43
|
-
|
|
44
|
+
later(() => {
|
|
44
45
|
const { value } = element;
|
|
45
46
|
|
|
46
47
|
if (this.value !== value) {
|
|
@@ -54,7 +55,7 @@ export default class CountrySelectComponent extends Component {
|
|
|
54
55
|
const { onChange } = this.args;
|
|
55
56
|
this.selected = country;
|
|
56
57
|
|
|
57
|
-
if (typeof onChange === 'function') {
|
|
58
|
+
if (country && typeof onChange === 'function') {
|
|
58
59
|
onChange(country.cca2, country);
|
|
59
60
|
}
|
|
60
61
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<div class="form-wrapper with-input-group-padding" ...attributes>
|
|
2
|
+
<InputGroup @name="Field Label" @value={{@resource.label}} {{on "input" this.setCustomFieldName}} />
|
|
3
|
+
<InputGroup @name="Field Description" @value={{@resource.description}} />
|
|
4
|
+
<InputGroup @name="Field Help Text" @value={{@resource.help_text}} />
|
|
5
|
+
<InputGroup>
|
|
6
|
+
<Toggle @isToggled={{@resource.required}} @onToggle={{fn (mut @resource.required)}}>
|
|
7
|
+
<span class="dark:text-gray-100 text-sm ml-2">Field is Required</span>
|
|
8
|
+
</Toggle>
|
|
9
|
+
</InputGroup>
|
|
10
|
+
<InputGroup>
|
|
11
|
+
<Toggle @isToggled={{@resource.editable}} @onToggle={{fn (mut @resource.editable)}}>
|
|
12
|
+
<span class="dark:text-gray-100 text-sm ml-2">Field is Editable</span>
|
|
13
|
+
</Toggle>
|
|
14
|
+
</InputGroup>
|
|
15
|
+
<InputGroup @name="Field Type">
|
|
16
|
+
<select class="form-select w-full has--placeholder" {{on "change" this.onSelectCustomFieldType}}>
|
|
17
|
+
<option selected disabled>
|
|
18
|
+
Select field type...
|
|
19
|
+
</option>
|
|
20
|
+
{{#each-in this.customFieldTypeMap as |key|}}
|
|
21
|
+
<option value={{dasherize key}} selected={{eq @resource.type (dasherize key)}}>
|
|
22
|
+
{{smart-humanize key}}
|
|
23
|
+
</option>
|
|
24
|
+
{{/each-in}}
|
|
25
|
+
</select>
|
|
26
|
+
</InputGroup>
|
|
27
|
+
{{#if this.currentFieldMap.hasOptions}}
|
|
28
|
+
<CustomField::OptionsInput @customField={{@resource}} @fieldMap={{this.currentFieldMap}} class="mb-4" />
|
|
29
|
+
{{/if}}
|
|
30
|
+
{{#if this.currentFieldMap.allowedModels}}
|
|
31
|
+
<InputGroup @name="Field Model Type">
|
|
32
|
+
<select class="form-select w-full has--placeholder" {{on "change" this.onSelectModelType}}>
|
|
33
|
+
<option selected disabled>
|
|
34
|
+
Select model type
|
|
35
|
+
</option>
|
|
36
|
+
{{#each this.currentFieldMap.allowedModels as |modelName|}}
|
|
37
|
+
<option value={{dasherize modelName}} selected={{eq @resource.meta.modelName (dasherize modelName)}}>
|
|
38
|
+
{{smart-humanize modelName}}
|
|
39
|
+
</option>
|
|
40
|
+
{{/each}}
|
|
41
|
+
</select>
|
|
42
|
+
</InputGroup>
|
|
43
|
+
{{/if}}
|
|
44
|
+
<InputGroup @name="Meta: Column-Span">
|
|
45
|
+
<DropdownButton
|
|
46
|
+
@text={{concat "Column Span Size :" (n-a @resource.meta.colSpan)}}
|
|
47
|
+
@textClass="text-sm mr-2"
|
|
48
|
+
@buttonClass="flex-row-reverse w-64 justify-between"
|
|
49
|
+
@icon="caret-down"
|
|
50
|
+
@iconClass="mr-0i"
|
|
51
|
+
@size="sm"
|
|
52
|
+
@iconPrefix="fas"
|
|
53
|
+
@triggerClass="hidden md:flex"
|
|
54
|
+
as |dd|
|
|
55
|
+
>
|
|
56
|
+
<div class="next-dd-menu mt-1 mx-0" aria-labelledby="user-menu">
|
|
57
|
+
<div class="p-1">
|
|
58
|
+
{{#each this.colSpanSizeOptions as |size|}}
|
|
59
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (dropdown-fn dd this.setCustomFieldMetaProperty "colSpan" size)}}>
|
|
60
|
+
<div class="flex-1 flex flex-row items-center">
|
|
61
|
+
<div class="w-6">
|
|
62
|
+
<FaIcon @icon="grip" />
|
|
63
|
+
</div>
|
|
64
|
+
<span>{{size}}</span>
|
|
65
|
+
</div>
|
|
66
|
+
<div>
|
|
67
|
+
{{#if (eq size @resource.meta.colSpan)}}
|
|
68
|
+
<FaIcon @icon="check" class="text-green-500" />
|
|
69
|
+
{{/if}}
|
|
70
|
+
</div>
|
|
71
|
+
</a>
|
|
72
|
+
{{/each}}
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</DropdownButton>
|
|
76
|
+
</InputGroup>
|
|
77
|
+
</div>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { tracked } from '@glimmer/tracking';
|
|
3
|
+
import { inject as service } from '@ember/service';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { dasherize, camelize } from '@ember/string';
|
|
6
|
+
import { next } from '@ember/runloop';
|
|
7
|
+
import { task } from 'ember-concurrency';
|
|
8
|
+
import isObject from '@fleetbase/ember-core/utils/is-object';
|
|
9
|
+
import getCustomFieldTypeMap from '../../utils/get-custom-field-type-map';
|
|
10
|
+
|
|
11
|
+
export default class CustomFieldFormComponent extends Component {
|
|
12
|
+
@service notifications;
|
|
13
|
+
@tracked currentFieldMap;
|
|
14
|
+
@tracked colSpanSizeOptions = [1, 2, 3];
|
|
15
|
+
customFieldTypeMap = getCustomFieldTypeMap();
|
|
16
|
+
|
|
17
|
+
constructor(owner, { resource }) {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
next(() => this.selectFieldMap(resource.type));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A task for saving the custom field. It handles the save operation asynchronously,
|
|
24
|
+
* manages callbacks on success, and shows notifications on error.
|
|
25
|
+
* @task
|
|
26
|
+
*/
|
|
27
|
+
@task *save() {
|
|
28
|
+
try {
|
|
29
|
+
this.args.resource = yield this.args.resource.save();
|
|
30
|
+
if (typeof this.onCustomFieldSaved === 'function') {
|
|
31
|
+
this.onCustomFieldSaved(this.args.resource);
|
|
32
|
+
}
|
|
33
|
+
} catch (error) {
|
|
34
|
+
this.notifications.serverError(error);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Action method to set the name of the custom field. Converts the name to a dasherized string.
|
|
41
|
+
* @param {Event} event - The event object containing the new field name.
|
|
42
|
+
* @action
|
|
43
|
+
*/
|
|
44
|
+
@action setCustomFieldName(event) {
|
|
45
|
+
const value = event.target.value;
|
|
46
|
+
this.args.resource.name = dasherize(value);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Action method for selecting the custom field type. It updates the field type
|
|
51
|
+
* and selects the corresponding field map.
|
|
52
|
+
* @param {Event} event - The event object containing the selected field type.
|
|
53
|
+
* @action
|
|
54
|
+
*/
|
|
55
|
+
@action onSelectCustomFieldType(event) {
|
|
56
|
+
const value = event.target.value;
|
|
57
|
+
const type = dasherize(value);
|
|
58
|
+
this.args.resource.type = type;
|
|
59
|
+
this.selectFieldMap(type);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Action method for selecting a model type for the custom field.
|
|
64
|
+
* @param {Event} event - The event object containing the selected model type.
|
|
65
|
+
* @action
|
|
66
|
+
*/
|
|
67
|
+
@action onSelectModelType(event) {
|
|
68
|
+
const value = event.target.value;
|
|
69
|
+
const modelName = dasherize(value);
|
|
70
|
+
this.setCustomFieldMetaProperty('modelName', modelName);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Action method to set a metadata property for the custom field.
|
|
75
|
+
* Initializes the metadata object if it doesn't exist.
|
|
76
|
+
* @param {string} key - The key of the metadata property.
|
|
77
|
+
* @param {*} value - The value to set for the property.
|
|
78
|
+
* @action
|
|
79
|
+
*/
|
|
80
|
+
@action setCustomFieldMetaProperty(key, value) {
|
|
81
|
+
if (!isObject(this.args.resource.meta)) {
|
|
82
|
+
this.args.resource.set('meta', {});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const currentMeta = this.args.resource.meta ?? {};
|
|
86
|
+
this.args.resource.set('meta', { ...currentMeta, [key]: value });
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Selects the field map based on the given field type.
|
|
91
|
+
* Updates the current field map and the component for the custom field.
|
|
92
|
+
* @param {string} type - The type of the custom field.
|
|
93
|
+
*/
|
|
94
|
+
selectFieldMap(type) {
|
|
95
|
+
if (!type) return;
|
|
96
|
+
const fieldKey = camelize(type);
|
|
97
|
+
const fieldMap = this.customFieldTypeMap[fieldKey];
|
|
98
|
+
if (fieldMap) {
|
|
99
|
+
this.currentFieldMap = fieldMap;
|
|
100
|
+
this.args.resource.component = fieldMap.component;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{{#if this.customFieldComponent}}
|
|
2
|
+
<div class="{{if this.customField.meta.colSpan (concat 'col-span-' this.customField.meta.colSpan) ''}}">
|
|
3
|
+
{{#if (eq this.customFieldComponent "input")}}
|
|
4
|
+
<InputGroup
|
|
5
|
+
@name={{this.customField.label}}
|
|
6
|
+
@value={{this.value}}
|
|
7
|
+
@required={{this.customField.required}}
|
|
8
|
+
@helpText={{this.customField.help_text}}
|
|
9
|
+
{{on "input" this.onChangeHandler}}
|
|
10
|
+
/>
|
|
11
|
+
{{else if (eq this.customFieldComponent "select")}}
|
|
12
|
+
<InputGroup @name={{this.customField.label}} @required={{this.customField.required}} @helpText={{this.customField.help_text}}>
|
|
13
|
+
<select class="form-select w-full has--placeholder" {{on "change" this.onChangeHandler}}>
|
|
14
|
+
<option selected disabled>
|
|
15
|
+
{{this.customField.label}}
|
|
16
|
+
</option>
|
|
17
|
+
{{#each this.customField.options as |selectOption|}}
|
|
18
|
+
<option value={{selectOption}} selected={{eq this.value selectOption}}>
|
|
19
|
+
{{selectOption}}
|
|
20
|
+
</option>
|
|
21
|
+
{{/each}}
|
|
22
|
+
</select>
|
|
23
|
+
</InputGroup>
|
|
24
|
+
{{else if (eq this.customFieldComponent "phone-input")}}
|
|
25
|
+
<InputGroup @name={{this.customField.label}} @required={{this.customField.required}} @helpText={{this.customField.help_text}}>
|
|
26
|
+
<PhoneInput @value={{this.value}} @onInput={{this.onChangeHandler}} class="form-input w-full" />
|
|
27
|
+
</InputGroup>
|
|
28
|
+
{{else if (eq this.customFieldComponent "money-input")}}
|
|
29
|
+
<InputGroup @name={{this.customField.label}} @required={{this.customField.required}} @helpText={{this.customField.help_text}}>
|
|
30
|
+
<MoneyInput class="w-full" @wrapperClass="x-fleetops-input-height shadow-md" @value={{this.value}} @canSelectCurrency={{true}} @onChange={{this.onChangeHandler}} />
|
|
31
|
+
</InputGroup>
|
|
32
|
+
{{else if (eq this.customFieldComponent "date-time-input")}}
|
|
33
|
+
<InputGroup @name={{this.customField.label}} @required={{this.customField.required}} @helpText={{this.customField.help_text}}>
|
|
34
|
+
<DateTimeInput
|
|
35
|
+
class="form-input w-full"
|
|
36
|
+
@value={{this.value}}
|
|
37
|
+
@minDate={{format-date-fns (now) "yyyy-MM-d"}}
|
|
38
|
+
@minTime={{format-date-fns (now) "HH:mm"}}
|
|
39
|
+
@onUpdate={{this.onChangeHandler}}
|
|
40
|
+
/>
|
|
41
|
+
</InputGroup>
|
|
42
|
+
{{else if (eq this.customFieldComponent "date-picker")}}
|
|
43
|
+
<InputGroup @name={{this.customField.label}} @required={{this.customField.required}} @helpText={{this.customField.help_text}}>
|
|
44
|
+
<DatePicker class="form-input w-full" @placeholder="YYYY-MM-DD" @value={{this.value}} @onDateChanged={{this.onChangeHandler}} />
|
|
45
|
+
</InputGroup>
|
|
46
|
+
{{else if (eq this.customFieldComponent "radio-button-select")}}
|
|
47
|
+
<InputGroup @name={{this.customField.label}} @required={{this.customField.required}} @helpText={{this.customField.help_text}}>
|
|
48
|
+
<div class="mt-2 flex items-center space-x-2">
|
|
49
|
+
{{#each this.customField.options as |radioOption index|}}
|
|
50
|
+
<div class="radio-group-item shadow-sm {{if (eq this.value radioOption) 'is-checked'}}">
|
|
51
|
+
<div class="flex items-center">
|
|
52
|
+
<RadioButton
|
|
53
|
+
@radioClass="focus:ring-blue-500"
|
|
54
|
+
@radioId={{concat this.customField.name "-radio-option-" index}}
|
|
55
|
+
@value={{radioOption}}
|
|
56
|
+
@groupValue={{this.value}}
|
|
57
|
+
@name={{radioOption}}
|
|
58
|
+
@changed={{this.onChangeHandler}}
|
|
59
|
+
/>
|
|
60
|
+
<div class="ml-2 text-sm dark:text-gray-100 text-gray-900 truncate">{{radioOption}}</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
{{/each}}
|
|
64
|
+
</div>
|
|
65
|
+
</InputGroup>
|
|
66
|
+
{{else if (eq this.customFieldComponent "file-upload")}}
|
|
67
|
+
<InputGroup @name={{this.customField.label}} @required={{this.customField.required}} @helpText={{this.customField.help_text}}>
|
|
68
|
+
<div class="flex items-center">
|
|
69
|
+
<FileUpload
|
|
70
|
+
@name={{this.customField.name}}
|
|
71
|
+
@for={{this.customField.name}}
|
|
72
|
+
@accept={{join "," this.acceptedFileTypes}}
|
|
73
|
+
@multiple={{false}}
|
|
74
|
+
@onFileAdded={{this.onFileAddedHandler}}
|
|
75
|
+
>
|
|
76
|
+
<a tabindex={{0}} class="btn btn-default btn-xs cursor-pointer">
|
|
77
|
+
<FaIcon @icon="upload" @size="sm" class="mr-2" />{{t "common.select-file"}}
|
|
78
|
+
</a>
|
|
79
|
+
</FileUpload>
|
|
80
|
+
{{#if this.file}}
|
|
81
|
+
<div class="ml-2 flex items-center text-sm">
|
|
82
|
+
<Spinner class="dark:text-blue-400 text-blue-900" />
|
|
83
|
+
<span class="ml-2 text-xs dark:text-blue-400 text-blue-900">{{round this.file.progress}}%</span>
|
|
84
|
+
</div>
|
|
85
|
+
{{/if}}
|
|
86
|
+
</div>
|
|
87
|
+
{{#if this.uploadedFile}}
|
|
88
|
+
<File @file={{this.uploadedFile}} @onDelete={{this.removeFile}} class="custom-field-file" />
|
|
89
|
+
{{/if}}
|
|
90
|
+
</InputGroup>
|
|
91
|
+
{{/if}}
|
|
92
|
+
</div>
|
|
93
|
+
{{/if}}
|