@syncfusion/ej2-inplace-editor 25.2.3 → 26.1.35

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.
Files changed (116) hide show
  1. package/.eslintrc.json +3 -2
  2. package/dist/ej2-inplace-editor.umd.min.js +2 -2
  3. package/dist/ej2-inplace-editor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-inplace-editor.es2015.js +22 -43
  5. package/dist/es6/ej2-inplace-editor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-inplace-editor.es5.js +77 -98
  7. package/dist/es6/ej2-inplace-editor.es5.js.map +1 -1
  8. package/dist/global/ej2-inplace-editor.min.js +2 -2
  9. package/dist/global/ej2-inplace-editor.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/dist/ts/index.d.ts +4 -0
  12. package/dist/ts/index.ts +4 -0
  13. package/dist/ts/inplace-editor/base/classes.d.ts +63 -0
  14. package/dist/ts/inplace-editor/base/classes.ts +63 -0
  15. package/dist/ts/inplace-editor/base/events.d.ts +17 -0
  16. package/dist/ts/inplace-editor/base/events.ts +18 -0
  17. package/dist/ts/inplace-editor/base/index.d.ts +10 -0
  18. package/dist/ts/inplace-editor/base/index.ts +10 -0
  19. package/dist/ts/inplace-editor/base/inplace-editor-model.d.ts +344 -0
  20. package/dist/ts/inplace-editor/base/inplace-editor.d.ts +623 -0
  21. package/dist/ts/inplace-editor/base/inplace-editor.ts +1758 -0
  22. package/dist/ts/inplace-editor/base/interface.d.ts +117 -0
  23. package/dist/ts/inplace-editor/base/interface.ts +127 -0
  24. package/dist/ts/inplace-editor/base/models-model.d.ts +22 -0
  25. package/dist/ts/inplace-editor/base/models.d.ts +31 -0
  26. package/dist/ts/inplace-editor/base/models.ts +45 -0
  27. package/dist/ts/inplace-editor/base/util.d.ts +28 -0
  28. package/dist/ts/inplace-editor/base/util.ts +104 -0
  29. package/dist/ts/inplace-editor/index.d.ts +5 -0
  30. package/dist/ts/inplace-editor/index.ts +5 -0
  31. package/dist/ts/inplace-editor/modules/auto-complete.d.ts +34 -0
  32. package/dist/ts/inplace-editor/modules/auto-complete.ts +65 -0
  33. package/dist/ts/inplace-editor/modules/base-module.d.ts +19 -0
  34. package/dist/ts/inplace-editor/modules/base-module.ts +74 -0
  35. package/dist/ts/inplace-editor/modules/color-picker.d.ts +29 -0
  36. package/dist/ts/inplace-editor/modules/color-picker.ts +55 -0
  37. package/dist/ts/inplace-editor/modules/combo-box.d.ts +34 -0
  38. package/dist/ts/inplace-editor/modules/combo-box.ts +63 -0
  39. package/dist/ts/inplace-editor/modules/date-range-picker.d.ts +29 -0
  40. package/dist/ts/inplace-editor/modules/date-range-picker.ts +55 -0
  41. package/dist/ts/inplace-editor/modules/index.d.ts +12 -0
  42. package/dist/ts/inplace-editor/modules/index.ts +12 -0
  43. package/dist/ts/inplace-editor/modules/multi-select.d.ts +35 -0
  44. package/dist/ts/inplace-editor/modules/multi-select.ts +88 -0
  45. package/dist/ts/inplace-editor/modules/rte.d.ts +31 -0
  46. package/dist/ts/inplace-editor/modules/rte.ts +73 -0
  47. package/dist/ts/inplace-editor/modules/slider.d.ts +30 -0
  48. package/dist/ts/inplace-editor/modules/slider.ts +59 -0
  49. package/dist/ts/inplace-editor/modules/time-picker.d.ts +29 -0
  50. package/dist/ts/inplace-editor/modules/time-picker.ts +54 -0
  51. package/package.json +17 -17
  52. package/src/inplace-editor/base/inplace-editor.d.ts +0 -1
  53. package/src/inplace-editor/base/interface.js +0 -1
  54. package/src/inplace-editor/base/models.js +0 -2
  55. package/styles/bootstrap-dark.css +61 -14
  56. package/styles/bootstrap-dark.scss +26 -1
  57. package/styles/bootstrap.css +63 -15
  58. package/styles/bootstrap.scss +26 -1
  59. package/styles/bootstrap4.css +71 -19
  60. package/styles/bootstrap4.scss +26 -1
  61. package/styles/bootstrap5-dark.css +62 -14
  62. package/styles/bootstrap5-dark.scss +26 -1
  63. package/styles/bootstrap5.css +62 -14
  64. package/styles/bootstrap5.scss +26 -1
  65. package/styles/fabric-dark.css +59 -13
  66. package/styles/fabric-dark.scss +26 -1
  67. package/styles/fabric.css +61 -14
  68. package/styles/fabric.scss +26 -1
  69. package/styles/fluent-dark.css +63 -15
  70. package/styles/fluent-dark.scss +26 -1
  71. package/styles/fluent.css +63 -15
  72. package/styles/fluent.scss +26 -1
  73. package/styles/fluent2.css +1996 -0
  74. package/styles/fluent2.scss +26 -0
  75. package/styles/highcontrast-light.css +62 -13
  76. package/styles/highcontrast-light.scss +26 -1
  77. package/styles/highcontrast.css +64 -14
  78. package/styles/highcontrast.scss +26 -1
  79. package/styles/inplace-editor/_bootstrap5.3-definition.scss +69 -0
  80. package/styles/inplace-editor/_fluent2-definition.scss +71 -0
  81. package/styles/inplace-editor/_theme.scss +8 -3
  82. package/styles/inplace-editor/bootstrap-dark.css +61 -14
  83. package/styles/inplace-editor/bootstrap.css +63 -15
  84. package/styles/inplace-editor/bootstrap4.css +71 -19
  85. package/styles/inplace-editor/bootstrap5-dark.css +62 -14
  86. package/styles/inplace-editor/bootstrap5.css +62 -14
  87. package/styles/inplace-editor/fabric-dark.css +59 -13
  88. package/styles/inplace-editor/fabric.css +61 -14
  89. package/styles/inplace-editor/fluent-dark.css +63 -15
  90. package/styles/inplace-editor/fluent.css +63 -15
  91. package/styles/inplace-editor/fluent2.css +1996 -0
  92. package/styles/inplace-editor/fluent2.scss +26 -0
  93. package/styles/inplace-editor/highcontrast-light.css +62 -13
  94. package/styles/inplace-editor/highcontrast.css +64 -14
  95. package/styles/inplace-editor/icons/_bootstrap5.3.scss +19 -0
  96. package/styles/inplace-editor/icons/_fluent2.scss +19 -0
  97. package/styles/inplace-editor/material-dark.css +79 -17
  98. package/styles/inplace-editor/material.css +95 -20
  99. package/styles/inplace-editor/material3-dark.css +101 -21
  100. package/styles/inplace-editor/material3.css +101 -21
  101. package/styles/inplace-editor/tailwind-dark.css +72 -17
  102. package/styles/inplace-editor/tailwind.css +72 -17
  103. package/styles/material-dark.css +79 -17
  104. package/styles/material-dark.scss +26 -1
  105. package/styles/material.css +95 -20
  106. package/styles/material.scss +26 -1
  107. package/styles/material3-dark.css +101 -21
  108. package/styles/material3-dark.scss +26 -1
  109. package/styles/material3.css +101 -21
  110. package/styles/material3.scss +26 -1
  111. package/styles/tailwind-dark.css +72 -17
  112. package/styles/tailwind-dark.scss +26 -1
  113. package/styles/tailwind.css +72 -17
  114. package/styles/tailwind.scss +26 -1
  115. package/CHANGELOG.md +0 -262
  116. package/dist/ej2-inplace-editor.min.js +0 -10
