@94ai/nf-double-week 8.3.22 → 9.0.0

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.
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const commonUtils = require("@94ai/common-utils");
3
4
  const Vue = require("vue");
4
5
  const dateUtil = require("element-ui/src/utils/date-util");
5
6
  const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
@@ -389,14 +390,14 @@ var popper$1 = { exports: {} };
389
390
  this._popper = popper2.jquery ? popper2[0] : popper2;
390
391
  }
391
392
  this._options = Object.assign({}, DEFAULTS, options);
392
- this._options.modifiers = this._options.modifiers.map((function(modifier) {
393
+ this._options.modifiers = this._options.modifiers.map(function(modifier) {
393
394
  if (this._options.modifiersIgnored.indexOf(modifier) !== -1)
394
395
  return;
395
396
  if (modifier === "applyStyle") {
396
397
  this._popper.setAttribute("x-placement", this._options.placement);
397
398
  }
398
399
  return this.modifiers[modifier] || modifier;
399
- }).bind(this));
400
+ }.bind(this));
400
401
  this.state.position = this._getPosition(this._popper, this._reference);
401
402
  setStyle(this._popper, {
402
403
  position: this.state.position,
@@ -609,11 +610,11 @@ var popper$1 = { exports: {} };
609
610
  if (ends !== void 0) {
610
611
  modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
611
612
  }
612
- modifiersToRun.forEach((function(modifier) {
613
+ modifiersToRun.forEach(function(modifier) {
613
614
  if (isFunction(modifier)) {
614
615
  data = modifier.call(this, data);
615
616
  }
616
- }).bind(this));
617
+ }.bind(this));
617
618
  return data;
618
619
  };
619
620
  Popper2.prototype.isModifierRequired = function(requesting, requested) {
@@ -757,7 +758,7 @@ var popper$1 = { exports: {} };
757
758
  } else {
758
759
  flipOrder = this._options.flipBehavior;
759
760
  }
760
- flipOrder.forEach((function(step, index) {
761
+ flipOrder.forEach(function(step, index) {
761
762
  if (placement !== step || flipOrder.length === index + 1) {
762
763
  return;
763
764
  }
@@ -774,7 +775,7 @@ var popper$1 = { exports: {} };
774
775
  data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
775
776
  data = this.runModifiers(data, this._options.modifiers, this._flip);
776
777
  }
777
- }).bind(this));
778
+ }.bind(this));
778
779
  return data;
779
780
  };
