@opentinyvue/vue-hrapprover 2.21.0 → 3.21.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.
package/lib/index.js CHANGED
@@ -49,7 +49,7 @@ var Hrapprover = defineComponent({
49
49
  });
50
50
  }
51
51
  });
52
- var version = "2.21.0";
52
+ var version = "3.21.0";
53
53
  Hrapprover.model = {
54
54
  prop: "modelValue",
55
55
  event: "update:modelValue"
package/lib/pc.js CHANGED
@@ -5,38 +5,42 @@ import Loading from '@opentinyvue/vue-loading';
5
5
  import { message } from '@opentinyvue/vue-modal';
6
6
  import Radio from '@opentinyvue/vue-radio';
7
7
  import { t } from '@opentinyvue/vue-locale';
8
+ import { resolveComponent, resolveDirective, openBlock, createBlock, withCtx, withDirectives, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, createVNode, createTextVNode } from 'vue';
8
9
 
9
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
10
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
11
- if (render) {
12
- options.render = render;
13
- options.staticRenderFns = staticRenderFns;
14
- options._compiled = true;
15
- }
16
- var hook;
17
- if (injectStyles) {
18
- hook = injectStyles;
10
+ function _createForOfIteratorHelperLoose(r, e) {
11
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
12
+ if (t) return (t = t.call(r)).next.bind(t);
13
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
14
+ t && (r = t);
15
+ var o = 0;
16
+ return function() {
17
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
18
+ };
19
19
  }
20
- if (hook) {
21
- if (options.functional) {
22
- options._injectStyles = hook;
23
- var originalRender = options.render;
24
- options.render = function renderWithStyleInjection(h, context) {
25
- hook.call(context);
26
- return originalRender(h, context);
27
- };
28
- } else {
29
- var existing = options.beforeCreate;
30
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
31
- }
20
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
21
+ }
22
+ function _unsupportedIterableToArray(r, a) {
23
+ if (r) {
24
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
25
+ var t = {}.toString.call(r).slice(8, -1);
26
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
32
27
  }
33
- return {
34
- exports: scriptExports,
35
- options
36
- };
37
28
  }
29
+ function _arrayLikeToArray(r, a) {
30
+ (null == a || a > r.length) && (a = r.length);
31
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
32
+ return n;
33
+ }
34
+ var _export_sfc = function _export_sfc2(sfc, props) {
35
+ var target = sfc.__vccOpts || sfc;
36
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
37
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
38
+ target[key] = val;
39
+ }
40
+ return target;
41
+ };
38
42
 
39
- var __vue2_script = defineComponent({
43
+ var _sfc_main = defineComponent({
40
44
  inheritAttrs: false,
41
45
  emits: ["update:approvalPerson", "update:modelValue"],
42
46
  props: [].concat(props, ["modelValue", "disabled", "approvalPerson", "category", "fetchDeptList", "fetchHrapprover", "fetchDeptByValue", "fetchDept", "title", "displayOnly"]),
@@ -68,90 +72,114 @@ var __vue2_script = defineComponent({
68
72
  });
69
73
  }
70
74
  });
71
- var render = function render2() {
72
- var _vm = this;
73
- var _h = _vm.$createElement;
74
- var _c = _vm._self._c || _h;
75
- return _c("dept", {
76
- ref: "dept",
77
- staticClass: "tiny-hrapprover",
78
- attrs: {
79
- "fetch-dept-list": _vm.fetchDeptList,
80
- "fetch-dept-by-value": _vm.fetchDeptByValue,
81
- "fetch-dept": _vm.fetchDept,
82
- "display-only": _vm.displayOnly,
83
- "disabled": _vm.disabled,
84
- "title": _vm.title
85
- },
86
- on: {
87
- "close": _vm.resetPerson,
88
- "confirm": _vm.hrChange,
89
- "selected": _vm.selectedDept,
90
- "cancel": _vm.cancel
91
- },
92
- scopedSlots: _vm._u([{
93
- key: "hrapprover",
94
- fn: function fn() {
95
- return [_c("div", {
96
- directives: [{
97
- name: "loading",
98
- rawName: "v-loading",
99
- value: _vm.state.loading,
100
- expression: "state.loading"
101
- }],
102
- staticClass: "tiny-hrapprover__list"
103
- }, [_vm.state.hrList.length ? _c("table", {
104
- attrs: {
105
- "width": "100%"
106
- }
107
- }, [_c("thead", [_c("tr", [_c("th", {
108
- attrs: {
109
- "width": "50px"
110
- }
111
- }), _c("th", [_vm._v(_vm._s(_vm.t("ui.hrapprover.approver")))]), _c("th", [_vm._v(_vm._s(_vm.t("ui.hrapprover.remark")))])])]), _c("tbody", _vm._l(_vm.state.hrList, function(hr, index) {
112
- return _c("tr", {
113
- key: index
114
- }, [_c("td", {
115
- staticStyle: {
116
- "text-align": "center"
117
- }
118
- }, [_c("radio", {
119
- attrs: {
120
- "label": hr.approval_person
121
- },
122
- model: {
123
- value: _vm.state.approvalPerson,
124
- callback: function callback($$v) {
125
- _vm.$set(_vm.state, "approvalPerson", $$v);
126
- },
127
- expression: "state.approvalPerson"
128
- }
129
- }, [_vm._v(" ")])], 1), _c("td", [_vm._v(_vm._s(hr.approval_person))]), _c("td", [_vm._v(_vm._s(hr.remarks))])]);
130
- }), 0)]) : _c("div", [_c("div", {
131
- staticClass: "tiny-hrapprover__error"
132
- }, [_vm._v(" " + _vm._s(_vm.t("ui.hrapprover.noapprover")) + " ")])])])];
133
- },
134
- proxy: true
135
- }]),
136
- model: {
137
- value: _vm.state.dept,
138
- callback: function callback($$v) {
139
- _vm.$set(_vm.state, "dept", $$v);
140
- },
141
- expression: "state.dept"
142
- }
143
- });
75
+ var _hoisted_1 = {
76
+ class: "tiny-hrapprover__list"
144
77
  };
145
- var staticRenderFns = [];
146
- var __cssModules = {};
147
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
148
- function __vue2_injectStyles(context) {
149
- for (var o in __cssModules) {
150
- this[o] = __cssModules[o];
78
+ var _hoisted_2 = {
79
+ key: 0,
80
+ width: "100%"
81
+ };
82
+ var _hoisted_3 = /* @__PURE__ */ createElementVNode(
83
+ "th",
84
+ {
85
+ width: "50px"
86
+ },
87
+ null,
88
+ -1
89
+ /* HOISTED */
90
+ );
91
+ var _hoisted_4 = {
92
+ style: {
93
+ "text-align": "center"
151
94
  }
95
+ };
96
+ var _hoisted_5 = {
97
+ key: 1
98
+ };
99
+ var _hoisted_6 = {
100
+ class: "tiny-hrapprover__error"
101
+ };
102
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
103
+ var _component_radio = resolveComponent("radio");
104
+ var _component_dept = resolveComponent("dept");
105
+ var _directive_loading = resolveDirective("loading");
106
+ return openBlock(), createBlock(_component_dept, {
107
+ ref: "dept",
108
+ class: "tiny-hrapprover",
109
+ modelValue: _ctx.state.dept,
110
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
111
+ return _ctx.state.dept = $event;
112
+ }),
113
+ "fetch-dept-list": _ctx.fetchDeptList,
114
+ "fetch-dept-by-value": _ctx.fetchDeptByValue,
115
+ "fetch-dept": _ctx.fetchDept,
116
+ "display-only": _ctx.displayOnly,
117
+ onClose: _ctx.resetPerson,
118
+ onConfirm: _ctx.hrChange,
119
+ disabled: _ctx.disabled,
120
+ onSelected: _ctx.selectedDept,
121
+ title: _ctx.title,
122
+ onCancel: _ctx.cancel
123
+ }, {
124
+ hrapprover: withCtx(function() {
125
+ return [withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [_ctx.state.hrList.length ? (openBlock(), createElementBlock("table", _hoisted_2, [createElementVNode("thead", null, [createElementVNode("tr", null, [_hoisted_3, createElementVNode(
126
+ "th",
127
+ null,
128
+ toDisplayString(_ctx.t("ui.hrapprover.approver")),
129
+ 1
130
+ /* TEXT */
131
+ ), createElementVNode(
132
+ "th",
133
+ null,
134
+ toDisplayString(_ctx.t("ui.hrapprover.remark")),
135
+ 1
136
+ /* TEXT */
137
+ )])]), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(
138
+ Fragment,
139
+ null,
140
+ renderList(_ctx.state.hrList, function(hr, index) {
141
+ return openBlock(), createElementBlock("tr", {
142
+ key: index
143
+ }, [createElementVNode("td", _hoisted_4, [createVNode(_component_radio, {
144
+ modelValue: _ctx.state.approvalPerson,
145
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
146
+ return _ctx.state.approvalPerson = $event;
147
+ }),
148
+ label: hr.approval_person
149
+ }, {
150
+ default: withCtx(function() {
151
+ return [createTextVNode(" ")];
152
+ }),
153
+ _: 2
154
+ /* DYNAMIC */
155
+ }, 1032, ["modelValue", "label"])]), createElementVNode(
156
+ "td",
157
+ null,
158
+ toDisplayString(hr.approval_person),
159
+ 1
160
+ /* TEXT */
161
+ ), createElementVNode(
162
+ "td",
163
+ null,
164
+ toDisplayString(hr.remarks),
165
+ 1
166
+ /* TEXT */
167
+ )]);
168
+ }),
169
+ 128
170
+ /* KEYED_FRAGMENT */
171
+ ))])])) : (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode(
172
+ "div",
173
+ _hoisted_6,
174
+ toDisplayString(_ctx.t("ui.hrapprover.noapprover")),
175
+ 1
176
+ /* TEXT */
177
+ )]))])), [[_directive_loading, _ctx.state.loading]])];
178
+ }),
179
+ _: 1
180
+ /* STABLE */
181
+ }, 8, ["modelValue", "fetch-dept-list", "fetch-dept-by-value", "fetch-dept", "display-only", "onClose", "onConfirm", "disabled", "onSelected", "title", "onCancel"]);
152
182
  }
