bromcom-ui 2.3.61 → 2.3.65
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/dist/bromcom-ui/bcm-date-picker.entry.js +2 -1
- package/dist/bromcom-ui/bcm-datetime-picker.entry.js +20 -28
- package/dist/bromcom-ui/bcm-form-group.entry.js +1 -1
- package/dist/bromcom-ui/bcm-form.entry.js +3 -1
- package/dist/bromcom-ui/bcm-input.entry.js +1 -0
- package/dist/bromcom-ui/bcm-listbox.entry.js +1 -0
- package/dist/bromcom-ui/bcm-select.entry.js +4 -2
- package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +3 -3
- package/dist/types/components/organism/form/form.d.ts +1 -1
- package/dist/types/components.d.ts +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/bcm-ad02f9c9.js +0 -453
- package/dist/bromcom-ui/bcm-list-2-item.entry.js +0 -36
- package/dist/bromcom-ui/bcm-list-2.entry.js +0 -834
- package/dist/bromcom-ui/bcm-range.entry.js +0 -160
- package/dist/bromcom-ui/bcm-search-2.entry.js +0 -190
- package/dist/bromcom-ui/caption-template-2d4ffc88.js +0 -25
- package/dist/bromcom-ui/color-helper-19448077.js +0 -35
- package/dist/bromcom-ui/element-dragger-2a215f47.js +0 -273
- package/dist/bromcom-ui/generate-0a22e8df.js +0 -88
- package/dist/bromcom-ui/generate-2170e960.js +0 -81
- package/dist/bromcom-ui/generate-516a5391.js +0 -90
- package/dist/bromcom-ui/index-dbc63c66.js +0 -2818
- package/dist/bromcom-ui/index-dd5c1283.js +0 -187
- package/dist/bromcom-ui/input-template-e0e652a9.js +0 -82
- package/dist/bromcom-ui/json-parse-decarator-223ea680.js +0 -21
- package/dist/bromcom-ui/label-template-b0b70fde.js +0 -19
- package/dist/bromcom-ui/number-helper-fea1966f.js +0 -13
- package/dist/bromcom-ui/popover-placement-31e0e70f.js +0 -96
- package/dist/bromcom-ui/property-decorators-21b15487.js +0 -36
- package/dist/bromcom-ui/slot-template-5b8e1902.js +0 -9
- package/dist/bromcom-ui/snq.es5-946822b8.js +0 -14
- package/dist/bromcom-ui/string-helper-414d635d.js +0 -25
- package/dist/bromcom-ui/types-6b2a6629.js +0 -172
- package/dist/bromcom-ui/utils-333ded7f.js +0 -438
- package/dist/types/components/atoms/states/badge.states.d.ts +0 -7
- package/dist/types/components/atoms/states/button.states.d.ts +0 -7
- package/dist/types/components/molecules/breadcrumb/types.d.ts +0 -10
- package/dist/types/components/molecules/input/types.d.ts +0 -13
- package/dist/types/components/molecules/progress/types.d.ts +0 -24
- package/dist/types/components/molecules/range/range.d.ts +0 -36
- package/dist/types/components/molecules/search-2/search-2.d.ts +0 -25
- package/dist/types/components/molecules/states/alert.states.d.ts +0 -7
- package/dist/types/components/molecules/states/checkbox-group.states.d.ts +0 -53
- package/dist/types/components/molecules/states/message.states.d.ts +0 -7
- package/dist/types/components/molecules/states/notification.states.d.ts +0 -7
- package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -47
- package/dist/types/components/molecules/states/result.states.d.ts +0 -7
- package/dist/types/components/molecules/states/search.states.d.ts +0 -9
- package/dist/types/components/molecules/textarea/types.d.ts +0 -9
- package/dist/types/components/organism/list-2/list-2-item.d.ts +0 -11
- package/dist/types/components/organism/list-2/list-2.d.ts +0 -102
- package/dist/types/components/organism/states/bcm-list2.states.d.ts +0 -17
- package/dist/types/decorators/json-parse-decarator.d.ts +0 -4
- package/dist/types/decorators/property-decorators.d.ts +0 -6
- package/dist/types/helper/number-helper.d.ts +0 -9
- package/dist/types/models/states/Atoms/bcm-Atoms-state.d.ts +0 -34
- package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +0 -78
- package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +0 -69
- package/dist/types/templates/button-template.d.ts +0 -16
- package/dist/types/templates/checkbox-group-template.d.ts +0 -10
- package/dist/types/templates/checkbox-template.d.ts +0 -13
- package/dist/types/templates/info-footer-template.d.ts +0 -10
- package/dist/types/templates/input-template.d.ts +0 -30
- package/dist/types/templates/list-item-template.d.ts +0 -10
- package/dist/types/templates/list-template.d.ts +0 -21
- package/dist/types/templates/tag-template.d.ts +0 -17
|
@@ -349,6 +349,8 @@ const BcmDatetimePicker = class {
|
|
|
349
349
|
if (disabledDatesData.max && disabledDatesData.max instanceof Date) {
|
|
350
350
|
this.disabledDatesList.max = new Date(disabledDatesData.max.toDateString());
|
|
351
351
|
}
|
|
352
|
+
const value = this.inputElement.value;
|
|
353
|
+
value && this.setDataFromText(value);
|
|
352
354
|
}
|
|
353
355
|
/**
|
|
354
356
|
*
|
|
@@ -681,7 +683,9 @@ const BcmDatetimePicker = class {
|
|
|
681
683
|
this.renderDate = this.date;
|
|
682
684
|
this.valueText = this.getValueText();
|
|
683
685
|
this.setValue();
|
|
684
|
-
|
|
686
|
+
const splitText = this.valueText.split('/');
|
|
687
|
+
const newValue = this.valueText ? this.changeFormat(new Date(splitText[1] + "/" + splitText[0] + "/" + splitText[2])) : '';
|
|
688
|
+
this.inputElement.value = newValue;
|
|
685
689
|
}
|
|
686
690
|
}
|
|
687
691
|
setDataFromText(text, updateData = false, openPicker = true) {
|
|
@@ -762,7 +766,9 @@ const BcmDatetimePicker = class {
|
|
|
762
766
|
this.setValue(true);
|
|
763
767
|
}
|
|
764
768
|
}
|
|
765
|
-
|
|
769
|
+
const splitText = text.split('/');
|
|
770
|
+
const newValue = text ? this.changeFormat(new Date(splitText[1] + "/" + splitText[0] + "/" + splitText[2])) : '';
|
|
771
|
+
this.inputElement.value = newValue;
|
|
766
772
|
}
|
|
767
773
|
}
|
|
768
774
|
/**
|
|
@@ -1141,32 +1147,25 @@ const BcmDatetimePicker = class {
|
|
|
1141
1147
|
async setDisabled(disabled) {
|
|
1142
1148
|
this.disabled = disabled;
|
|
1143
1149
|
}
|
|
1144
|
-
changeFormat(date) {
|
|
1150
|
+
changeFormat(date, reverseDay = false) {
|
|
1145
1151
|
if (!date)
|
|
1146
1152
|
return;
|
|
1147
1153
|
const pad = (n) => n < 10 ? `0${n}` : n;
|
|
1148
|
-
const day = new Date(date).getDate();
|
|
1149
|
-
const month = new Date(date).getMonth() + 1;
|
|
1154
|
+
const day = pad(new Date(date).getDate());
|
|
1155
|
+
const month = pad(new Date(date).getMonth() + 1);
|
|
1150
1156
|
const year = new Date(date).getFullYear();
|
|
1151
|
-
const hours = new Date(date).getHours();
|
|
1152
|
-
const minutes = new Date(date).getMinutes();
|
|
1157
|
+
const hours = pad(new Date(date).getHours());
|
|
1158
|
+
const minutes = pad(new Date(date).getMinutes());
|
|
1153
1159
|
if (this.type == "range" || this.type == "date") {
|
|
1154
|
-
return `${day}/${month}/${year}`;
|
|
1160
|
+
return reverseDay ? `${month}/${day}/${year}` : `${day}/${month}/${year}`;
|
|
1155
1161
|
}
|
|
1156
|
-
return `${day}/${month}/${year} ${
|
|
1162
|
+
return reverseDay ? `${month}/${day}/${year} ${hours}:${minutes}` : `${day}/${month}/${year} ${hours}:${minutes}`;
|
|
1157
1163
|
}
|
|
1158
1164
|
/**
|
|
1159
1165
|
* @desc
|
|
1160
1166
|
* @param dateOrTime
|
|
1161
1167
|
*/
|
|
1162
1168
|
async set(dateOrTime) {
|
|
1163
|
-
// contains -
|
|
1164
|
-
// const split = dateOrTime.toString().split('-')
|
|
1165
|
-
// var date: any = DateTimeHelper.convertTimeStampToDate(new Date(split[0]).getTime()).toString()
|
|
1166
|
-
// if (split.length > 1) {
|
|
1167
|
-
// var date2 = DateTimeHelper.convertTimeStampToDate(new Date(split[1]).getTime())
|
|
1168
|
-
// date = date + "-" + date2
|
|
1169
|
-
// }
|
|
1170
1169
|
const split = dateOrTime.toString().split('-');
|
|
1171
1170
|
var date = this.changeFormat(DateTimeHelper.convertTimeStampToDate(new Date(split[0]).getTime()));
|
|
1172
1171
|
if (split.length > 1) {
|
|
@@ -1174,20 +1173,11 @@ const BcmDatetimePicker = class {
|
|
|
1174
1173
|
date = date + "-" + date2;
|
|
1175
1174
|
}
|
|
1176
1175
|
this.setDataFromText(date, true, false);
|
|
1177
|
-
// dateOrTime = DateTimeHelper.convertTimeStampToDate(new Date(dateOrTime).getTime())
|
|
1178
|
-
// const isString: boolean = typeof dateOrTime === 'string'
|
|
1179
|
-
// if ( isString ) {
|
|
1180
|
-
// // this.setDataFromText(dateOrTime as string, true, false)
|
|
1181
|
-
// } else if( dateOrTime instanceof Date){
|
|
1182
|
-
// this.setDataFromText(this.formatDate(new Date(dateOrTime), 'dd/mm/yyyy hh:mi') as string, true, false)
|
|
1183
|
-
// }
|
|
1184
|
-
// else{
|
|
1185
|
-
// this.setClear()
|
|
1186
|
-
// }
|
|
1187
1176
|
}
|
|
1188
1177
|
async setClear() {
|
|
1189
|
-
this.handleInputClear();
|
|
1178
|
+
await this.handleInputClear();
|
|
1190
1179
|
await this.inputElement.setClear();
|
|
1180
|
+
return Promise.resolve();
|
|
1191
1181
|
}
|
|
1192
1182
|
/**
|
|
1193
1183
|
* @desc
|
|
@@ -1230,7 +1220,9 @@ const BcmDatetimePicker = class {
|
|
|
1230
1220
|
const toggleClasses = classnames('toggle', {
|
|
1231
1221
|
disabled: this.disabled
|
|
1232
1222
|
});
|
|
1233
|
-
return (h(Host, { class: hostClasses, "bcm-internal-id": this.inputId }, h("bcm-input", { ref: el => (this.inputElement = el), placeholder: 'Select ' + (this.type === Types.datetime ? 'date and time' : '') + (this.type === Types.date ? 'date' : '') + (this.type === Types.time ? 'time' : ''), value: this.valueText, required: this.required, fullWidth: this.fullWidth, disabled: this.disabled, name: this.name, id: this.inputId, label: this.label, clearable: true, disableWatchValue: true, "on-bcm-focus": () => this.handleInputFocus(), "on-bcm-clear": () => this.handleInputClear(), "on-bcm-change": (e) => this.handleInputChange(e),
|
|
1223
|
+
return (h(Host, { class: hostClasses, "bcm-internal-id": this.inputId }, h("bcm-input", { ref: el => (this.inputElement = el), placeholder: 'Select ' + (this.type === Types.datetime ? 'date and time' : '') + (this.type === Types.date ? 'date' : '') + (this.type === Types.time ? 'time' : ''), value: this.valueText, required: this.required, fullWidth: this.fullWidth, disabled: this.disabled, name: this.name, id: this.inputId, label: this.label, clearable: true, disableWatchValue: true, "on-bcm-focus": () => this.handleInputFocus(), "on-bcm-clear": () => this.handleInputClear(), "on-bcm-change": (e) => this.handleInputChange(e),
|
|
1224
|
+
// on-bcm-input={(e: CustomEvent) => this.handleInputInput(e.detail)}
|
|
1225
|
+
noCaption: this.noCaption, caption: this.caption, captionType: this.captionType }, this.error && (h("bcm-tooltip", { slot: "suffix", placement: "top", message: this.errorText }, h("bcm-icon", {
|
|
1234
1226
|
// slot="suffix"
|
|
1235
1227
|
// title={this.errorText}
|
|
1236
1228
|
icon: "exclamation-circle", color: "red-6", size: 16
|
|
@@ -11,7 +11,7 @@ const BcmFormGroup = class {
|
|
|
11
11
|
this.name = "";
|
|
12
12
|
}
|
|
13
13
|
inputChange() {
|
|
14
|
-
console.log("diğişti")
|
|
14
|
+
// console.log("diğişti")
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
17
|
return (h(Host, { "on-bcm-change": () => this.inputChange() }, h("form", { class: "bcm-form" }, h("slot", null))));
|
|
@@ -124,15 +124,17 @@ const BcmForm = class {
|
|
|
124
124
|
this.formData = {};
|
|
125
125
|
this.inputs = [];
|
|
126
126
|
this.selector = this.el;
|
|
127
|
+
let clear = [];
|
|
127
128
|
this.getInputs();
|
|
128
129
|
for (const item of this.inputs) {
|
|
129
130
|
try {
|
|
130
|
-
|
|
131
|
+
clear.push(item.setClear());
|
|
131
132
|
}
|
|
132
133
|
catch (error) {
|
|
133
134
|
console.log(item.nodeName, "sc p");
|
|
134
135
|
}
|
|
135
136
|
}
|
|
137
|
+
return Promise.all(clear);
|
|
136
138
|
}
|
|
137
139
|
async resetCaption() {
|
|
138
140
|
this.formData = {};
|
|
@@ -419,7 +419,8 @@ const BcmSelect = class {
|
|
|
419
419
|
return this.checklist;
|
|
420
420
|
}
|
|
421
421
|
async setClear() {
|
|
422
|
-
this.handleClear();
|
|
422
|
+
await this.handleClear();
|
|
423
|
+
return Promise.resolve();
|
|
423
424
|
}
|
|
424
425
|
async resetCaption() {
|
|
425
426
|
this.caption = this.captionCache;
|
|
@@ -586,7 +587,6 @@ const BcmSelect = class {
|
|
|
586
587
|
async handleClear() {
|
|
587
588
|
this.value = null;
|
|
588
589
|
this.selectText = null;
|
|
589
|
-
this.clear.emit();
|
|
590
590
|
// const allitem:any = [...this.onShowVisibleTags, ...this.onShowHiddenTags]
|
|
591
591
|
// if ( allitem.length > 0 ) {
|
|
592
592
|
// allitem.map(item => {
|
|
@@ -624,6 +624,8 @@ const BcmSelect = class {
|
|
|
624
624
|
if (searchInput) {
|
|
625
625
|
searchInput.clearAndSelectSearch();
|
|
626
626
|
}
|
|
627
|
+
this.clear.emit();
|
|
628
|
+
return Promise.resolve();
|
|
627
629
|
}
|
|
628
630
|
handleFocus() {
|
|
629
631
|
this.focus.emit();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
1
|
+
import { EventEmitter, ComponentInterface } from '../../../stencil-public-runtime';
|
|
2
2
|
import { ElementDragger, DragDirections } from '../../../utils/element-dragger';
|
|
3
3
|
import { Months, Type } from './types';
|
|
4
|
-
export declare class BcmDatetimePicker {
|
|
4
|
+
export declare class BcmDatetimePicker implements ComponentInterface {
|
|
5
5
|
private id;
|
|
6
6
|
private inputId;
|
|
7
7
|
private emptyState;
|
|
@@ -398,7 +398,7 @@ export declare class BcmDatetimePicker {
|
|
|
398
398
|
* @param disabled
|
|
399
399
|
*/
|
|
400
400
|
setDisabled(disabled: boolean): Promise<void>;
|
|
401
|
-
changeFormat(date: Date): string;
|
|
401
|
+
changeFormat(date: Date, reverseDay?: boolean): string;
|
|
402
402
|
/**
|
|
403
403
|
* @desc
|
|
404
404
|
* @param dateOrTime
|
|
@@ -17,7 +17,7 @@ export declare class BcmForm {
|
|
|
17
17
|
handleSubmit(e: any): void;
|
|
18
18
|
submitFunction(): Promise<any>;
|
|
19
19
|
submit(): Promise<any>;
|
|
20
|
-
setClear(): Promise<
|
|
20
|
+
setClear(): Promise<any[]>;
|
|
21
21
|
resetCaption(): Promise<void>;
|
|
22
22
|
config(_config: Array<object>): Promise<boolean>;
|
|
23
23
|
getInputs(): void;
|
|
@@ -435,7 +435,7 @@ export namespace Components {
|
|
|
435
435
|
"hidden": boolean;
|
|
436
436
|
"name": string;
|
|
437
437
|
"resetCaption": () => Promise<void>;
|
|
438
|
-
"setClear": () => Promise<
|
|
438
|
+
"setClear": () => Promise<any[]>;
|
|
439
439
|
"submit": () => Promise<any>;
|
|
440
440
|
"validation": boolean;
|
|
441
441
|
"value": any;
|