@@ -0,0 +1,117 @@
1
+ import { ButtonModel } from '@syncfusion/ej2-buttons';
2
+ import { ColorPicker, Slider } from '@syncfusion/ej2-inputs';
3
+ import { RichTextEditor } from '@syncfusion/ej2-richtexteditor';
4
+ import { DateRangePicker, TimePicker, DateRange } from '@syncfusion/ej2-calendars';
5
+ import { AutoComplete, ComboBox, MultiSelect, FieldSettingsModel } from '@syncfusion/ej2-dropdowns';
6
+ import { RenderMode } from './inplace-editor';
7
+ /**
8
+ * Defines component types that can be used in the In-place Editor.
9
+ *
10
+ * @hidden
11
+ */
12
+ export declare type Component = AutoComplete | ColorPicker | ComboBox | DateRangePicker | MultiSelect | RichTextEditor | Slider | TimePicker;
13
+ /**
14
+ * Provides information about a Notify.
15
+ */
16
+ export interface NotifyParams {
17
+ type?: string;
18
+ module: string;
19
+ target?: HTMLElement | HTMLInputElement;
20
+ }
21
+ /**
22
+ * Provides information about a Component.
23
+ */
24
+ export interface IComponent {
25
+ showPopup?(): void;
26
+ compObj: Component;
27
+ render(e: NotifyParams): void;
28
+ focus(): void;
29
+ updateValue(e: NotifyParams): void;
30
+ refresh?(): void;
31
+ getRenderValue?(): void;
32
+ }
33
+ /**
34
+ * Provides information about a Button.
35
+ */
36
+ export interface IButton {
37
+ type: string;
38
+ constant: string;
39
+ title: object;
40
+ className: string;
41
+ model: ButtonModel;
42
+ container: HTMLElement;
43
+ }
44
+ /**
45
+ * Provides information about a ActionBegin event.
46
+ */
47
+ export interface ActionBeginEventArgs {
48
+ /** Defines the name of the field */
49
+ data: {
50
+ [key: string]: string | number;
51
+ };
52
+ /** Prevent the submit action. */
53
+ cancel?: boolean;
54
+ }
55
+ /**
56
+ * Provides information about a Action event.
57
+ */
58
+ export interface ActionEventArgs {
59
+ /** Prevents the current value render in the editor. */
60
+ cancel?: boolean;
61
+ /** Defines the data manager action result. */
62
+ data: object;
63
+ /** Defines the current editor value */
64
+ value: string;
65
+ }
66
+ /**
67
+ * Provides information about a Form event.
68
+ */
69
+ export interface FormEventArgs {
70
+ inputName: string;
71
+ message: string;
72
+ element: HTMLInputElement;
73
+ status?: string;
74
+ errorElement?: HTMLElement;
75
+ }
76
+ /**
77
+ * Provides information about a Validate event.
78
+ */
79
+ export interface ValidateEventArgs extends ActionBeginEventArgs {
80
+ /** Defines form validation error message. */
81
+ errorMessage: string;
82
+ }
83
+ /**
84
+ * Provides information about a BeginEdit event.
85
+ */
86
+ export interface BeginEditEventArgs {
87
+ /** Specifies whether to cancel the open action of the editor. */
88
+ cancel?: boolean;
89
+ /** Specifies whether to cancel the focus action, before open a editor. */
90
+ cancelFocus?: boolean;
91
+ /** Defines the current editor mode. */
92
+ mode?: RenderMode;
93
+ }
94
+ /**
95
+ * Provides information about the EndEdit event.
96
+ */
97
+ export interface EndEditEventArgs {
98
+ /** Defines the type of action ends the edit. */
99
+ action?: string;
100
+ /** Specifies whether to cancel the end edit action. */
101
+ cancel?: boolean;
102
+ /** Defines the current editor mode. */
103
+ mode?: RenderMode;
104
+ }
105
+ /**
106
+ * Provides information about the Change event.
107
+ */
108
+ export interface ChangeEventArgs {
109
+ /** Returns the selected item as JSON Object from the AutoComplete/ComboBox/DropDownList data source. */
110
+ itemData?: FieldSettingsModel;
111
+ /** Returns the previous selected item as JSON Object from the AutoComplete/ComboBox/DropDownList data source. */
112
+ previousItemData?: FieldSettingsModel;
113
+ /** Returns the previous value of integrated component that renders based on the `type` property in the In-place editor. */
114
+ previousValue: string | string[] | number | number[] | boolean[] | Date | Date[] | DateRange;
115
+ /** Returns the value of integrated component that renders based on the `type` property in the In-place editor. */
116
+ value: string | string[] | number | number[] | boolean[] | Date | Date[] | DateRange;
117
+ }
@@ -0,0 +1,127 @@
1
+ import { ButtonModel } from '@syncfusion/ej2-buttons';
2
+ import { ColorPicker, Slider } from '@syncfusion/ej2-inputs';
3
+ import { RichTextEditor } from '@syncfusion/ej2-richtexteditor';
4
+ import { DateRangePicker, TimePicker, DateRange } from '@syncfusion/ej2-calendars';
5
+ import { AutoComplete, ComboBox, MultiSelect, FieldSettingsModel } from '@syncfusion/ej2-dropdowns';
6
+ import { RenderMode } from './inplace-editor';
7
+
8
+ /**
9
+ * Defines component types that can be used in the In-place Editor.
10
+ *
11
+ * @hidden
12
+ */
13
+
14
+ export type Component = AutoComplete | ColorPicker | ComboBox | DateRangePicker | MultiSelect | RichTextEditor | Slider | TimePicker;
15
+
16
+ /**
17
+ * Provides information about a Notify.
18
+ */
19
+ export interface NotifyParams {
20
+ type?: string
21
+ module: string
22
+ target?: HTMLElement | HTMLInputElement
23
+ }
24
+
25
+ /**
26
+ * Provides information about a Component.
27
+ */
28
+ export interface IComponent {
29
+ showPopup?(): void
30
+ compObj: Component
31
+ render(e: NotifyParams): void
32
+ focus(): void
33
+ updateValue(e: NotifyParams): void
34
+ refresh?(): void
35
+ getRenderValue?(): void
36
+ }
37
+
38
+ /**
39
+ * Provides information about a Button.
40
+ */
41
+ export interface IButton {
42
+ type: string
43
+ constant: string
44
+ title: object
45
+ className: string
46
+ model: ButtonModel
47
+ container: HTMLElement
48
+ }
49
+
50
+ /**
51
+ * Provides information about a ActionBegin event.
52
+ */
53
+ export interface ActionBeginEventArgs {
54
+ /** Defines the name of the field */
55
+ data: { [key: string]: string | number }
56
+ /** Prevent the submit action. */
57
+ cancel?: boolean
58
+ }
59
+
60
+ /**
61
+ * Provides information about a Action event.
62
+ */
63
+ export interface ActionEventArgs {
64
+ /** Prevents the current value render in the editor. */
65
+ cancel?: boolean
66
+ /** Defines the data manager action result. */
67
+ data: object
68
+ /** Defines the current editor value */
69
+ value: string
70
+ }
71
+
72
+ /**
73
+ * Provides information about a Form event.
74
+ */
75
+ export interface FormEventArgs {
76
+ inputName: string
77
+ message: string
78
+ element: HTMLInputElement
79
+ status?: string
80
+ errorElement?: HTMLElement
81
+ }
82
+
83
+ /**
84
+ * Provides information about a Validate event.
85
+ */
86
+ export interface ValidateEventArgs extends ActionBeginEventArgs {
87
+ /** Defines form validation error message. */
88
+ errorMessage: string
89
+ }
90
+
91
+ /**
92
+ * Provides information about a BeginEdit event.
93
+ */
94
+ export interface BeginEditEventArgs {
95
+ /** Specifies whether to cancel the open action of the editor. */
96
+ cancel?: boolean
97
+ /** Specifies whether to cancel the focus action, before open a editor. */
98
+ cancelFocus?: boolean
99
+ /** Defines the current editor mode. */
100
+ mode?: RenderMode
101
+ }
102
+
103
+ /**
104
+ * Provides information about the EndEdit event.
105
+ */
106
+ export interface EndEditEventArgs {
107
+ /** Defines the type of action ends the edit. */
108
+ action?: string
109
+ /** Specifies whether to cancel the end edit action. */
110
+ cancel?: boolean
111
+ /** Defines the current editor mode. */
112
+ mode?: RenderMode
113
+ }
114
+
115
+ /**
116
+ * Provides information about the Change event.
117
+ */
118
+ export interface ChangeEventArgs {
119
+ /** Returns the selected item as JSON Object from the AutoComplete/ComboBox/DropDownList data source. */
120
+ itemData?: FieldSettingsModel
121
+ /** Returns the previous selected item as JSON Object from the AutoComplete/ComboBox/DropDownList data source. */
122
+ previousItemData?: FieldSettingsModel
123
+ /** Returns the previous value of integrated component that renders based on the `type` property in the In-place editor. */
124
+ previousValue: string | string[] | number | number[] | boolean[] | Date | Date[] | DateRange
125
+ /** Returns the value of integrated component that renders based on the `type` property in the In-place editor. */
126
+ value: string | string[] | number | number[] | boolean[] | Date | Date[] | DateRange
127
+ }
@@ -0,0 +1,22 @@
1
+ import { ChildProperty, Property } from '@syncfusion/ej2-base';import { TooltipModel } from '@syncfusion/ej2-popups';
2
+
3
+ /**
4
+ * Interface for a class PopupSettings
5
+ */
6
+ export interface PopupSettingsModel {
7
+
8
+ /**
9
+ * Specifies title for the editor popup.
10
+ *
11
+ * @default ''
12
+ */
13
+ title?: string;
14
+
15
+ /**
16
+ * Specifies model for editor popup customization like position, animation,etc.
17
+ *
18
+ * @default null
19
+ */
20
+ model?: TooltipModel;
21
+
22
+ }
@@ -0,0 +1,31 @@
1
+ import { ChildProperty } from '@syncfusion/ej2-base';
2
+ import { TooltipModel } from '@syncfusion/ej2-popups';
3
+ /**
4
+ * Configures the popup settings of the In-place editor.
5
+ */
6
+ export declare class PopupSettings extends ChildProperty<PopupSettings> {
7
+ /**
8
+ * Specifies title for the editor popup.
9
+ *
10
+ * @default ''
11
+ */
12
+ title: string;
13
+ /**
14
+ * Specifies model for editor popup customization like position, animation,etc.
15
+ *
16
+ * @default null
17
+ */
18
+ model: TooltipModel;
19
+ }
20
+ /**
21
+ * @hidden
22
+ */
23
+ export declare const modulesList: {
24
+ [key: string]: string;
25
+ };
26
+ /**
27
+ * @hidden
28
+ */
29
+ export declare let localeConstant: {
30
+ [key: string]: object;
31
+ };
@@ -0,0 +1,45 @@
1
+ import { ChildProperty, Property } from '@syncfusion/ej2-base';
2
+ import { TooltipModel } from '@syncfusion/ej2-popups';
3
+
4
+ /**
5
+ * Configures the popup settings of the In-place editor.
6
+ */
7
+ export class PopupSettings extends ChildProperty<PopupSettings> {
8
+ /**
9
+ * Specifies title for the editor popup.
10
+ *
11
+ * @default ''
12
+ */
13
+ @Property('')
14
+ public title: string;
15
+ /**
16
+ * Specifies model for editor popup customization like position, animation,etc.
17
+ *
18
+ * @default null
19
+ */
20
+ @Property(null)
21
+ public model: TooltipModel;
22
+ }
23
+ /**
24
+ * @hidden
25
+ */
26
+ export const modulesList: { [key: string]: string } = {
27
+ 'AutoComplete': 'auto-complete',
28
+ 'Color': 'color-picker',
29
+ 'ComboBox': 'combo-box',
30
+ 'DateRange': 'date-range-picker',
31
+ 'MultiSelect': 'multi-select',
32
+ 'RTE': 'rte',
33
+ 'Slider': 'slider',
34
+ 'Time': 'time-picker'
35
+ /* eslint-enable */
36
+ };
37
+
38
+ /**
39
+ * @hidden
40
+ */
41
+ export let localeConstant: { [key: string]: object } = {
42
+ 'Click': { 'editAreaClick': 'Click to edit' },
43
+ 'DblClick': { 'editAreaDoubleClick': 'Double click to edit' },
44
+ 'EditIconClick': { 'editAreaClick': 'Click to edit' }
45
+ };
@@ -0,0 +1,28 @@
1
+ import { RichTextEditorModel } from '@syncfusion/ej2-richtexteditor';
2
+ import { DatePickerModel } from '@syncfusion/ej2-calendars';
3
+ import { DateTimePickerModel, DateRangePickerModel, TimePickerModel } from '@syncfusion/ej2-calendars';
4
+ import { NumericTextBoxModel, TextBoxModel } from '@syncfusion/ej2-inputs';
5
+ import { ColorPickerModel, MaskedTextBoxModel, SliderModel } from '@syncfusion/ej2-inputs';
6
+ import { AutoCompleteModel, ComboBoxModel, DropDownListModel, MultiSelectModel } from '@syncfusion/ej2-dropdowns';
7
+ declare type valueType = string | number | Date | string[] | Date[] | number[];
8
+ declare type modelType = AutoCompleteModel | ColorPickerModel | ComboBoxModel | DatePickerModel | DateRangePickerModel | DateTimePickerModel | DropDownListModel | MaskedTextBoxModel | MultiSelectModel | NumericTextBoxModel | RichTextEditorModel | SliderModel | TextBoxModel | TimePickerModel;
9
+ /**
10
+ * @param {string} type - specifies the string type
11
+ * @param {valueType} val - specifies the value type
12
+ * @param {modelType} model - specifies the model type
13
+ * @returns {string} - returns the string
14
+ */
15
+ export declare function parseValue(type: string, val: valueType, model: modelType): string;
16
+ /**
17
+ * @param {string} type - specifies the string value
18
+ * @param {valueType} val - specifies the value type
19
+ * @returns {valueType} - returns the value type
20
+ */
21
+ export declare function getCompValue(type: string, val: valueType): valueType;
22
+ /**
23
+ * @param {string} value - specifies the string value
24
+ * @returns {string} - returns the string
25
+ * @hidden
26
+ */
27
+ export declare function encode(value: string): string;
28
+ export {};
@@ -0,0 +1,104 @@
1
+ import { isNullOrUndefined as isNOU, Internationalization, isBlazor } from '@syncfusion/ej2-base';
2
+ import { RichTextEditorModel } from '@syncfusion/ej2-richtexteditor';
3
+ import { DatePickerModel } from '@syncfusion/ej2-calendars';
4
+ import { DateTimePickerModel, DateRangePickerModel, TimePickerModel } from '@syncfusion/ej2-calendars';
5
+ import { NumericTextBoxModel, TextBoxModel } from '@syncfusion/ej2-inputs';
6
+ import { ColorPickerModel, MaskedTextBoxModel, SliderModel } from '@syncfusion/ej2-inputs';
7
+ import { AutoCompleteModel, ComboBoxModel, DropDownListModel, MultiSelectModel } from '@syncfusion/ej2-dropdowns';
8
+ /**
9
+ * Exports util methods used by In-place editor.
10
+ */
11
+
12
+ const intl: Internationalization = new Internationalization();
13
+ type valueType = string | number | Date | string[] | Date[] | number[];
14
+ type modelType = AutoCompleteModel | ColorPickerModel | ComboBoxModel | DatePickerModel | DateRangePickerModel | DateTimePickerModel |
15
+ /* eslint-enable */
16
+ DropDownListModel | MaskedTextBoxModel | MultiSelectModel | NumericTextBoxModel | RichTextEditorModel | SliderModel | TextBoxModel |
17
+ TimePickerModel;
18
+ /**
19
+ * @param {string} type - specifies the string type
20
+ * @param {valueType} val - specifies the value type
21
+ * @param {modelType} model - specifies the model type
22
+ * @returns {string} - returns the string
23
+ */
24
+ export function parseValue(type: string, val: valueType, model: modelType): string {
25
+ if (isNOU(val) || val === '') {
26
+ return '';
27
+ }
28
+ let result: string;
29
+ let tempFormat: string;
30
+ switch (type) {
31
+ case 'Color': {
32
+ const hex: string = <string>val;
33
+ result = (hex.length > 7) ? hex.slice(0, -2) : hex;
34
+ break; }
35
+ case 'Date':
36
+ tempFormat = (model as DatePickerModel).format as string;
37
+ result = intl.formatDate(<Date>val, { format: tempFormat, type: type, skeleton: isBlazor() ? 'd' : 'yMd' });
38
+ break;
39
+ case 'DateRange': {
40
+ tempFormat = (model as DateRangePickerModel).format as string;
41
+ const date: Date[] = <Date[]>val;
42
+ result = intl.formatDate(date[0], { format: tempFormat, type: type, skeleton: isBlazor() ? 'd' : 'yMd' }) + ' - '
43
+ + intl.formatDate(date[1], { format: tempFormat, type: type, skeleton: isBlazor() ? 'd' : 'yMd' });
44
+ break; }
45
+ case 'DateTime':
46
+ tempFormat = (model as DateTimePickerModel).format as string;
47
+ if (isNOU(tempFormat) || tempFormat === '') {
48
+ result = intl.formatDate(<Date>val, { format: tempFormat, type: type, skeleton: isBlazor() ? 'd' : 'yMd' }) + ' '
49
+ + intl.formatDate(<Date>val, { format: tempFormat, type: type, skeleton: isBlazor() ? 't' : 'hm' });
50
+ } else {
51
+ result = intl.formatDate(<Date>val, { format: tempFormat, type: type, skeleton: isBlazor() ? 'd' : 'yMd' });
52
+ }
53
+ break;
54
+ case 'Time':
55
+ tempFormat = (model as TimePickerModel).format as string;
56
+ result = intl.formatDate(<Date>val, { format: tempFormat, type: type, skeleton: isBlazor() ? 't' : 'hm' });
57
+ break;
58
+ case 'Numeric': {
59
+ tempFormat = isNOU((model as NumericTextBoxModel).format) ? 'n2' :
60
+ (model as NumericTextBoxModel).format as string;
61
+ const tempVal: number = isNOU(<string>val) ? null : (typeof (val) === 'number' ? val : intl.parseNumber(<string>val));
62
+ result = intl.formatNumber(tempVal, { format: tempFormat });
63
+ break; }
64
+ default:
65
+ result = val.toString();
66
+ break;
67
+ }
68
+ return result;
69
+ }
70
+
71
+ /**
72
+ * @param {string} type - specifies the string value
73
+ * @param {valueType} val - specifies the value type
74
+ * @returns {valueType} - returns the value type
75
+ */
76
+ export function getCompValue(type: string, val: valueType): valueType {
77
+ if (isNOU(val) || val === '') {
78
+ return val;
79
+ }
80
+ if ((type === 'Date' || type === 'Time' || type === 'DateTime') && typeof (val) === 'string') {
81
+ val = new Date(val);
82
+ } else if (type === 'DateRange') {
83
+ if (typeof (val) === 'object' && typeof ((<string[]>val)[0]) === 'string') {
84
+ val = [new Date((val as string[])[0]), new Date((val as string[])[1])];
85
+ } else if (typeof (val) === 'string') {
86
+ const temp: string[] = (<string>val).split('-');
87
+ val = [new Date(temp[0]), new Date(temp[1])];
88
+ }
89
+ }
90
+ return val;
91
+ }
92
+
93
+ /**
94
+ * @param {string} value - specifies the string value
95
+ * @returns {string} - returns the string
96
+ * @hidden
97
+ */
98
+ export function encode(value: string): string {
99
+ const data : string[] = [];
100
+ for (let i : number = value.length - 1; i >= 0; i--) {
101
+ data.unshift(['&#', value[i as number].charCodeAt(0), ';'].join(''));
102
+ }
103
+ return data.join('');
104
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ *
3
+ */
4
+ export * from './base/index';
5
+ export * from './modules/index';
@@ -0,0 +1,5 @@
1
+ /**
2
+ *
3
+ */
4
+ export * from './base/index';
5
+ export * from './modules/index';
@@ -0,0 +1,34 @@
1
+ import { AutoComplete as EJ2AutoComplete } from '@syncfusion/ej2-dropdowns';
2
+ import { InPlaceEditor } from '../base/inplace-editor';
3
+ import { NotifyParams, IComponent } from '../base/interface';
4
+ /**
5
+ * The `AutoComplete` module is used configure the properties of Auto complete type editor.
6
+ */
7
+ export declare class AutoComplete implements IComponent {
8
+ private base;
9
+ protected parent: InPlaceEditor;
10
+ compObj: EJ2AutoComplete;
11
+ constructor(parent?: InPlaceEditor);
12
+ render(e: NotifyParams): void;
13
+ /**
14
+ * @hidden
15
+ * @returns {void}
16
+ */
17
+ showPopup(): void;
18
+ focus(): void;
19
+ updateValue(e: NotifyParams): void;
20
+ /**
21
+ * Destroys the module.
22
+ *
23
+ * @function destroy
24
+ * @returns {void}
25
+ * @hidden
26
+ */
27
+ destroy(): void;
28
+ /**
29
+ * For internal use only - Get the module name.
30
+ *
31
+ * @returns {string} - returns the string
32
+ */
33
+ private getModuleName;
34
+ }
@@ -0,0 +1,65 @@
1
+
2
+ import { AutoComplete as EJ2AutoComplete, AutoCompleteModel } from '@syncfusion/ej2-dropdowns';
3
+ import { Base } from './base-module';
4
+ import { InPlaceEditor } from '../base/inplace-editor';
5
+ import { NotifyParams, IComponent } from '../base/interface';
6
+
7
+ /**
8
+ * The `AutoComplete` module is used configure the properties of Auto complete type editor.
9
+ */
10
+ export class AutoComplete implements IComponent {
11
+ private base: Base;
12
+ protected parent: InPlaceEditor;
13
+ public compObj: EJ2AutoComplete = undefined;
14
+
15
+ public constructor(parent?: InPlaceEditor) {
16
+ this.parent = parent;
17
+ this.parent.atcModule = this;
18
+ this.base = new Base(this.parent, this);
19
+ }
20
+
21
+ public render(e: NotifyParams): void {
22
+ this.compObj = new EJ2AutoComplete(this.parent.model as AutoCompleteModel);
23
+ this.compObj.appendTo(e.target);
24
+ }
25
+
26
+ /**
27
+ * @hidden
28
+ * @returns {void}
29
+ */
30
+ public showPopup(): void {
31
+ this.compObj.focusIn();
32
+ this.compObj.showPopup();
33
+ }
34
+
35
+ public focus(): void {
36
+ this.compObj.element.focus();
37
+ }
38
+
39
+ public updateValue(e: NotifyParams): void {
40
+ if (this.compObj && e.type === 'AutoComplete') {
41
+ this.parent.setProperties({ value: this.compObj.value }, true);
42
+ this.parent.extendModelValue(this.compObj.value);
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Destroys the module.
48
+ *
49
+ * @function destroy
50
+ * @returns {void}
51
+ * @hidden
52
+ */
53
+ public destroy(): void {
54
+ this.base.destroy();
55
+ }
56
+
57
+ /**
58
+ * For internal use only - Get the module name.
59
+ *
60
+ * @returns {string} - returns the string
61
+ */
62
+ private getModuleName(): string {
63
+ return 'auto-complete';
64
+ }
65
+ }
@@ -0,0 +1,19 @@
1
+ import { InPlaceEditor } from '../base/inplace-editor';
2
+ import { IComponent } from '../base/interface';
3
+ /**
4
+ * The `Base` module.
5
+ */
6
+ export declare class Base {
7
+ protected parent: InPlaceEditor;
8
+ protected module: IComponent;
9
+ constructor(parent: InPlaceEditor, module: IComponent);
10
+ private render;
11
+ private showPopup;
12
+ private focus;
13
+ private update;
14
+ private getValue;
15
+ private destroyComponent;
16
+ destroy(): void;
17
+ protected addEventListener(): void;
18
+ protected removeEventListener(): void;
19
+ }
@@ -0,0 +1,74 @@
1
+ import { InPlaceEditor } from '../base/inplace-editor';
2
+ import { isNullOrUndefined as isNOU } from '@syncfusion/ej2-base';
3
+ import * as events from '../base/events';
4
+ import { NotifyParams, IComponent } from '../base/interface';
5
+
6
+ /**
7
+ * The `Base` module.
8
+ */
9
+ export class Base {
10
+ protected parent: InPlaceEditor;
11
+ protected module: IComponent;
12
+
13
+ public constructor(parent: InPlaceEditor, module: IComponent) {
14
+ this.parent = parent;
15
+ this.module = module;
16
+ this.addEventListener();
17
+ }
18
+
19
+ private render(e: NotifyParams): void {
20
+ this.module.render(e);
21
+ }
22
+
23
+ private showPopup(): void {
24
+ this.module.showPopup();
25
+ }
26
+
27
+ private focus(): void {
28
+ this.module.focus();
29
+ }
30
+
31
+ private update(e: NotifyParams): void {
32
+ this.module.updateValue(e);
33
+ }
34
+
35
+ private getValue(): void {
36
+ this.module.getRenderValue();
37
+ }
38
+
39
+ private destroyComponent(): void {
40
+ if (isNOU(this.module.compObj)) {
41
+ return;
42
+ }
43
+ this.module.compObj.destroy();
44
+ this.module.compObj = undefined;
45
+ }
46
+
47
+ public destroy(): void {
48
+ this.destroyComponent();
49
+ this.removeEventListener();
50
+ }
51
+
52
+ protected addEventListener(): void {
53
+ this.parent.on(events.render, this.render, this);
54
+ this.parent.on(events.setFocus, this.focus, this);
55
+ this.parent.on(events.showPopup, this.showPopup, this);
56
+ this.parent.on(events.update, this.update, this);
57
+ this.parent.on(events.accessValue, this.getValue, this);
58
+ this.parent.on(events.destroyModules, this.destroyComponent, this);
59
+ this.parent.on(events.destroy, this.destroy, this);
60
+ }
61
+
62
+ protected removeEventListener(): void {
63
+ if (this.parent.isDestroyed) {
64
+ return;
65
+ }
66
+ this.parent.off(events.render, this.render);
67
+ this.parent.off(events.setFocus, this.focus);
68
+ this.parent.off(events.showPopup, this.showPopup);
69
+ this.parent.off(events.update, this.update);
70
+ this.parent.off(events.accessValue, this.getValue);
71
+ this.parent.off(events.destroyModules, this.destroyComponent);
72
+ this.parent.off(events.destroy, this.destroy);
73
+ }
74
+ }