153
- var pc = /* @__PURE__ */ function() {
154
- return __component__.exports;
155
- }();
183
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
156
184
 
157
185
  export { pc as default };
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-hrapprover",
3
- "version": "2.21.0",
3
+ "version": "3.21.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentinyvue/vue-common": "~2.21.0",
10
+ "@opentinyvue/vue-common": "~3.21.0",
11
11
  "@opentinyvue/vue-renderless": "~3.21.0",
12
- "@opentinyvue/vue-dept": "~2.21.0",
13
- "@opentinyvue/vue-radio": "~2.21.0",
14
- "@opentinyvue/vue-locale": "~2.21.0",
15
- "@opentinyvue/vue-loading": "~2.21.0",
16
- "@opentinyvue/vue-modal": "~2.21.0",
12
+ "@opentinyvue/vue-dept": "~3.21.0",
13
+ "@opentinyvue/vue-radio": "~3.21.0",
14
+ "@opentinyvue/vue-locale": "~3.21.0",
15
+ "@opentinyvue/vue-loading": "~3.21.0",
16
+ "@opentinyvue/vue-modal": "~3.21.0",
17
17
  "@opentinyvue/vue-theme": "~3.21.0"
18
18
  },
19
19
  "license": "MIT",
package/src/index.d.ts CHANGED
@@ -1,2 +1,68 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
2
+ modelValue: StringConstructor;
3
+ approvalPerson: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ disabled: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ category: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ title: StringConstructor;
16
+ fetchHrapprover: FunctionConstructor;
17
+ fetchDeptList: FunctionConstructor;
18
+ fetchDeptByValue: FunctionConstructor;
19
+ fetchDept: FunctionConstructor;
20
+ displayOnly: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ tiny_mode: StringConstructor;
25
+ tiny_mode_root: BooleanConstructor;
26
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
27
+ tiny_renderless: FunctionConstructor;
28
+ tiny_theme: StringConstructor;
29
+ tiny_chart_theme: ObjectConstructor;
30
+ }, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
31
+ [key: string]: any;
32
+ }>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
33
+ modelValue: StringConstructor;
34
+ approvalPerson: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ disabled: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ category: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ title: StringConstructor;
47
+ fetchHrapprover: FunctionConstructor;
48
+ fetchDeptList: FunctionConstructor;
49
+ fetchDeptByValue: FunctionConstructor;
50
+ fetchDept: FunctionConstructor;
51
+ displayOnly: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ tiny_mode: StringConstructor;
56
+ tiny_mode_root: BooleanConstructor;
57
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
58
+ tiny_renderless: FunctionConstructor;
59
+ tiny_theme: StringConstructor;
60
+ tiny_chart_theme: ObjectConstructor;
61
+ }>>, {
62
+ disabled: boolean;
63
+ tiny_mode_root: boolean;
64
+ displayOnly: boolean;
65
+ approvalPerson: string;
66
+ category: string;
67
+ }, {}>;
2
68
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,2 +1,70 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ disabled?: any;
3
+ title?: any;
4
+ tiny_mode?: any;
5
+ tiny_mode_root?: any;
6
+ tiny_template?: any;
7
+ tiny_renderless?: any;
8
+ _constants?: any;
9
+ tiny_theme?: any;
10
+ tiny_chart_theme?: any;
11
+ modelValue?: any;
12
+ displayOnly?: any;
13
+ fetchDeptList?: any;
14
+ fetchDeptByValue?: any;
15
+ fetchDept?: any;
16
+ fetchHrapprover?: any;
17
+ approvalPerson?: any;
18
+ category?: any;
19
+ }>, {
20
+ t: (this: any, path: any, options?: any) => any;
21
+ vm: any;
22
+ f: (props: any, attrs?: {}) => {};
23
+ a: (attrs: any, filters: any, include: any) => {};
24
+ d: (props: any) => void;
25
+ dp: (props: any) => void;
26
+ gcls: (key: any) => any;
27
+ m: (...cssClasses: any[]) => string;
28
+ } & {
29
+ showModal(): void;
30
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("update:modelValue" | "update:approvalPerson")[], "update:modelValue" | "update:approvalPerson", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
31
+ disabled?: any;
32
+ title?: any;
33
+ tiny_mode?: any;
34
+ tiny_mode_root?: any;
35
+ tiny_template?: any;
36
+ tiny_renderless?: any;
37
+ _constants?: any;
38
+ tiny_theme?: any;
39
+ tiny_chart_theme?: any;
40
+ modelValue?: any;
41
+ displayOnly?: any;
42
+ fetchDeptList?: any;
43
+ fetchDeptByValue?: any;
44
+ fetchDept?: any;
45
+ fetchHrapprover?: any;
46
+ approvalPerson?: any;
47
+ category?: any;
48
+ }>>> & {
49
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
50
+ "onUpdate:approvalPerson"?: ((...args: any[]) => any) | undefined;
51
+ }, {
52
+ readonly disabled?: any;
53
+ readonly title?: any;
54
+ readonly tiny_mode?: any;
55
+ readonly tiny_mode_root?: any;
56
+ readonly tiny_template?: any;
57
+ readonly tiny_renderless?: any;
58
+ readonly _constants?: any;
59
+ readonly tiny_theme?: any;
60
+ readonly tiny_chart_theme?: any;
61
+ readonly modelValue?: any;
62
+ readonly displayOnly?: any;
63
+ readonly fetchDeptList?: any;
64
+ readonly fetchDeptByValue?: any;
65
+ readonly fetchDept?: any;
66
+ readonly fetchHrapprover?: any;
67
+ readonly approvalPerson?: any;
68
+ readonly category?: any;
69
+ }, {}>;
2
70
  export default _default;