native-document 1.0.138 → 1.0.140
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/components.js +1 -1
- package/devtools/ComponentRegistry.js +3 -2
- package/dist/native-document.components.min.css +1 -0
- package/dist/native-document.components.min.js +11506 -8566
- package/dist/native-document.dev.js +2645 -2166
- package/dist/native-document.dev.js.map +1 -1
- package/dist/native-document.min.js +1 -1
- package/index.js +1 -0
- package/package.json +5 -2
- package/rollup.config.js +5 -2
- package/src/components/$traits/has-draggable/HasDraggable.js +69 -0
- package/src/components/$traits/has-draggable/has-draggable.css +8 -0
- package/src/components/$traits/{HasItems.js → has-items/HasItems.js} +2 -11
- package/src/components/$traits/has-position/HasFullPosition.js +51 -0
- package/src/components/$traits/has-position/HasPosition.js +23 -0
- package/src/components/$traits/has-resizable/HasResizable.js +113 -0
- package/src/components/$traits/has-resizable/has-resizable.css +121 -0
- package/src/components/$traits/has-validation/HasValidation.js +86 -0
- package/src/components/BaseComponent.js +109 -4
- package/src/components/accordion/Accordion.js +37 -31
- package/src/components/accordion/AccordionItem.js +14 -21
- package/src/components/alert/Alert.js +48 -40
- package/src/components/avatar/Avatar.js +4 -3
- package/src/components/avatar/AvatarGroup.js +8 -2
- package/src/components/badge/Badge.js +7 -7
- package/src/components/base-component.css +0 -0
- package/src/components/breadcrumb/BreadCrumb.js +30 -21
- package/src/components/button/Button.js +3 -14
- package/src/components/context-menu/ContextMenu.js +49 -26
- package/src/components/dropdown/Dropdown.js +172 -34
- package/src/components/dropdown/DropdownDivider.js +4 -3
- package/src/components/dropdown/DropdownGroup.js +19 -19
- package/src/components/dropdown/DropdownItem.js +24 -18
- package/src/components/dropdown/helpers.js +52 -0
- package/src/components/form/FormControl.js +207 -108
- package/src/components/form/field/Field.js +106 -174
- package/src/components/form/field/FieldCollection.js +110 -203
- package/src/components/form/field/types/AutocompleteField.js +26 -5
- package/src/components/form/field/types/CheckboxField.js +4 -4
- package/src/components/form/field/types/CheckboxGroupField.js +11 -5
- package/src/components/form/field/types/ColorField.js +4 -4
- package/src/components/form/field/types/DateField.js +110 -18
- package/src/components/form/field/types/EmailField.js +2 -2
- package/src/components/form/field/types/FileField.js +87 -21
- package/src/components/form/field/types/HiddenField.js +4 -4
- package/src/components/form/field/types/ImageField.js +4 -4
- package/src/components/form/field/types/NumberField.js +5 -5
- package/src/components/form/field/types/PasswordField.js +28 -6
- package/src/components/form/field/types/RadioField.js +12 -8
- package/src/components/form/field/types/RangeField.js +29 -5
- package/src/components/form/field/types/SearchField.js +4 -4
- package/src/components/form/field/types/SelectField.js +75 -8
- package/src/components/form/field/types/StringField.js +4 -4
- package/src/components/form/field/types/TelField.js +4 -4
- package/src/components/form/field/types/TextAreaField.js +7 -5
- package/src/components/form/field/types/TimeField.js +52 -6
- package/src/components/form/field/types/UrlField.js +4 -5
- package/src/components/form/field/types/file-field-mode/FileAvatarMode.js +104 -0
- package/src/components/form/field/types/file-field-mode/FileDropzoneMode.js +59 -0
- package/src/components/form/field/types/file-field-mode/FileItemPreview.js +74 -0
- package/src/components/form/field/types/file-field-mode/FileNativeMode.js +21 -0
- package/src/components/form/field/types/file-field-mode/FileUploadButtonMode.js +59 -0
- package/src/components/form/field/types/file-field-mode/FileWallMode.js +53 -0
- package/src/components/form/index.js +14 -2
- package/src/components/form/validation/Validation.js +9 -0
- package/src/components/list/List.js +1 -1
- package/src/components/list/ListGroup.js +1 -1
- package/src/components/menu/HasMenuItem.js +133 -0
- package/src/components/menu/Menu.js +47 -56
- package/src/components/menu/MenuGroup.js +36 -8
- package/src/components/menu/MenuItem.js +24 -10
- package/src/components/menu/MenuLink.js +2 -0
- package/src/components/modal/Modal.js +153 -23
- package/src/components/pagination/Pagination.js +55 -21
- package/src/components/popover/Popover.js +127 -40
- package/src/components/progress/Progress.js +14 -24
- package/src/components/skeleton/Skeleton.js +36 -13
- package/src/components/slider/Slider.js +96 -70
- package/src/components/spinner/Spinner.js +4 -2
- package/src/components/splitter/Splitter.js +15 -8
- package/src/components/splitter/SplitterGutter.js +28 -7
- package/src/components/splitter/SplitterPanel.js +9 -15
- package/src/components/splitter/index.js +3 -1
- package/src/components/stacks/AbsoluteStack.js +33 -0
- package/src/components/stacks/FixedStack.js +33 -0
- package/src/components/stacks/PositionStack.js +146 -0
- package/src/components/stacks/RelativeStack.js +33 -0
- package/src/components/{layouts → stacks}/Stack.js +22 -3
- package/src/components/{layouts → stacks}/index.js +6 -4
- package/src/components/stepper/Stepper.js +159 -67
- package/src/components/stepper/StepperStep.js +49 -12
- package/src/components/switch/Switch.js +59 -29
- package/src/components/switch/index.js +6 -0
- package/src/components/table/Column.js +22 -26
- package/src/components/table/ColumnGroup.js +4 -13
- package/src/components/table/DataTable.js +388 -103
- package/src/components/table/SimpleTable.js +28 -143
- package/src/components/tabs/Tabs.js +142 -44
- package/src/components/toast/Toast.js +40 -35
- package/src/components/tooltip/Tooltip.js +152 -35
- package/src/core/data/ObservableArray.js +94 -30
- package/src/core/data/ObservableChecker.js +20 -75
- package/src/core/data/ObservableItem.js +35 -3
- package/src/core/data/observable-helpers/computed.js +2 -1
- package/src/core/data/observable-helpers/object.js +13 -8
- package/src/core/data/observable-helpers/observable.is-to.js +196 -0
- package/src/core/elements/anchor/anchor.js +3 -2
- package/src/core/elements/control/for-each-array.js +44 -30
- package/src/core/elements/control/for-each.js +6 -3
- package/src/core/elements/control/show-if.js +11 -6
- package/src/core/elements/control/switch.js +2 -1
- package/src/core/elements/index.js +1 -1
- package/src/core/elements/svg.js +61 -0
- package/src/core/utils/HasEventEmitter.js +6 -0
- package/src/core/utils/debug-manager.js +2 -5
- package/src/core/utils/filters/standard.js +2 -1
- package/src/core/utils/property-accumulator.js +35 -6
- package/src/core/utils/shortcut-manager.js +242 -0
- package/src/core/utils/validator.js +1 -1
- package/src/core/wrappers/AttributesWrapper.js +41 -4
- package/src/core/wrappers/DocumentObserver.js +0 -1
- package/src/core/wrappers/HtmlElementWrapper.js +1 -1
- package/src/core/wrappers/NDElement.js +15 -2
- package/src/core/wrappers/SvgElementWrapper.js +15 -0
- package/src/core/wrappers/prototypes/attributes-extensions.js +4 -1
- package/src/core/wrappers/prototypes/nd-element-extensions.js +8 -1
- package/src/router/Router.js +0 -1
- package/src/ui/components/accordion/AccordionItemRender.js +63 -0
- package/src/ui/components/accordion/AccordionRender.js +34 -0
- package/src/ui/components/accordion/accordion.css +121 -0
- package/src/ui/components/alert/AlertRender.js +80 -0
- package/src/ui/components/alert/alert.css +163 -0
- package/src/ui/components/avatar/avata-group/AvatarGroupRender.js +49 -0
- package/src/ui/components/avatar/avata-group/avatar-group.css +38 -0
- package/src/ui/components/avatar/avatar/AvatarRender.js +87 -0
- package/src/ui/components/avatar/avatar/avatar.css +189 -0
- package/src/ui/components/badge/BadgeRender.js +24 -0
- package/src/ui/components/badge/badge.css +168 -0
- package/src/ui/components/breadcrumb/BreadcrumbRender.js +43 -0
- package/src/ui/components/breadcrumb/breadcrumb.css +55 -0
- package/src/ui/components/button/ButtonRender.js +65 -0
- package/src/ui/components/button/button.css +288 -354
- package/src/ui/components/contextmenu/ContextmenuRender.js +70 -0
- package/src/ui/components/contextmenu/contextmenu.css +36 -0
- package/src/ui/components/divider/DividerRender.js +70 -0
- package/src/ui/components/divider/divider.css +70 -0
- package/src/ui/components/dropdown/DropdownRender.js +92 -0
- package/src/ui/components/dropdown/divider/DropdownDividerRender.js +9 -0
- package/src/ui/components/dropdown/divider/dropdown-divider.css +0 -0
- package/src/ui/components/dropdown/dropdown.css +179 -0
- package/src/ui/components/dropdown/group/DropdownGroupRender.js +23 -0
- package/src/ui/components/dropdown/group/dropdown-group.css +0 -0
- package/src/ui/components/dropdown/item/DropdownItemRender.js +29 -0
- package/src/ui/components/dropdown/item/dropdown-item.css +0 -0
- package/src/ui/components/form/FieldCollectionRender.js +110 -0
- package/src/ui/components/form/FormControlRender.js +84 -0
- package/src/ui/components/form/field-collection.css +55 -0
- package/src/ui/components/form/fields/AutocompleteFieldRender.js +143 -0
- package/src/ui/components/form/fields/CheckboxFieldRender.js +59 -0
- package/src/ui/components/form/fields/CheckboxGroupFieldRender.js +92 -0
- package/src/ui/components/form/fields/ColorFieldRender.js +30 -0
- package/src/ui/components/form/fields/DateFieldRender.js +154 -0
- package/src/ui/components/form/fields/EmailFieldRender.js +5 -0
- package/src/ui/components/form/fields/FieldRender.js +117 -0
- package/src/ui/components/form/fields/FileFieldRender.js +41 -0
- package/src/ui/components/form/fields/HiddenFieldRender.js +14 -0
- package/src/ui/components/form/fields/ImageFieldRender.js +0 -0
- package/src/ui/components/form/fields/NumberFieldRender.js +52 -0
- package/src/ui/components/form/fields/PasswordFieldRender.js +65 -0
- package/src/ui/components/form/fields/RadioFieldRender.js +77 -0
- package/src/ui/components/form/fields/RangeFieldRender.js +121 -0
- package/src/ui/components/form/fields/SelectFieldRender.js +248 -0
- package/src/ui/components/form/fields/SliderFieldRender.js +359 -0
- package/src/ui/components/form/fields/StringFieldRender.js +6 -0
- package/src/ui/components/form/fields/TelFieldRender.js +6 -0
- package/src/ui/components/form/fields/TextAreaFieldRender.js +96 -0
- package/src/ui/components/form/fields/TimeFieldRender.js +141 -0
- package/src/ui/components/form/fields/UrlFieldRender.js +6 -0
- package/src/ui/components/form/fields/date-field.css +32 -0
- package/src/ui/components/form/fields/field.css +402 -0
- package/src/ui/components/form/fields/file-field.css +79 -0
- package/src/ui/components/form/fields/password-field.css +50 -0
- package/src/ui/components/form/fields/range-field.css +120 -0
- package/src/ui/components/form/fields/slider.css +195 -0
- package/src/ui/components/form/file-upload-mode/FileAvatarModeRender.js +143 -0
- package/src/ui/components/form/file-upload-mode/FileDropzoneModeRender.js +108 -0
- package/src/ui/components/form/file-upload-mode/FileNativeModeRender.js +22 -0
- package/src/ui/components/form/file-upload-mode/FileUploadButtonModeRender.js +89 -0
- package/src/ui/components/form/file-upload-mode/FileWallModeRender.js +91 -0
- package/src/ui/components/form/file-upload-mode/file-avatar-mode.css +139 -0
- package/src/ui/components/form/file-upload-mode/file-dropzone-mode.css +88 -0
- package/src/ui/components/form/file-upload-mode/file-upload-button-mode.css +44 -0
- package/src/ui/components/form/file-upload-mode/file-wall-mode.css +88 -0
- package/src/ui/components/form/form-control.css +40 -0
- package/src/ui/components/form/helpers.js +112 -0
- package/src/ui/components/form/index.js +61 -0
- package/src/ui/components/menu/MenuDividerRender.js +12 -0
- package/src/ui/components/menu/MenuGroupRender.js +60 -0
- package/src/ui/components/menu/MenuItemRender.js +57 -0
- package/src/ui/components/menu/MenuLinkRender.js +55 -0
- package/src/ui/components/menu/MenuRender.js +21 -0
- package/src/ui/components/menu/helpers.js +121 -0
- package/src/ui/components/menu/menu.css +308 -0
- package/src/ui/components/modal/ModalRender.js +119 -0
- package/src/ui/components/modal/modal.css +156 -0
- package/src/ui/components/pagination/PaginationRender.js +112 -0
- package/src/ui/components/pagination/pagination.css +63 -0
- package/src/ui/components/popover/PopoverRender.js +234 -0
- package/src/ui/components/popover/popover.css +139 -0
- package/src/ui/components/progress/ProgressRender.js +168 -0
- package/src/ui/components/progress/progress.css +197 -0
- package/src/ui/components/skeleton/SkeletonRender.js +79 -0
- package/src/ui/components/skeleton/skeleton.css +154 -0
- package/src/ui/components/spinner/SpinnerRender.js +46 -0
- package/src/ui/components/spinner/spinner.css +152 -0
- package/src/ui/components/splitter/SplitterGutterRender.js +94 -0
- package/src/ui/components/splitter/SplitterPanelRender.js +38 -0
- package/src/ui/components/splitter/SplitterRender.js +74 -0
- package/src/ui/components/splitter/splitter.css +128 -0
- package/src/ui/components/stacks/PositionStackRender.js +38 -0
- package/src/ui/components/stacks/StackRender.js +42 -0
- package/src/ui/components/stacks/absolute-stack/AbsoluteStackRender.js +5 -0
- package/src/ui/components/stacks/fixed-stack/FixedStackRender.js +5 -0
- package/src/ui/components/stacks/h-stack/HStackRender.js +7 -0
- package/src/ui/components/stacks/h-stack/h-stack.css +4 -0
- package/src/ui/components/stacks/index.js +15 -0
- package/src/ui/components/stacks/position-stack.css +62 -0
- package/src/ui/components/stacks/relative-stack/RelativeStackRender.js +7 -0
- package/src/ui/components/stacks/relative-stack/relative-stack.css +3 -0
- package/src/ui/components/stacks/stack.css +78 -0
- package/src/ui/components/stacks/v-stack/VStackRender.js +5 -0
- package/src/ui/components/stacks/v-stack/v-stack.css +4 -0
- package/src/ui/components/stepper/StepperRender.js +70 -0
- package/src/ui/components/stepper/StepperStepRender.js +67 -0
- package/src/ui/components/stepper/stepper.css +359 -0
- package/src/ui/components/switch/SwitchRender.js +82 -0
- package/src/ui/components/switch/switch.css +143 -0
- package/src/ui/components/table/data-table/DataTableRender.js +49 -0
- package/src/ui/components/table/data-table/bulk-actions.js +35 -0
- package/src/ui/components/table/data-table/data-table.css +246 -0
- package/src/ui/components/table/data-table/pagination.js +56 -0
- package/src/ui/components/table/data-table/tables.js +363 -0
- package/src/ui/components/table/data-table/toolbar.js +67 -0
- package/src/ui/components/table/simple-table/SimpleTableRender.js +188 -0
- package/src/ui/components/table/simple-table/simple-table.css +50 -0
- package/src/ui/components/tabs/TabsRender.js +226 -0
- package/src/ui/components/tabs/tabs.css +253 -0
- package/src/ui/components/toast/ToastRender.js +98 -0
- package/src/ui/components/toast/toast.css +201 -0
- package/src/ui/components/tooltip/TooltipRender.js +8 -0
- package/src/ui/components/tooltip/tooltip.css +113 -0
- package/src/ui/index.js +82 -0
- package/src/ui/tokens/colors-dark.scss +2 -1
- package/src/ui/tokens/reset.scss +3 -0
- package/types/control-flow.d.ts +2 -2
- package/src/components/layouts/ZStack.js +0 -41
- package/src/ui/components/button/button.render.js +0 -63
- /package/src/components/{layouts → stacks}/HStack.js +0 -0
- /package/src/components/{layouts → stacks}/VStack.js +0 -0
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
import Field from "../Field";
|
|
2
2
|
|
|
3
|
-
export default function SelectField(name,
|
|
3
|
+
export default function SelectField(name, props) {
|
|
4
4
|
if(!(this instanceof SelectField)) {
|
|
5
|
-
return new SelectField(name,
|
|
5
|
+
return new SelectField(name, props);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
Field.call(this, name, 'select',
|
|
8
|
+
Field.call(this, name, 'select', props);
|
|
9
9
|
|
|
10
10
|
Object.assign(this.$description, {
|
|
11
|
-
options:
|
|
11
|
+
options: [],
|
|
12
12
|
multiple: false,
|
|
13
13
|
searchable: false,
|
|
14
|
+
searchPlaceholder: null,
|
|
14
15
|
clearable: false,
|
|
15
|
-
groups: null
|
|
16
|
+
groups: null,
|
|
17
|
+
multipleDisplay: 'text',
|
|
18
|
+
removeSelected: false,
|
|
19
|
+
truncateRender: false,
|
|
20
|
+
countRender: false,
|
|
21
|
+
selectedLabelRender: false,
|
|
22
|
+
renderItem: null,
|
|
23
|
+
truncateMax: null
|
|
16
24
|
});
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
SelectField.defaultTemplate = null;
|
|
20
28
|
|
|
21
29
|
SelectField.use = function(template) {
|
|
22
|
-
SelectField.defaultTemplate = template
|
|
30
|
+
SelectField.defaultTemplate = template;
|
|
23
31
|
};
|
|
24
32
|
|
|
25
33
|
SelectField.prototype = Object.create(Field.prototype);
|
|
@@ -30,13 +38,19 @@ SelectField.prototype.options = function(opts) {
|
|
|
30
38
|
return this;
|
|
31
39
|
};
|
|
32
40
|
|
|
41
|
+
SelectField.prototype.option = function(value, label, props = {}) {
|
|
42
|
+
this.$description.options.push({ label, value, props });
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
|
|
33
46
|
SelectField.prototype.multiple = function(enabled = true) {
|
|
34
47
|
this.$description.multiple = enabled;
|
|
35
48
|
return this;
|
|
36
49
|
};
|
|
37
50
|
|
|
38
|
-
SelectField.prototype.searchable = function(enabled = true) {
|
|
51
|
+
SelectField.prototype.searchable = function(enabled = true, placeholder = null) {
|
|
39
52
|
this.$description.searchable = enabled;
|
|
53
|
+
this.$description.searchPlaceholder = placeholder;
|
|
40
54
|
return this;
|
|
41
55
|
};
|
|
42
56
|
|
|
@@ -48,4 +62,57 @@ SelectField.prototype.clearable = function(enabled = true) {
|
|
|
48
62
|
SelectField.prototype.groups = function(groupsConfig) {
|
|
49
63
|
this.$description.groups = groupsConfig;
|
|
50
64
|
return this;
|
|
51
|
-
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
SelectField.prototype.multipleDisplay = function(mode) {
|
|
68
|
+
this.$description.multipleDisplay = mode;
|
|
69
|
+
return this;
|
|
70
|
+
};
|
|
71
|
+
SelectField.prototype.multipleDisplayAsTags = function() {
|
|
72
|
+
this.$description.multipleDisplay = 'tags';
|
|
73
|
+
return this;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
SelectField.prototype.multipleDisplayAsText = function() {
|
|
77
|
+
this.$description.multipleDisplay = 'text';
|
|
78
|
+
return this;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
SelectField.prototype.multipleDisplayAsCount = function() {
|
|
82
|
+
this.$description.multipleDisplay = 'count';
|
|
83
|
+
return this;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
SelectField.prototype.multipleDisplayAsTruncate = function(max = 2) {
|
|
87
|
+
this.$description.multipleDisplay = 'truncate';
|
|
88
|
+
this.$description.truncateMax = max;
|
|
89
|
+
return this;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
SelectField.prototype.removeSelected = function(enabled = true) {
|
|
93
|
+
this.$description.removeSelected = enabled;
|
|
94
|
+
return this;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
SelectField.prototype.truncateRender = function(callback) {
|
|
98
|
+
this.$description.truncateRender = callback;
|
|
99
|
+
return this;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
SelectField.prototype.countRender = function(callback) {
|
|
103
|
+
this.$description.countRender = callback;
|
|
104
|
+
return this;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
SelectField.prototype.selectedLabelRender = function(callback) {
|
|
108
|
+
this.$description.selectedLabelRender = callback;
|
|
109
|
+
return this;
|
|
110
|
+
};
|
|
111
|
+
SelectField.prototype.renderItem = function(callback) {
|
|
112
|
+
this.$description.renderItem = callback;
|
|
113
|
+
return this;
|
|
114
|
+
};
|
|
115
|
+
SelectField.prototype.onChange = function(handler) {
|
|
116
|
+
this.on('change', handler);
|
|
117
|
+
return this;
|
|
118
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import Field from "../Field";
|
|
2
2
|
import {Validation} from "../../validation/Validation";
|
|
3
3
|
|
|
4
|
-
export default function StringField(name, type = 'text',
|
|
4
|
+
export default function StringField(name, type = 'text', props = {}) {
|
|
5
5
|
if(!(this instanceof StringField)) {
|
|
6
|
-
return new StringField(name,
|
|
6
|
+
return new StringField(name, props);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
Field.call(this, name, type,
|
|
9
|
+
Field.call(this, name, type, props);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
StringField.defaultTemplate = null;
|
|
13
13
|
|
|
14
14
|
StringField.use = function(template) {
|
|
15
|
-
StringField.defaultTemplate = template
|
|
15
|
+
StringField.defaultTemplate = template;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
StringField.prototype = Object.create(Field.prototype);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import StringField from "./StringField";
|
|
2
2
|
import {Validation} from "../../validation/Validation";
|
|
3
3
|
|
|
4
|
-
export default function TelField(name,
|
|
4
|
+
export default function TelField(name, props) {
|
|
5
5
|
if(!(this instanceof TelField)) {
|
|
6
|
-
return new TelField(name,
|
|
6
|
+
return new TelField(name, props);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
StringField.call(this, name, 'tel',
|
|
9
|
+
StringField.call(this, name, 'tel', props);
|
|
10
10
|
|
|
11
11
|
Object.assign(this.$description, {
|
|
12
12
|
countryCode: false,
|
|
@@ -17,7 +17,7 @@ export default function TelField(name, defaultConfig) {
|
|
|
17
17
|
TelField.defaultTemplate = null;
|
|
18
18
|
|
|
19
19
|
TelField.use = function(template) {
|
|
20
|
-
TelField.defaultTemplate = template
|
|
20
|
+
TelField.defaultTemplate = template;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
TelField.prototype = Object.create(StringField.prototype);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import StringField from "./StringField";
|
|
2
2
|
|
|
3
|
-
export default function TextAreaField(name,
|
|
3
|
+
export default function TextAreaField(name, props) {
|
|
4
4
|
if(!(this instanceof TextAreaField)) {
|
|
5
|
-
return new TextAreaField(name,
|
|
5
|
+
return new TextAreaField(name, props);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
StringField.call(this, name, 'textarea',
|
|
8
|
+
StringField.call(this, name, 'textarea', props);
|
|
9
9
|
|
|
10
10
|
Object.assign(this.$description, {
|
|
11
11
|
...this.$description,
|
|
@@ -13,6 +13,7 @@ export default function TextAreaField(name, defaultConfig) {
|
|
|
13
13
|
cols: null,
|
|
14
14
|
resize: 'vertical',
|
|
15
15
|
autoGrow: false,
|
|
16
|
+
wordCount: false,
|
|
16
17
|
characterCounter: false,
|
|
17
18
|
});
|
|
18
19
|
}
|
|
@@ -20,7 +21,7 @@ export default function TextAreaField(name, defaultConfig) {
|
|
|
20
21
|
TextAreaField.defaultTemplate = null;
|
|
21
22
|
|
|
22
23
|
TextAreaField.use = function(template) {
|
|
23
|
-
TextAreaField.defaultTemplate = template
|
|
24
|
+
TextAreaField.defaultTemplate = template;
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
TextAreaField.prototype = Object.create(StringField.prototype);
|
|
@@ -52,8 +53,9 @@ TextAreaField.prototype.characterCounter = function(enabled = true) {
|
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
TextAreaField.prototype.wordCount = function(min, max, message) {
|
|
56
|
+
this.$description.wordCount = true;
|
|
55
57
|
this.$description.rules.push({
|
|
56
|
-
|
|
58
|
+
fn: (value) => {
|
|
57
59
|
if (!value) return true;
|
|
58
60
|
const words = value.trim().split(/\s+/).length;
|
|
59
61
|
if (min && words < min) return false;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import Field from "../Field";
|
|
2
2
|
import {Validation} from "../../validation/Validation";
|
|
3
|
+
import BaseComponent from "../../../BaseComponent";
|
|
3
4
|
|
|
4
|
-
export default function TimeField(name,
|
|
5
|
+
export default function TimeField(name, props = {}) {
|
|
5
6
|
if(!(this instanceof TimeField)) {
|
|
6
|
-
return new TimeField(name,
|
|
7
|
+
return new TimeField(name, props);
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
Field.call(this, name, 'time',
|
|
10
|
+
Field.call(this, name, 'time', props);
|
|
10
11
|
|
|
11
12
|
Object.assign(this.$description, {
|
|
12
|
-
format:
|
|
13
|
-
step:
|
|
13
|
+
format: 'HH:mm',
|
|
14
|
+
step: null,
|
|
15
|
+
clearable: false,
|
|
16
|
+
range: false,
|
|
17
|
+
valueStart: null,
|
|
18
|
+
valueEnd: null,
|
|
19
|
+
rangeSeparator: null,
|
|
20
|
+
props
|
|
14
21
|
});
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
TimeField.defaultTemplate = null;
|
|
18
25
|
|
|
19
26
|
TimeField.use = function(template) {
|
|
20
|
-
TimeField.defaultTemplate = template
|
|
27
|
+
TimeField.defaultTemplate = template;
|
|
21
28
|
};
|
|
22
29
|
|
|
23
30
|
TimeField.prototype = Object.create(Field.prototype);
|
|
@@ -33,6 +40,45 @@ TimeField.prototype.step = function(seconds) {
|
|
|
33
40
|
return this;
|
|
34
41
|
};
|
|
35
42
|
|
|
43
|
+
TimeField.prototype.clearable = function(enabled = true) {
|
|
44
|
+
this.$description.clearable = BaseComponent.obs(enabled);
|
|
45
|
+
return this;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
TimeField.prototype.range = function(enabled = true) {
|
|
49
|
+
this.$description.range = BaseComponent.obs(enabled);
|
|
50
|
+
return this;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
TimeField.prototype.modelStart = function(observable) {
|
|
54
|
+
if(!this.$description.range) {
|
|
55
|
+
console.warn('TimeField: modelStart is only available in range mode');
|
|
56
|
+
}
|
|
57
|
+
this.$description.valueStart = observable;
|
|
58
|
+
return this;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
TimeField.prototype.modelEnd = function(observable) {
|
|
62
|
+
this.$description.valueEnd = observable;
|
|
63
|
+
return this;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
TimeField.prototype.rangeSeparator = function(sep) {
|
|
67
|
+
this.$description.rangeSeparator = sep;
|
|
68
|
+
return this;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
TimeField.prototype.onChange = function(handler) {
|
|
72
|
+
this.on('change', handler);
|
|
73
|
+
return this;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
TimeField.prototype.onClear = function(handler) {
|
|
77
|
+
this.on('clear', handler);
|
|
78
|
+
return this;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// Validation
|
|
36
82
|
TimeField.prototype.min = function(time, message) {
|
|
37
83
|
return this.addRule(Validation.afterTime, [time], message);
|
|
38
84
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import StringField from "./StringField";
|
|
2
2
|
import {Validation} from "../../validation/Validation";
|
|
3
3
|
|
|
4
|
-
export default function UrlField(name,
|
|
4
|
+
export default function UrlField(name, props) {
|
|
5
5
|
if(!(this instanceof UrlField)) {
|
|
6
|
-
return new UrlField(name,
|
|
6
|
+
return new UrlField(name, props);
|
|
7
7
|
}
|
|
8
|
-
StringField.call(this, name, 'url',
|
|
8
|
+
StringField.call(this, name, 'url', props);
|
|
9
9
|
|
|
10
|
-
// Auto-apply url validation
|
|
11
10
|
this.addRule(Validation.url, []);
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
UrlField.defaultTemplate = null;
|
|
15
14
|
|
|
16
15
|
UrlField.use = function(template) {
|
|
17
|
-
UrlField.defaultTemplate = template
|
|
16
|
+
UrlField.defaultTemplate = template;
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
UrlField.prototype = Object.create(StringField.prototype);
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import BaseComponent from "../../../../BaseComponent";
|
|
2
|
+
import HasEventEmitter from "../../../../../core/utils/HasEventEmitter";
|
|
3
|
+
|
|
4
|
+
export default function FileAvatarMode(props = {}) {
|
|
5
|
+
if(!(this instanceof FileAvatarMode)) {
|
|
6
|
+
return new FileAvatarMode(props);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
BaseComponent.call(this, props);
|
|
10
|
+
|
|
11
|
+
this.$description = {
|
|
12
|
+
variant: 'hover-overlay',
|
|
13
|
+
shape: 'circle',
|
|
14
|
+
size: 100,
|
|
15
|
+
placeholderIcon: null,
|
|
16
|
+
overlayIcon: null,
|
|
17
|
+
editImageIcon: null,
|
|
18
|
+
changeLabel: 'Change photo',
|
|
19
|
+
removeLabel: 'Remove',
|
|
20
|
+
renderAvatar: null,
|
|
21
|
+
renderOverlay: null,
|
|
22
|
+
renderActions: null,
|
|
23
|
+
props
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
BaseComponent.extends(FileAvatarMode);
|
|
28
|
+
BaseComponent.use(FileAvatarMode, HasEventEmitter);
|
|
29
|
+
|
|
30
|
+
FileAvatarMode.defaultTemplate = null;
|
|
31
|
+
|
|
32
|
+
FileAvatarMode.use = function(template) {
|
|
33
|
+
FileAvatarMode.defaultTemplate = template;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
FileAvatarMode.prototype.hoverOverlay = function() {
|
|
37
|
+
this.$description.variant = 'hover-overlay';
|
|
38
|
+
return this;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
FileAvatarMode.prototype.cornerBadge = function() {
|
|
42
|
+
this.$description.variant = 'corner-badge';
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
FileAvatarMode.prototype.actionButtons = function() {
|
|
47
|
+
this.$description.variant = 'action-buttons';
|
|
48
|
+
return this;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
FileAvatarMode.prototype.circle = function() {
|
|
52
|
+
this.$description.shape = 'circle';
|
|
53
|
+
return this;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
FileAvatarMode.prototype.square = function() {
|
|
57
|
+
this.$description.shape = 'square';
|
|
58
|
+
return this;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
FileAvatarMode.prototype.size = function(size) {
|
|
62
|
+
this.$description.size = size;
|
|
63
|
+
return this;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
FileAvatarMode.prototype.placeholderIcon = function(icon) {
|
|
67
|
+
this.$description.placeholderIcon = icon;
|
|
68
|
+
return this;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
FileAvatarMode.prototype.overlayIcon = function(icon) {
|
|
72
|
+
this.$description.overlayIcon = icon;
|
|
73
|
+
return this;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
FileAvatarMode.prototype.editImageIcon = function(icon) {
|
|
77
|
+
this.$description.editImageIcon = icon;
|
|
78
|
+
return this;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
FileAvatarMode.prototype.changeLabel = function(label) {
|
|
82
|
+
this.$description.changeLabel = label;
|
|
83
|
+
return this;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
FileAvatarMode.prototype.removeLabel = function(label) {
|
|
87
|
+
this.$description.removeLabel = label;
|
|
88
|
+
return this;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
FileAvatarMode.prototype.renderAvatar = function(fn) {
|
|
92
|
+
this.$description.renderAvatar = fn;
|
|
93
|
+
return this;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
FileAvatarMode.prototype.renderOverlay = function(fn) {
|
|
97
|
+
this.$description.renderOverlay = fn;
|
|
98
|
+
return this;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
FileAvatarMode.prototype.renderActions = function(fn) {
|
|
102
|
+
this.$description.renderActions = fn;
|
|
103
|
+
return this;
|
|
104
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import BaseComponent from "../../../../BaseComponent";
|
|
2
|
+
import HasEventEmitter from "../../../../../core/utils/HasEventEmitter";
|
|
3
|
+
|
|
4
|
+
export default function FileDropzoneMode(props = {}) {
|
|
5
|
+
if(!(this instanceof FileDropzoneMode)) {
|
|
6
|
+
return new FileDropzoneMode(props);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
BaseComponent.call(this, props);
|
|
10
|
+
|
|
11
|
+
this.$description = {
|
|
12
|
+
icon: null,
|
|
13
|
+
text: 'Click or drag & drop files here',
|
|
14
|
+
hint: null,
|
|
15
|
+
height: null,
|
|
16
|
+
renderZone: null,
|
|
17
|
+
removeIcon: null,
|
|
18
|
+
props
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
BaseComponent.extends(FileDropzoneMode);
|
|
23
|
+
BaseComponent.use(FileDropzoneMode, HasEventEmitter);
|
|
24
|
+
|
|
25
|
+
FileDropzoneMode.defaultTemplate = null;
|
|
26
|
+
|
|
27
|
+
FileDropzoneMode.use = function(template) {
|
|
28
|
+
FileDropzoneMode.defaultTemplate = template;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
FileDropzoneMode.prototype.icon = function(icon) {
|
|
32
|
+
this.$description.icon = icon;
|
|
33
|
+
return this;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
FileDropzoneMode.prototype.text = function(text) {
|
|
37
|
+
this.$description.text = text;
|
|
38
|
+
return this;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
FileDropzoneMode.prototype.hint = function(hint) {
|
|
42
|
+
this.$description.hint = hint;
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
FileDropzoneMode.prototype.height = function(value) {
|
|
47
|
+
this.$description.height = value;
|
|
48
|
+
return this;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
FileDropzoneMode.prototype.renderZone = function(fn) {
|
|
52
|
+
this.$description.renderZone = fn;
|
|
53
|
+
return this;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
FileDropzoneMode.prototype.removeIcon = function(icon) {
|
|
57
|
+
this.$description.removeIcon = icon;
|
|
58
|
+
return this;
|
|
59
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import BaseComponent from "../../../../BaseComponent";
|
|
2
|
+
import HasEventEmitter from "../../../../../core/utils/HasEventEmitter";
|
|
3
|
+
import { $ } from '../../../../../../index';
|
|
4
|
+
|
|
5
|
+
export default function FileItemPreview(file, props = {}) {
|
|
6
|
+
if(!(this instanceof FileItemPreview)) {
|
|
7
|
+
return new FileItemPreview(file, props);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
BaseComponent.call(this, props);
|
|
11
|
+
|
|
12
|
+
this.$description = {
|
|
13
|
+
file: file || null,
|
|
14
|
+
status: $('idle'),
|
|
15
|
+
progress: $(0),
|
|
16
|
+
error: $(null),
|
|
17
|
+
props
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
BaseComponent.extends(FileItemPreview);
|
|
22
|
+
BaseComponent.use(FileItemPreview, HasEventEmitter);
|
|
23
|
+
|
|
24
|
+
FileItemPreview.defaultTemplate = null;
|
|
25
|
+
|
|
26
|
+
FileItemPreview.use = function(template) {
|
|
27
|
+
FileItemPreview.defaultTemplate = template;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
FileItemPreview.prototype.file = function() {
|
|
31
|
+
return this.$description.file;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
FileItemPreview.prototype.status = function(status) {
|
|
35
|
+
this.$description.status.set(status);
|
|
36
|
+
return this;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
FileItemPreview.prototype.progress = function(value) {
|
|
40
|
+
this.$description.progress.set(value);
|
|
41
|
+
return this;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
FileItemPreview.prototype.error = function(message) {
|
|
45
|
+
this.$description.error.set(message);
|
|
46
|
+
this.$description.status.set('error');
|
|
47
|
+
return this;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
FileItemPreview.prototype.done = function() {
|
|
51
|
+
this.$description.status.set('done');
|
|
52
|
+
this.$description.progress.set(100);
|
|
53
|
+
return this;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
FileItemPreview.prototype.uploading = function() {
|
|
57
|
+
this.$description.status.set('uploading');
|
|
58
|
+
return this;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
FileItemPreview.prototype.onClick = function(handler) {
|
|
62
|
+
this.on('click', handler);
|
|
63
|
+
return this;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
FileItemPreview.prototype.onRemove = function(handler) {
|
|
67
|
+
this.on('remove', handler);
|
|
68
|
+
return this;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
FileItemPreview.prototype.onReplace = function(handler) {
|
|
72
|
+
this.on('replace', handler);
|
|
73
|
+
return this;
|
|
74
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import BaseComponent from "../../../../BaseComponent";
|
|
2
|
+
|
|
3
|
+
export default function FileNativeMode(props = {}) {
|
|
4
|
+
if(!(this instanceof FileNativeMode)) {
|
|
5
|
+
return new FileNativeMode(props);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
BaseComponent.call(this, props);
|
|
9
|
+
|
|
10
|
+
this.$description = {
|
|
11
|
+
props
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
BaseComponent.extends(FileNativeMode);
|
|
16
|
+
|
|
17
|
+
FileNativeMode.defaultTemplate = null;
|
|
18
|
+
|
|
19
|
+
FileNativeMode.use = function(template) {
|
|
20
|
+
FileNativeMode.defaultTemplate = template;
|
|
21
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import BaseComponent from "../../../../BaseComponent";
|
|
2
|
+
import HasEventEmitter from "../../../../../core/utils/HasEventEmitter";
|
|
3
|
+
|
|
4
|
+
export default function FileUploadButtonMode(props = {}) {
|
|
5
|
+
if(!(this instanceof FileUploadButtonMode)) {
|
|
6
|
+
return new FileUploadButtonMode(props);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
BaseComponent.call(this, props);
|
|
10
|
+
|
|
11
|
+
this.$description = {
|
|
12
|
+
buttonLabel: 'Add file',
|
|
13
|
+
buttonIcon: null,
|
|
14
|
+
showProgress: true,
|
|
15
|
+
renderItem: null,
|
|
16
|
+
renderButton: null,
|
|
17
|
+
renderList: null,
|
|
18
|
+
props
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
BaseComponent.extends(FileUploadButtonMode);
|
|
23
|
+
BaseComponent.use(FileUploadButtonMode, HasEventEmitter);
|
|
24
|
+
|
|
25
|
+
FileUploadButtonMode.defaultTemplate = null;
|
|
26
|
+
|
|
27
|
+
FileUploadButtonMode.use = function(template) {
|
|
28
|
+
FileUploadButtonMode.defaultTemplate = template;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
FileUploadButtonMode.prototype.buttonLabel = function(label) {
|
|
32
|
+
this.$description.buttonLabel = label;
|
|
33
|
+
return this;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
FileUploadButtonMode.prototype.buttonIcon = function(icon) {
|
|
37
|
+
this.$description.buttonIcon = icon;
|
|
38
|
+
return this;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
FileUploadButtonMode.prototype.showProgress = function(enabled = true) {
|
|
42
|
+
this.$description.showProgress = enabled;
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
FileUploadButtonMode.prototype.renderItem = function(fn) {
|
|
47
|
+
this.$description.renderItem = fn;
|
|
48
|
+
return this;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
FileUploadButtonMode.prototype.renderButton = function(fn) {
|
|
52
|
+
this.$description.renderButton = fn;
|
|
53
|
+
return this;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
FileUploadButtonMode.prototype.renderList = function(fn) {
|
|
57
|
+
this.$description.renderList = fn;
|
|
58
|
+
return this;
|
|
59
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import BaseComponent from "../../../../BaseComponent";
|
|
2
|
+
import HasEventEmitter from "../../../../../core/utils/HasEventEmitter";
|
|
3
|
+
|
|
4
|
+
export default function FileWallMode(props = {}) {
|
|
5
|
+
if(!(this instanceof FileWallMode)) {
|
|
6
|
+
return new FileWallMode(props);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
BaseComponent.call(this, props);
|
|
10
|
+
|
|
11
|
+
this.$description = {
|
|
12
|
+
cellSize: 96,
|
|
13
|
+
addLabel: 'Upload',
|
|
14
|
+
addIcon: null,
|
|
15
|
+
renderCell: null,
|
|
16
|
+
renderAdd: null,
|
|
17
|
+
props
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
BaseComponent.extends(FileWallMode);
|
|
22
|
+
BaseComponent.use(FileWallMode, HasEventEmitter);
|
|
23
|
+
|
|
24
|
+
FileWallMode.defaultTemplate = null;
|
|
25
|
+
|
|
26
|
+
FileWallMode.use = function(template) {
|
|
27
|
+
FileWallMode.defaultTemplate = template;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
FileWallMode.prototype.cellSize = function(size) {
|
|
31
|
+
this.$description.cellSize = size;
|
|
32
|
+
return this;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
FileWallMode.prototype.addLabel = function(label) {
|
|
36
|
+
this.$description.addLabel = label;
|
|
37
|
+
return this;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
FileWallMode.prototype.addIcon = function(icon) {
|
|
41
|
+
this.$description.addIcon = icon;
|
|
42
|
+
return this;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
FileWallMode.prototype.renderCell = function(fn) {
|
|
46
|
+
this.$description.renderCell = fn;
|
|
47
|
+
return this;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
FileWallMode.prototype.renderAdd = function(fn) {
|
|
51
|
+
this.$description.renderAdd = fn;
|
|
52
|
+
return this;
|
|
53
|
+
};
|