780
781
  Popper2.prototype.modifiers.offset = function(data) {
@@ -1367,7 +1368,7 @@ const _sfc_main$4 = {
1367
1368
  directives: {
1368
1369
  Clickoutside
1369
1370
  },
1370
- mixins: [Emitter, NewPopper],
1371
+ mixins: [commonUtils.LocaleMixin, Emitter, NewPopper],
1371
1372
  inject: {
1372
1373
  elForm: {
1373
1374
  default: ""
@@ -1386,11 +1387,11 @@ const _sfc_main$4 = {
1386
1387
  readonly: Boolean,
1387
1388
  startPlaceholder: {
1388
1389
  type: String,
1389
- default: "开始周"
1390
+ default: void 0
1390
1391
  },
1391
1392
  endPlaceholder: {
1392
1393
  type: String,
1393
- default: "结束周"
1394
+ default: void 0
1394
1395
  },
1395
1396
  prefixIcon: String,
1396
1397
  clearIcon: {
@@ -1444,6 +1445,13 @@ const _sfc_main$4 = {
1444
1445
  };
1445
1446
  },
1446
1447
  computed: {
1448
+ localeText() {
1449
+ var _a, _b;
1450
+ return {
1451
+ startPlaceholder: (_a = this.startPlaceholder) != null ? _a : this.t("nf.date.startWeek"),
1452
+ endPlaceholder: (_b = this.endPlaceholder) != null ? _b : this.t("nf.date.endWeek")
1453
+ };
1454
+ },
1447
1455
  reference() {
1448
1456
  const reference = this.$refs.reference;
1449
1457
  return reference.$el || reference;
@@ -1859,7 +1867,7 @@ var _sfc_render$4 = function render() {
1859
1867
  attrs: {
1860
1868
  "readonly": !_vm.editable || _vm.readonly,
1861
1869
  "autocomplete": "off",
1862
- "placeholder": _vm.startPlaceholder,
1870
+ "placeholder": _vm.localeText.startPlaceholder,
1863
1871
  "disabled": _vm.pickerDisabled,
1864
1872
  "name": _vm.name && _vm.name[0],
1865
1873
  "size": _vm.pickerSize
@@ -1875,7 +1883,7 @@ var _sfc_render$4 = function render() {
1875
1883
  staticClass: "el-range-input",
1876
1884
  attrs: {
1877
1885
  "autocomplete": "off",
1878
- "placeholder": _vm.endPlaceholder,
1886
+ "placeholder": _vm.localeText.endPlaceholder,
1879
1887
  "disabled": _vm.pickerDisabled,
1880
1888
  "size": _vm.pickerSize,
1881
1889
  "name": _vm.name && _vm.name[1],
@@ -1,3 +1,4 @@
1
+ import { LocaleMixin } from "@94ai/common-utils";
1
2
  import Vue from "vue";
2
3
  import { isDateObject, getWeekNumber, formatDate, parseDate, isDate, getStartDateOfMonth, getFirstDayOfMonth, getDayCountOfMonth, nextDate, prevDate, clearTime, nextMonth, modifyWithTimeString, prevYear, prevMonth, nextYear } from "element-ui/src/utils/date-util";
3
4
  import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
@@ -387,14 +388,14 @@ var popper$1 = { exports: {} };
387
388
  this._popper = popper2.jquery ? popper2[0] : popper2;
388
389
  }
389
390
  this._options = Object.assign({}, DEFAULTS, options);
390
- this._options.modifiers = this._options.modifiers.map((function(modifier) {
391
+ this._options.modifiers = this._options.modifiers.map(function(modifier) {
391
392
  if (this._options.modifiersIgnored.indexOf(modifier) !== -1)
392
393
  return;
393
394
  if (modifier === "applyStyle") {
394
395
  this._popper.setAttribute("x-placement", this._options.placement);
395
396
  }
396
397
  return this.modifiers[modifier] || modifier;
397
- }).bind(this));
398
+ }.bind(this));
398
399
  this.state.position = this._getPosition(this._popper, this._reference);
399
400
  setStyle(this._popper, {
400
401
  position: this.state.position,
@@ -607,11 +608,11 @@ var popper$1 = { exports: {} };
607
608
  if (ends !== void 0) {
608
609
  modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
609
610
  }
610
- modifiersToRun.forEach((function(modifier) {
611
+ modifiersToRun.forEach(function(modifier) {
611
612
  if (isFunction(modifier)) {
612
613
  data = modifier.call(this, data);
613
614
  }
614
- }).bind(this));
615
+ }.bind(this));
615
616
  return data;
616
617
  };
617
618
  Popper2.prototype.isModifierRequired = function(requesting, requested) {
@@ -755,7 +756,7 @@ var popper$1 = { exports: {} };
755
756
  } else {
756
757
  flipOrder = this._options.flipBehavior;
757
758
  }
758
- flipOrder.forEach((function(step, index) {
759
+ flipOrder.forEach(function(step, index) {
759
760
  if (placement !== step || flipOrder.length === index + 1) {
760
761
  return;
761
762
  }
@@ -772,7 +773,7 @@ var popper$1 = { exports: {} };
772
773
  data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
773
774
  data = this.runModifiers(data, this._options.modifiers, this._flip);
774
775
  }
775
- }).bind(this));
776
+ }.bind(this));
776
777
  return data;
777
778
  };
778
779
  Popper2.prototype.modifiers.offset = function(data) {
@@ -1365,7 +1366,7 @@ const _sfc_main$4 = {
1365
1366
  directives: {
1366
1367
  Clickoutside
1367
1368
  },
1368
- mixins: [Emitter, NewPopper],
1369
+ mixins: [LocaleMixin, Emitter, NewPopper],
1369
1370
  inject: {
1370
1371
  elForm: {
1371
1372
  default: ""
@@ -1384,11 +1385,11 @@ const _sfc_main$4 = {
1384
1385
  readonly: Boolean,
1385
1386
  startPlaceholder: {
1386
1387
  type: String,
1387
- default: "开始周"
1388
+ default: void 0
1388
1389
  },
1389
1390
  endPlaceholder: {
1390
1391
  type: String,
1391
- default: "结束周"
1392
+ default: void 0
1392
1393
  },
1393
1394
  prefixIcon: String,
1394
1395
  clearIcon: {
@@ -1442,6 +1443,13 @@ const _sfc_main$4 = {
1442
1443
  };
1443
1444
  },
1444
1445
  computed: {
1446
+ localeText() {
1447
+ var _a, _b;
1448
+ return {
1449
+ startPlaceholder: (_a = this.startPlaceholder) != null ? _a : this.t("nf.date.startWeek"),
1450
+ endPlaceholder: (_b = this.endPlaceholder) != null ? _b : this.t("nf.date.endWeek")
1451
+ };
1452
+ },
1445
1453
  reference() {
1446
1454
  const reference = this.$refs.reference;
1447
1455
  return reference.$el || reference;
@@ -1857,7 +1865,7 @@ var _sfc_render$4 = function render() {
1857
1865
  attrs: {
1858
1866
  "readonly": !_vm.editable || _vm.readonly,
1859
1867
  "autocomplete": "off",
1860
- "placeholder": _vm.startPlaceholder,
1868
+ "placeholder": _vm.localeText.startPlaceholder,
1861
1869
  "disabled": _vm.pickerDisabled,
1862
1870
  "name": _vm.name && _vm.name[0],
1863
1871
  "size": _vm.pickerSize
@@ -1873,7 +1881,7 @@ var _sfc_render$4 = function render() {
1873
1881
  staticClass: "el-range-input",
1874
1882
  attrs: {
1875
1883
  "autocomplete": "off",
1876
- "placeholder": _vm.endPlaceholder,
1884
+ "placeholder": _vm.localeText.endPlaceholder,
1877
1885
  "disabled": _vm.pickerDisabled,
1878
1886
  "size": _vm.pickerSize,
1879
1887
  "name": _vm.name && _vm.name[1],
@@ -1,157 +1,161 @@
1
- declare var _default: import("vue").DefineComponent<{
2
- timeArrowControl: BooleanConstructor;
3
- }, {}, {}, {}, {}, import("vue").DefineComponent<{
4
- size: {
5
- type: StringConstructor;
6
- default: undefined;
7
- };
8
- format: StringConstructor;
9
- valueFormat: StringConstructor;
10
- readonly: BooleanConstructor;
11
- startPlaceholder: {
12
- type: StringConstructor;
13
- default: string;
14
- };
15
- endPlaceholder: {
16
- type: StringConstructor;
17
- default: string;
18
- };
19
- prefixIcon: StringConstructor;
20
- clearIcon: {
21
- type: StringConstructor;
22
- default: string;
23
- };
24
- name: {
25
- default: string;
26
- validator: (val: any) => boolean;
27
- };
28
- disabled: BooleanConstructor;
29
- clearable: {
30
- type: BooleanConstructor;
31
- default: boolean;
32
- };
33
- id: {
34
- default: string;
35
- validator: (val: any) => boolean;
36
- };
37
- popperClass: StringConstructor;
38
- editable: {
39
- type: BooleanConstructor;
40
- default: boolean;
41
- };
42
- align: {
43
- type: StringConstructor;
44
- default: string;
45
- };
46
- value: {};
47
- defaultValue: {};
48
- defaultTime: {};
49
- rangeSeparator: {
50
- default: string;
51
- };
52
- pickerOptions: {};
53
- unlinkPanels: BooleanConstructor;
54
- validateEvent: {
55
- type: BooleanConstructor;
56
- default: boolean;
57
- };
58
- }, {}, {
59
- pickerVisible: boolean;
60
- showClose: boolean;
61
- userInput: null;
62
- valueOnOpen: null;
63
- unwatchPickerOptions: null;
64
- dateList: never[];
65
- }, {
66
- reference(): any;
67
- refInput(): never[];
68
- valueIsEmpty(): boolean;
69
- triggerClass(): any;
70
- haveTrigger(): any;
71
- displayValue(): any;
72
- parsedValue(): any;
73
- _elFormItemSize(): any;
74
- pickerSize(): any;
75
- pickerDisabled(): any;
76
- firstInputId(): {
77
- id: any;
78
- };
79
- secondInputId(): {
80
- id: any;
81
- };
82
- }, {}, any, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
83
- size: {
84
- type: StringConstructor;
85
- default: undefined;
86
- };
87
- format: StringConstructor;
88
- valueFormat: StringConstructor;
89
- readonly: BooleanConstructor;
90
- startPlaceholder: {
91
- type: StringConstructor;
92
- default: string;
93
- };
94
- endPlaceholder: {
95
- type: StringConstructor;
96
- default: string;
97
- };
98
- prefixIcon: StringConstructor;
99
- clearIcon: {
100
- type: StringConstructor;
101
- default: string;
102
- };
103
- name: {
104
- default: string;
105
- validator: (val: any) => boolean;
106
- };
107
- disabled: BooleanConstructor;
108
- clearable: {
109
- type: BooleanConstructor;
110
- default: boolean;
111
- };
112
- id: {
113
- default: string;
114
- validator: (val: any) => boolean;
115
- };
116
- popperClass: StringConstructor;
117
- editable: {
118
- type: BooleanConstructor;
119
- default: boolean;
120
- };
121
- align: {
122
- type: StringConstructor;
123
- default: string;
124
- };
125
- value: {};
126
- defaultValue: {};
127
- defaultTime: {};
128
- rangeSeparator: {
129
- default: string;
130
- };
131
- pickerOptions: {};
132
- unlinkPanels: BooleanConstructor;
133
- validateEvent: {
134
- type: BooleanConstructor;
135
- default: boolean;
136
- };
137
- }>>, {
138
- name: string;
139
- readonly: boolean;
140
- disabled: boolean;
141
- unlinkPanels: boolean;
142
- size: string;
143
- startPlaceholder: string;
144
- endPlaceholder: string;
145
- clearIcon: string;
146
- clearable: boolean;
147
- id: string;
148
- editable: boolean;
149
- align: string;
150
- rangeSeparator: string;
151
- validateEvent: boolean;
152
- }>, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
153
- timeArrowControl: BooleanConstructor;
154
- }>>, {
155
- timeArrowControl: boolean;
156
- }>;
157
- export default _default;
1
+ declare var _default: import("vue").DefineComponent<{
2
+ timeArrowControl: BooleanConstructor;
3
+ }, {}, {}, {}, {}, import("vue").DefineComponent<{
4
+ size: {
5
+ type: StringConstructor;
6
+ default: undefined;
7
+ };
8
+ format: StringConstructor;
9
+ valueFormat: StringConstructor;
10
+ readonly: BooleanConstructor;
11
+ startPlaceholder: {
12
+ type: StringConstructor;
13
+ default: undefined;
14
+ };
15
+ endPlaceholder: {
16
+ type: StringConstructor;
17
+ default: undefined;
18
+ };
19
+ prefixIcon: StringConstructor;
20
+ clearIcon: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ name: {
25
+ default: string;
26
+ validator: (val: any) => boolean;
27
+ };
28
+ disabled: BooleanConstructor;
29
+ clearable: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ id: {
34
+ default: string;
35
+ validator: (val: any) => boolean;
36
+ };
37
+ popperClass: StringConstructor;
38
+ editable: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ align: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ value: {};
47
+ defaultValue: {};
48
+ defaultTime: {};
49
+ rangeSeparator: {
50
+ default: string;
51
+ };
52
+ pickerOptions: {};
53
+ unlinkPanels: BooleanConstructor;
54
+ validateEvent: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ }, {}, {
59
+ pickerVisible: boolean;
60
+ showClose: boolean;
61
+ userInput: null;
62
+ valueOnOpen: null;
63
+ unwatchPickerOptions: null;
64
+ dateList: never[];
65
+ }, {
66
+ localeText(): {
67
+ startPlaceholder: any;
68
+ endPlaceholder: any;
69
+ };
70
+ reference(): any;
71
+ refInput(): never[];
72
+ valueIsEmpty(): boolean;
73
+ triggerClass(): any;
74
+ haveTrigger(): any;
75
+ displayValue(): any;
76
+ parsedValue(): any;
77
+ _elFormItemSize(): any;
78
+ pickerSize(): any;
79
+ pickerDisabled(): any;
80
+ firstInputId(): {
81
+ id: any;
82
+ };
83
+ secondInputId(): {
84
+ id: any;
85
+ };
86
+ }, {}, any, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
87
+ size: {
88
+ type: StringConstructor;
89
+ default: undefined;
90
+ };
91
+ format: StringConstructor;
92
+ valueFormat: StringConstructor;
93
+ readonly: BooleanConstructor;
94
+ startPlaceholder: {
95
+ type: StringConstructor;
96
+ default: undefined;
97
+ };
98
+ endPlaceholder: {
99
+ type: StringConstructor;
100
+ default: undefined;
101
+ };
102
+ prefixIcon: StringConstructor;
103
+ clearIcon: {
104
+ type: StringConstructor;
105
+ default: string;
106
+ };
107
+ name: {
108
+ default: string;
109
+ validator: (val: any) => boolean;
110
+ };
111
+ disabled: BooleanConstructor;
112
+ clearable: {
113
+ type: BooleanConstructor;
114
+ default: boolean;
115
+ };
116
+ id: {
117
+ default: string;
118
+ validator: (val: any) => boolean;
119
+ };
120
+ popperClass: StringConstructor;
121
+ editable: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ align: {
126
+ type: StringConstructor;
127
+ default: string;
128
+ };
129
+ value: {};
130
+ defaultValue: {};
131
+ defaultTime: {};
132
+ rangeSeparator: {
133
+ default: string;
134
+ };
135
+ pickerOptions: {};
136
+ unlinkPanels: BooleanConstructor;
137
+ validateEvent: {
138
+ type: BooleanConstructor;
139
+ default: boolean;
140
+ };
141
+ }>>, {
142
+ name: string;
143
+ readonly: boolean;
144
+ disabled: boolean;
145
+ unlinkPanels: boolean;
146
+ size: string;
147
+ startPlaceholder: string;
148
+ endPlaceholder: string;
149
+ clearIcon: string;
150
+ clearable: boolean;
151
+ id: string;
152
+ editable: boolean;
153
+ align: string;
154
+ rangeSeparator: string;
155
+ validateEvent: boolean;
156
+ }>, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
157
+ timeArrowControl: BooleanConstructor;
158
+ }>>, {
159
+ timeArrowControl: boolean;
160
+ }>;
161
+ export default _default;