dattatable 2.10.1 → 2.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dashboard/accordion.d.ts +1 -0
- package/build/dashboard/accordion.js +2 -0
- package/build/dashboard/index.d.ts +2 -0
- package/build/dashboard/tiles.d.ts +1 -0
- package/build/dashboard/tiles.js +3 -0
- package/build/lib.d.ts +1 -0
- package/build/lib.js +1 -0
- package/build/propertyPane/base.d.ts +19 -0
- package/build/propertyPane/base.js +86 -0
- package/build/propertyPane/index.d.ts +3 -0
- package/build/propertyPane/index.js +9 -0
- package/build/propertyPane/multiDropdown.d.ts +11 -0
- package/build/propertyPane/multiDropdown.js +85 -0
- package/build/propertyPane/multiDropdownButton.d.ts +11 -0
- package/build/propertyPane/multiDropdownButton.js +43 -0
- package/build/propertyPane/multiDropdownCheckbox.d.ts +11 -0
- package/build/propertyPane/multiDropdownCheckbox.js +43 -0
- package/dist/dattatable.js +58 -3
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Accordion.html +2 -2
- package/docs/classes/AuditLog.html +2 -2
- package/docs/classes/CanvasForm.html +2 -2
- package/docs/classes/Comments.html +2 -2
- package/docs/classes/Dashboard.html +4 -4
- package/docs/classes/DataTable.html +3 -3
- package/docs/classes/Documents.html +6 -6
- package/docs/classes/FilterSlideout.html +2 -2
- package/docs/classes/Footer.html +2 -2
- package/docs/classes/Header.html +2 -2
- package/docs/classes/InstallationRequired.html +2 -2
- package/docs/classes/ItemForm.html +4 -4
- package/docs/classes/List.html +4 -4
- package/docs/classes/ListSecurity.html +2 -2
- package/docs/classes/LoadingDialog.html +2 -2
- package/docs/classes/Modal.html +2 -2
- package/docs/classes/Navigation.html +3 -3
- package/docs/classes/Tiles.html +2 -2
- package/docs/classes/Timeout.html +2 -2
- package/docs/enums/ActionButtonTypes.html +2 -2
- package/docs/functions/MultiDropdown.html +1 -0
- package/docs/functions/MultiDropdownButton.html +1 -0
- package/docs/functions/MultiDropdownCheckbox.html +1 -0
- package/docs/functions/formatBytes.html +1 -1
- package/docs/functions/formatDateValue.html +1 -1
- package/docs/functions/formatTimeValue.html +1 -1
- package/docs/functions/getContextInfo.html +1 -1
- package/docs/functions/getFileExt.html +1 -1
- package/docs/functions/waitForTheme.html +1 -1
- package/docs/interfaces/IAccordion.html +2 -2
- package/docs/interfaces/IAccordionProps.html +3 -2
- package/docs/interfaces/IAuditLogItem.html +2 -2
- package/docs/interfaces/IAuditLogItemCreation.html +2 -2
- package/docs/interfaces/IAuditLogProps.html +2 -2
- package/docs/interfaces/IAuditLogViewProps.html +2 -2
- package/docs/interfaces/ICommentsItem.html +2 -2
- package/docs/interfaces/IDashboardProps.html +2 -2
- package/docs/interfaces/IDataTable.html +2 -2
- package/docs/interfaces/IDataTableProps.html +2 -2
- package/docs/interfaces/IDocumentsProps.html +2 -2
- package/docs/interfaces/IFilterItem.html +2 -2
- package/docs/interfaces/IFilterProps.html +2 -2
- package/docs/interfaces/IFooterProps.html +2 -2
- package/docs/interfaces/IHeaderProps.html +2 -2
- package/docs/interfaces/IInstallProps.html +2 -2
- package/docs/interfaces/IItemFormCreateProps.html +2 -2
- package/docs/interfaces/IItemFormEditProps.html +2 -2
- package/docs/interfaces/IItemFormTab.html +2 -2
- package/docs/interfaces/IItemFormTabInfo.html +2 -2
- package/docs/interfaces/IItemFormViewProps.html +2 -2
- package/docs/interfaces/IListProps.html +2 -2
- package/docs/interfaces/IListSecurity.html +2 -2
- package/docs/interfaces/IListSecurityItem.html +2 -2
- package/docs/interfaces/IShowDialogProps.html +2 -2
- package/docs/interfaces/ITiles.html +2 -2
- package/docs/interfaces/ITilesProps.html +3 -2
- package/docs/modules.html +4 -1
- package/docs/variables/DattaTable.html +1 -1
- package/docs/variables/ListSecurityDefaultGroups.html +1 -1
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ export interface IAccordionProps {
|
|
|
14
14
|
onItemClick?: (el?: HTMLElement, item?: any) => void;
|
|
15
15
|
onItemHeaderRender?: (el?: HTMLElement, item?: any) => void;
|
|
16
16
|
onItemRender?: (el?: HTMLElement, item?: any) => void;
|
|
17
|
+
onPaginationClick?: (pageNumber?: number) => void;
|
|
17
18
|
onPaginationRender?: (el?: HTMLElement) => void;
|
|
18
19
|
paginationLimit?: number;
|
|
19
20
|
showPagination?: boolean;
|
|
@@ -292,6 +292,8 @@ var Accordion = /** @class */ (function () {
|
|
|
292
292
|
// Set the last item class
|
|
293
293
|
var lastIdx = startIdx + paginationLimit - 1;
|
|
294
294
|
elItems[lastIdx < elItems.length ? lastIdx : elItems.length - 1].classList.add("last-item");
|
|
295
|
+
// Call the event
|
|
296
|
+
_this._props.onPaginationClick ? _this._props.onPaginationClick(pageNumber) : null;
|
|
295
297
|
}
|
|
296
298
|
});
|
|
297
299
|
// Call the event
|
|
@@ -19,6 +19,7 @@ export interface IDashboardProps {
|
|
|
19
19
|
onItemClick?: (el?: HTMLElement, item?: any) => void;
|
|
20
20
|
onItemHeaderRender?: (el?: HTMLElement, item?: any) => void;
|
|
21
21
|
onItemRender?: (el?: HTMLElement, item?: any) => void;
|
|
22
|
+
onPaginationClick?: (pageNumber?: number) => void;
|
|
22
23
|
onPaginationRender?: (el?: HTMLElement) => void;
|
|
23
24
|
paginationLimit?: number;
|
|
24
25
|
showPagination?: boolean;
|
|
@@ -89,6 +90,7 @@ export interface IDashboardProps {
|
|
|
89
90
|
onColumnRendered?: (el?: HTMLElement, item?: any) => void;
|
|
90
91
|
onFooterRendered?: (el?: HTMLElement, item?: any) => void;
|
|
91
92
|
onHeaderRendered?: (el?: HTMLElement, item?: any) => void;
|
|
93
|
+
onPaginationClick?: (pageNumber?: number) => void;
|
|
92
94
|
onPaginationRendered?: (el?: HTMLElement) => void;
|
|
93
95
|
onSubTitleRendered?: (el?: HTMLElement, item?: any) => void;
|
|
94
96
|
onTitleRendered?: (el?: HTMLElement, item?: any) => void;
|
|
@@ -17,6 +17,7 @@ export interface ITilesProps {
|
|
|
17
17
|
onColumnRendered?: (el?: HTMLElement, item?: any) => void;
|
|
18
18
|
onFooterRendered?: (el?: HTMLElement, item?: any) => void;
|
|
19
19
|
onHeaderRendered?: (el?: HTMLElement, item?: any) => void;
|
|
20
|
+
onPaginationClick?: (pageNumber?: number) => void;
|
|
20
21
|
onPaginationRendered?: (el?: HTMLElement) => void;
|
|
21
22
|
onSubTitleRendered?: (el?: HTMLElement, item?: any) => void;
|
|
22
23
|
onTitleRendered?: (el?: HTMLElement, item?: any) => void;
|
package/build/dashboard/tiles.js
CHANGED
|
@@ -187,6 +187,7 @@ var Tiles = /** @class */ (function () {
|
|
|
187
187
|
};
|
|
188
188
|
// Updates the visibility of the tiles
|
|
189
189
|
Tiles.prototype.updateTiles = function () {
|
|
190
|
+
var _this = this;
|
|
190
191
|
var paginationLimit = this._props.paginationLimit || 10;
|
|
191
192
|
// Get the pagination element
|
|
192
193
|
var elPagination = this._props.el.querySelector(".tiles-pagination");
|
|
@@ -285,6 +286,8 @@ var Tiles = /** @class */ (function () {
|
|
|
285
286
|
// Show the item
|
|
286
287
|
elItem.parentElement.classList.remove("d-none");
|
|
287
288
|
}
|
|
289
|
+
// Call the event
|
|
290
|
+
_this._props.onPaginationClick ? _this._props.onPaginationClick(pageNumber) : null;
|
|
288
291
|
}
|
|
289
292
|
});
|
|
290
293
|
// Call the event
|
package/build/lib.d.ts
CHANGED
package/build/lib.js
CHANGED
|
@@ -30,6 +30,7 @@ exports.DattaTable = void 0;
|
|
|
30
30
|
__exportStar(require("./common"), exports);
|
|
31
31
|
__exportStar(require("./auditLog"), exports);
|
|
32
32
|
__exportStar(require("./dashboard"), exports);
|
|
33
|
+
__exportStar(require("./propertyPane"), exports);
|
|
33
34
|
// Export the library constant
|
|
34
35
|
var Common = require("./common");
|
|
35
36
|
var AuditLog = require("./auditLog");
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IBasePropertyPane, IBasePropertyPaneProperties, IBasePropertyPaneProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Base Property Pane
|
|
4
|
+
*/
|
|
5
|
+
export declare class BasePropertyPane<IProps = IBasePropertyPaneProps> implements IBasePropertyPane {
|
|
6
|
+
private _config;
|
|
7
|
+
get config(): IProps;
|
|
8
|
+
properties: IBasePropertyPaneProperties;
|
|
9
|
+
targetProperty: string;
|
|
10
|
+
type: number;
|
|
11
|
+
constructor(targetProperty: string, config: IProps, context?: any);
|
|
12
|
+
protected applyTooltip(el: HTMLElement): void;
|
|
13
|
+
get currentValue(): string | undefined;
|
|
14
|
+
currentValueAsObject<T>(): T | undefined;
|
|
15
|
+
protected onDispose(el: HTMLElement, context: any): void;
|
|
16
|
+
private dispose;
|
|
17
|
+
protected onRender(el: HTMLElement, context: any, onChange: (targetProperty: string, newValue?: string | number | boolean | undefined) => void): void;
|
|
18
|
+
private render;
|
|
19
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BasePropertyPane = void 0;
|
|
4
|
+
var gd_sprest_bs_1 = require("gd-sprest-bs");
|
|
5
|
+
/**
|
|
6
|
+
* Base Property Pane
|
|
7
|
+
*/
|
|
8
|
+
var BasePropertyPane = /** @class */ (function () {
|
|
9
|
+
// Constructor
|
|
10
|
+
function BasePropertyPane(targetProperty, config, context) {
|
|
11
|
+
var _this = this;
|
|
12
|
+
// Set the type (Custom = 1)
|
|
13
|
+
this.type = 1;
|
|
14
|
+
// Save the configuration
|
|
15
|
+
this._config = config;
|
|
16
|
+
// Save the key
|
|
17
|
+
this.targetProperty = targetProperty;
|
|
18
|
+
// Set the properties
|
|
19
|
+
this.properties = {
|
|
20
|
+
key: this.targetProperty,
|
|
21
|
+
context: context,
|
|
22
|
+
onDispose: function (el, context) {
|
|
23
|
+
// Call the events
|
|
24
|
+
_this.dispose(el, context);
|
|
25
|
+
_this.onDispose ? _this.onDispose(el, context) : null;
|
|
26
|
+
},
|
|
27
|
+
onRender: function (el, context, onChange) {
|
|
28
|
+
_this.render(el, context, onChange);
|
|
29
|
+
_this.onRender ? _this.onRender(el, context, onChange) : null;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
Object.defineProperty(BasePropertyPane.prototype, "config", {
|
|
34
|
+
get: function () { return this._config; },
|
|
35
|
+
enumerable: false,
|
|
36
|
+
configurable: true
|
|
37
|
+
});
|
|
38
|
+
// Applies the tooltip to an element
|
|
39
|
+
BasePropertyPane.prototype.applyTooltip = function (el) {
|
|
40
|
+
// Apply the tooltip
|
|
41
|
+
var content = this._config.tooltip;
|
|
42
|
+
if (content) {
|
|
43
|
+
gd_sprest_bs_1.Components.Tooltip({
|
|
44
|
+
target: el,
|
|
45
|
+
content: content
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(BasePropertyPane.prototype, "currentValue", {
|
|
50
|
+
// Returns the current value as a string
|
|
51
|
+
get: function () {
|
|
52
|
+
var properties = this._config.properties;
|
|
53
|
+
return properties ? properties[this.targetProperty] : undefined;
|
|
54
|
+
},
|
|
55
|
+
enumerable: false,
|
|
56
|
+
configurable: true
|
|
57
|
+
});
|
|
58
|
+
// Returns the current value as an object
|
|
59
|
+
BasePropertyPane.prototype.currentValueAsObject = function () {
|
|
60
|
+
// Ensure a value exists
|
|
61
|
+
if (this.currentValue) {
|
|
62
|
+
try {
|
|
63
|
+
return JSON.parse(this.currentValue);
|
|
64
|
+
}
|
|
65
|
+
catch (_a) { }
|
|
66
|
+
}
|
|
67
|
+
// Return nothing
|
|
68
|
+
return undefined;
|
|
69
|
+
};
|
|
70
|
+
// Dispose of the component
|
|
71
|
+
BasePropertyPane.prototype.onDispose = function (el, context) { };
|
|
72
|
+
BasePropertyPane.prototype.dispose = function (el, context) {
|
|
73
|
+
// Clear the element
|
|
74
|
+
while (el.firstChild) {
|
|
75
|
+
el.removeChild(el.firstChild);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
// Renders the component
|
|
79
|
+
BasePropertyPane.prototype.onRender = function (el, context, onChange) { };
|
|
80
|
+
BasePropertyPane.prototype.render = function (el, context, onChange) {
|
|
81
|
+
// Clear the component
|
|
82
|
+
this.dispose(el, context);
|
|
83
|
+
};
|
|
84
|
+
return BasePropertyPane;
|
|
85
|
+
}());
|
|
86
|
+
exports.BasePropertyPane = BasePropertyPane;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MultiDropdownCheckbox = exports.MultiDropdownButton = exports.MultiDropdown = void 0;
|
|
4
|
+
var multiDropdown_1 = require("./multiDropdown");
|
|
5
|
+
Object.defineProperty(exports, "MultiDropdown", { enumerable: true, get: function () { return multiDropdown_1.MultiDropdown; } });
|
|
6
|
+
var multiDropdownButton_1 = require("./multiDropdownButton");
|
|
7
|
+
Object.defineProperty(exports, "MultiDropdownButton", { enumerable: true, get: function () { return multiDropdownButton_1.MultiDropdownButton; } });
|
|
8
|
+
var multiDropdownCheckbox_1 = require("./multiDropdownCheckbox");
|
|
9
|
+
Object.defineProperty(exports, "MultiDropdownCheckbox", { enumerable: true, get: function () { return multiDropdownCheckbox_1.MultiDropdownCheckbox; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Components } from "gd-sprest-bs";
|
|
2
|
+
import { BasePropertyPane } from "./base";
|
|
3
|
+
import { IMultiDropdown } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Multi-Dropdown
|
|
6
|
+
*/
|
|
7
|
+
export declare class _MultiDropdown<T = IMultiDropdown> extends BasePropertyPane<T> {
|
|
8
|
+
protected onRendering(props: Components.IFormControlPropsMultiDropdown): Components.IFormControlPropsMultiDropdown;
|
|
9
|
+
onRender(el: HTMLElement, context: any, onChange: (targetProperty: string, newValue?: string | number | boolean | undefined) => void): void;
|
|
10
|
+
}
|
|
11
|
+
export declare const MultiDropdown: (targetProperty: string, config: IMultiDropdown, context?: any) => _MultiDropdown<IMultiDropdown>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.MultiDropdown = exports._MultiDropdown = void 0;
|
|
19
|
+
var gd_sprest_bs_1 = require("gd-sprest-bs");
|
|
20
|
+
var base_1 = require("./base");
|
|
21
|
+
/**
|
|
22
|
+
* Multi-Dropdown
|
|
23
|
+
*/
|
|
24
|
+
var _MultiDropdown = /** @class */ (function (_super) {
|
|
25
|
+
__extends(_MultiDropdown, _super);
|
|
26
|
+
function _MultiDropdown() {
|
|
27
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
+
}
|
|
29
|
+
// Internal rendering event
|
|
30
|
+
_MultiDropdown.prototype.onRendering = function (props) { return props; };
|
|
31
|
+
// Override the render event
|
|
32
|
+
_MultiDropdown.prototype.onRender = function (el, context, onChange) {
|
|
33
|
+
var _this = this;
|
|
34
|
+
var currentValue = this.currentValueAsObject();
|
|
35
|
+
if (currentValue) {
|
|
36
|
+
var values = [];
|
|
37
|
+
// Parse the values
|
|
38
|
+
for (var i = 0; i < currentValue.length; i++) {
|
|
39
|
+
values.push(currentValue[i]["value"] || currentValue[i]["text"]);
|
|
40
|
+
}
|
|
41
|
+
// Update the current value
|
|
42
|
+
currentValue = values;
|
|
43
|
+
}
|
|
44
|
+
// Set the properties
|
|
45
|
+
var config = this.config;
|
|
46
|
+
var props = {
|
|
47
|
+
description: config.description,
|
|
48
|
+
items: config.items,
|
|
49
|
+
label: config.label,
|
|
50
|
+
name: this.targetProperty,
|
|
51
|
+
type: gd_sprest_bs_1.Components.FormControlTypes.MultiDropdown,
|
|
52
|
+
value: currentValue,
|
|
53
|
+
onChange: function (items) {
|
|
54
|
+
// Convert the object as a string
|
|
55
|
+
var value = undefined;
|
|
56
|
+
try {
|
|
57
|
+
value = JSON.stringify(items);
|
|
58
|
+
}
|
|
59
|
+
catch (_a) { }
|
|
60
|
+
// Call the event
|
|
61
|
+
value = config.onSave ? config.onSave(value) : value;
|
|
62
|
+
// Update the property
|
|
63
|
+
onChange(_this.targetProperty, value);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
// Call the rendering events
|
|
67
|
+
props = this.onRendering(props);
|
|
68
|
+
props = config.onRendering ? config.onRendering(props) : props;
|
|
69
|
+
// Render the dropdown
|
|
70
|
+
gd_sprest_bs_1.Components.Form({
|
|
71
|
+
el: el,
|
|
72
|
+
controls: [props],
|
|
73
|
+
onControlRendered: function (ctrl) {
|
|
74
|
+
// Call the event
|
|
75
|
+
config.onRendered ? config.onRendered(ctrl.dropdown, ctrl.props) : null;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
return _MultiDropdown;
|
|
80
|
+
}(base_1.BasePropertyPane));
|
|
81
|
+
exports._MultiDropdown = _MultiDropdown;
|
|
82
|
+
var MultiDropdown = function (targetProperty, config, context) {
|
|
83
|
+
return new _MultiDropdown(targetProperty, config, context);
|
|
84
|
+
};
|
|
85
|
+
exports.MultiDropdown = MultiDropdown;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Components } from "gd-sprest-bs";
|
|
2
|
+
import { _MultiDropdown } from "./multiDropdown";
|
|
3
|
+
import { IMultiDropdownButton } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Multi-Dropdown Button
|
|
6
|
+
*/
|
|
7
|
+
declare class _MultiDropdownButton extends _MultiDropdown<IMultiDropdownButton> {
|
|
8
|
+
protected onRendering(props: Components.IFormControlPropsMultiDropdownButton): Components.IFormControlPropsMultiDropdownButton;
|
|
9
|
+
}
|
|
10
|
+
export declare const MultiDropdownButton: (targetProperty: string, config: IMultiDropdownButton, context?: any) => _MultiDropdownButton;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.MultiDropdownButton = void 0;
|
|
19
|
+
var gd_sprest_bs_1 = require("gd-sprest-bs");
|
|
20
|
+
var multiDropdown_1 = require("./multiDropdown");
|
|
21
|
+
/**
|
|
22
|
+
* Multi-Dropdown Button
|
|
23
|
+
*/
|
|
24
|
+
var _MultiDropdownButton = /** @class */ (function (_super) {
|
|
25
|
+
__extends(_MultiDropdownButton, _super);
|
|
26
|
+
function _MultiDropdownButton() {
|
|
27
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
+
}
|
|
29
|
+
// Override the rendering method to customize the type
|
|
30
|
+
_MultiDropdownButton.prototype.onRendering = function (props) {
|
|
31
|
+
// Set the type and placement
|
|
32
|
+
props.placeholder = this.config.placeholder;
|
|
33
|
+
props.placement = this.config.placement || gd_sprest_bs_1.Components.DropdownPlacements.Left;
|
|
34
|
+
props.type = gd_sprest_bs_1.Components.FormControlTypes.MultiDropdownButton;
|
|
35
|
+
// Return the props
|
|
36
|
+
return props;
|
|
37
|
+
};
|
|
38
|
+
return _MultiDropdownButton;
|
|
39
|
+
}(multiDropdown_1._MultiDropdown));
|
|
40
|
+
var MultiDropdownButton = function (targetProperty, config, context) {
|
|
41
|
+
return new _MultiDropdownButton(targetProperty, config, context);
|
|
42
|
+
};
|
|
43
|
+
exports.MultiDropdownButton = MultiDropdownButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Components } from "gd-sprest-bs";
|
|
2
|
+
import { _MultiDropdown } from "./multiDropdown";
|
|
3
|
+
import { IMultiDropdownCheckbox } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Multi-Dropdown Checkbox
|
|
6
|
+
*/
|
|
7
|
+
declare class _MultiDropdownCheckbox extends _MultiDropdown<IMultiDropdownCheckbox> {
|
|
8
|
+
protected onRendering(props: Components.IFormControlPropsMultiDropdownCheckbox): Components.IFormControlPropsMultiDropdownCheckbox;
|
|
9
|
+
}
|
|
10
|
+
export declare const MultiDropdownCheckbox: (targetProperty: string, config: IMultiDropdownCheckbox, context?: any) => _MultiDropdownCheckbox;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.MultiDropdownCheckbox = void 0;
|
|
19
|
+
var gd_sprest_bs_1 = require("gd-sprest-bs");
|
|
20
|
+
var multiDropdown_1 = require("./multiDropdown");
|
|
21
|
+
/**
|
|
22
|
+
* Multi-Dropdown Checkbox
|
|
23
|
+
*/
|
|
24
|
+
var _MultiDropdownCheckbox = /** @class */ (function (_super) {
|
|
25
|
+
__extends(_MultiDropdownCheckbox, _super);
|
|
26
|
+
function _MultiDropdownCheckbox() {
|
|
27
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
+
}
|
|
29
|
+
// Override the rendering method to customize the type
|
|
30
|
+
_MultiDropdownCheckbox.prototype.onRendering = function (props) {
|
|
31
|
+
// Set the type and placement
|
|
32
|
+
props.placeholder = this.config.placeholder;
|
|
33
|
+
props.placement = this.config.placement || gd_sprest_bs_1.Components.DropdownPlacements.Left;
|
|
34
|
+
props.type = gd_sprest_bs_1.Components.FormControlTypes.MultiDropdownCheckbox;
|
|
35
|
+
// Return the props
|
|
36
|
+
return props;
|
|
37
|
+
};
|
|
38
|
+
return _MultiDropdownCheckbox;
|
|
39
|
+
}(multiDropdown_1._MultiDropdown));
|
|
40
|
+
var MultiDropdownCheckbox = function (targetProperty, config, context) {
|
|
41
|
+
return new _MultiDropdownCheckbox(targetProperty, config, context);
|
|
42
|
+
};
|
|
43
|
+
exports.MultiDropdownCheckbox = MultiDropdownCheckbox;
|