@ibiz-template/vue3-components 0.2.16 → 0.2.18-dev.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.
Files changed (39) hide show
  1. package/dist/index-Zu7Tav62.js +14 -0
  2. package/dist/index-Zu7Tav62.js.map +1 -0
  3. package/dist/index.min.css +1 -1
  4. package/dist/index.system.min.js +1 -13
  5. package/dist/index.system.min.js.map +1 -1
  6. package/dist/{xlsx-util-lMYhU4qD.js → xlsx-util-ShOHD7Yn.js} +25 -25
  7. package/dist/{xlsx-util-lMYhU4qD.js.map → xlsx-util-ShOHD7Yn.js.map} +1 -1
  8. package/es/_virtual/customParseFormat.mjs +3 -0
  9. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.mjs +2 -8
  10. package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.mjs +2 -8
  11. package/es/editor/span/span/span.mjs +9 -1
  12. package/es/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/customParseFormat.mjs +13 -0
  13. package/es/panel-component/index.mjs +2 -0
  14. package/es/panel-component/panel-button/panel-button.css +1 -1
  15. package/es/panel-component/panel-container-group/index.d.ts +28 -0
  16. package/es/panel-component/panel-container-group/index.mjs +20 -0
  17. package/es/panel-component/panel-container-group/panel-container-group.controller.d.ts +31 -0
  18. package/es/panel-component/panel-container-group/panel-container-group.controller.mjs +35 -0
  19. package/es/panel-component/panel-container-group/panel-container-group.css +1 -0
  20. package/es/panel-component/panel-container-group/panel-container-group.d.ts +28 -0
  21. package/es/panel-component/panel-container-group/panel-container-group.mjs +107 -0
  22. package/es/panel-component/panel-container-group/panel-container-group.provider.d.ts +15 -0
  23. package/es/panel-component/panel-container-group/panel-container-group.provider.mjs +21 -0
  24. package/es/panel-component/panel-container-group/panel-container-group.state.d.ts +12 -0
  25. package/es/panel-component/panel-container-group/panel-container-group.state.mjs +7 -0
  26. package/lib/_virtual/customParseFormat.cjs +5 -0
  27. package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.cjs +2 -8
  28. package/lib/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.cjs +2 -8
  29. package/lib/editor/span/span/span.cjs +9 -1
  30. package/lib/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/customParseFormat.cjs +17 -0
  31. package/lib/panel-component/index.cjs +2 -0
  32. package/lib/panel-component/panel-button/panel-button.css +1 -1
  33. package/lib/panel-component/panel-container-group/index.cjs +27 -0
  34. package/lib/panel-component/panel-container-group/panel-container-group.cjs +109 -0
  35. package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +37 -0
  36. package/lib/panel-component/panel-container-group/panel-container-group.css +1 -0
  37. package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +23 -0
  38. package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +9 -0
  39. package/package.json +7 -7
@@ -0,0 +1,3 @@
1
+ var customParseFormat = {exports: {}};
2
+
3
+ export { customParseFormat as __module };
@@ -15,19 +15,13 @@ const IBizDateRangePicker = /* @__PURE__ */ defineComponent({
15
15
  const editorModel = c.model;
16
16
  let valueSeparator = ",";
17
17
  let unlinkPanels = false;
18
- let startPlaceHolder = "";
19
- let endPlaceHolder = "";
18
+ const startPlaceHolder = editorModel.placeHolder ? editorModel.placeHolder.split(";")[0] || "" : "";
19
+ const endPlaceHolder = editorModel.placeHolder ? editorModel.placeHolder.split(";")[1] || "" : "";
20
20
  let rangeSeparator = "\u81F3";
21
21
  if (editorModel.editorParams) {
22
22
  if (editorModel.editorParams.valueSeparator) {
23
23
  valueSeparator = editorModel.editorParams.valueSeparator;
24
24
  }
25
- if (editorModel.editorParams.startPlaceHolder) {
26
- startPlaceHolder = editorModel.editorParams.startPlaceHolder;
27
- }
28
- if (editorModel.editorParams.endPlaceHolder) {
29
- endPlaceHolder = editorModel.editorParams.endPlaceHolder;
30
- }
31
25
  if (editorModel.editorParams.rangeSeparator) {
32
26
  rangeSeparator = editorModel.editorParams.rangeSeparator;
33
27
  }
@@ -18,8 +18,8 @@ const IBizNumberRangePicker = /* @__PURE__ */ defineComponent({
18
18
  let min = -Infinity;
19
19
  let precision = 0;
20
20
  let valueSeparator = "-";
21
- let startPlaceHolder = "";
22
- let endPlaceHolder = "";
21
+ const startPlaceHolder = editorModel.placeHolder ? editorModel.placeHolder.split(";")[0] || "" : "";
22
+ const endPlaceHolder = editorModel.placeHolder ? editorModel.placeHolder.split(";")[1] || "" : "";
23
23
  let rangeSeparator = "~";
24
24
  if (editorModel.editorParams) {
25
25
  if (editorModel.editorParams.maxvalue) {
@@ -34,12 +34,6 @@ const IBizNumberRangePicker = /* @__PURE__ */ defineComponent({
34
34
  if (editorModel.editorParams.valueSeparator) {
35
35
  valueSeparator = editorModel.editorParams.valueSeparator;
36
36
  }
37
- if (editorModel.editorParams.startPlaceHolder) {
38
- startPlaceHolder = editorModel.editorParams.startPlaceHolder;
39
- }
40
- if (editorModel.editorParams.endPlaceHolder) {
41
- endPlaceHolder = editorModel.editorParams.endPlaceHolder;
42
- }
43
37
  if (editorModel.editorParams.rangeSeparator) {
44
38
  rangeSeparator = editorModel.editorParams.rangeSeparator;
45
39
  }
@@ -4,8 +4,16 @@ import './span.css';
4
4
  import { isNil } from 'ramda';
5
5
  import { DataTypes } from '@ibiz-template/core';
6
6
  import dayjs from 'dayjs';
7
+ import customParseFormat from '../../../node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/customParseFormat.mjs';
7
8
 
8
9
  "use strict";
10
+ dayjs.extend(customParseFormat);
11
+ function isValidDateFormat(dateStr, format) {
12
+ if (dateStr === format) {
13
+ return false;
14
+ }
15
+ return dayjs(dateStr, format, true).isValid();
16
+ }
9
17
  const IBizSpan = /* @__PURE__ */ defineComponent({
10
18
  name: "IBizSpan",
11
19
  props: getSpanProps(),
@@ -56,7 +64,7 @@ const IBizSpan = /* @__PURE__ */ defineComponent({
56
64
  text.value = dayjs(newVal).format(valueFormat);
57
65
  } else {
58
66
  const tempVal = dayjs(newVal).format(valueFormat);
59
- if (tempVal !== "Invalid Date") {
67
+ if (isValidDateFormat(tempVal, valueFormat)) {
60
68
  text.value = tempVal;
61
69
  } else {
62
70
  text.value = ibiz.util.text.format(`${newVal}`, valueFormat);
@@ -0,0 +1,13 @@
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from '../../../../../../_virtual/_commonjsHelpers.mjs';
2
+ import { __module as customParseFormat$2 } from '../../../../../../_virtual/customParseFormat.mjs';
3
+
4
+ var customParseFormat = customParseFormat$2.exports;
5
+
6
+ (function (module, exports) {
7
+ !function(e,t){"object"=='object'&&"undefined"!='object'?module.exports=t():"function"==typeof undefined&&undefined.amd?undefined(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t();}(commonjsGlobal,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return (e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1);}],a:[i,function(e){this.afternoon=u(e,!0);}],S:[/\d/,function(e){this.milliseconds=100*+e;}],SS:[n,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=h("months"),n=(h("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f<a;f+=1){var h=s[f],u=d[h],c=u&&u[0],l=u&&u[1];s[f]=l?{regex:c,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,h=e.slice(r),u=o.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],h=!0===s[3],u=f||h,d=s[2];h&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,e);};}}));
8
+ } (customParseFormat$2, customParseFormat$2.exports));
9
+
10
+ var customParseFormatExports = customParseFormat$2.exports;
11
+ var customParseFormat$1 = /*@__PURE__*/getDefaultExportFromCjs(customParseFormatExports);
12
+
13
+ export { customParseFormat$1 as default };
@@ -15,6 +15,7 @@ import { IBizPanelIndexViewSearch } from './panel-index-view-search/index.mjs';
15
15
  import { IBizPanelAppLoginView } from './panel-app-login-view/index.mjs';
16
16
  import { IBizPanelRememberMe } from './panel-remember-me/index.mjs';
17
17
  import { IBizIndexActions } from './index-actions/index.mjs';
18
+ import { IBizPanelContainerGroup } from './panel-container-group/index.mjs';
18
19
  export { NavPosIndexState } from './nav-pos-index/nav-pos-index.state.mjs';
19
20
  export { NavPosIndexController } from './nav-pos-index/nav-pos-index.controller.mjs';
20
21
  export { PanelButtonController } from './panel-button/panel-button.controller.mjs';
@@ -49,6 +50,7 @@ const IBizPanelComponents = {
49
50
  v.use(IBizPanelAppLoginView);
50
51
  v.use(IBizPanelRememberMe);
51
52
  v.use(IBizIndexActions);
53
+ v.use(IBizPanelContainerGroup);
52
54
  }
53
55
  };
54
56
 
@@ -1 +1 @@
1
- .ibiz-panel-button{--ibiz-panel-button-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-panel-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-panel-button-icon-max-height:var(--ibiz-width-icon-medium);padding:var(--ibiz-spacing-tight);overflow:hidden}.ibiz-panel-button .el-button{width:100%}.ibiz-panel-button .el-button .ibiz-panel-button-content{display:flex;align-items:center;justify-content:flex-start}.ibiz-panel-button .el-button .ibiz-panel-button-content i,.ibiz-panel-button .el-button .ibiz-panel-button-content img{display:inline-block;max-width:var(--ibiz-panel-button-icon-max-width);max-height:var(--ibiz-panel-button-icon-max-height)}.ibiz-panel-button .el-button .ibiz-panel-button-content .ibiz-icon+.ibiz-panel-button-content--caption{margin-left:var(--ibiz-panel-button-icon-margin)}.ibiz-panel-button.is-loading .el-button .ibiz-icon{display:none}
1
+ .ibiz-panel-button{--ibiz-panel-button-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-panel-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-panel-button-icon-max-height:var(--ibiz-width-icon-medium);width:100%;padding:var(--ibiz-spacing-tight);overflow:hidden}.ibiz-panel-button .el-button{width:100%}.ibiz-panel-button .el-button .ibiz-panel-button-content{display:flex;align-items:center;justify-content:flex-start}.ibiz-panel-button .el-button .ibiz-panel-button-content i,.ibiz-panel-button .el-button .ibiz-panel-button-content img{display:inline-block;max-width:var(--ibiz-panel-button-icon-max-width);max-height:var(--ibiz-panel-button-icon-max-height)}.ibiz-panel-button .el-button .ibiz-panel-button-content .ibiz-icon+.ibiz-panel-button-content--caption{margin-left:var(--ibiz-panel-button-icon-margin)}.ibiz-panel-button.is-loading .el-button .ibiz-icon{display:none}
@@ -0,0 +1,28 @@
1
+ import { PanelContainerGroupState } from './panel-container-group.state';
2
+ import { PanelContainerGroupController } from './panel-container-group.controller';
3
+ export { PanelContainerGroupState, PanelContainerGroupController };
4
+ export declare const IBizPanelContainerGroup: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
5
+ modelData: {
6
+ type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
7
+ required: true;
8
+ };
9
+ controller: {
10
+ type: typeof PanelContainerGroupController;
11
+ required: true;
12
+ };
13
+ }, {
14
+ ns: import("@ibiz-template/core").Namespace;
15
+ captionText: import("vue").ComputedRef<any>;
16
+ changeCollapse: () => void;
17
+ isCollapse: import("vue").Ref<boolean>;
18
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
+ modelData: {
20
+ type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
21
+ required: true;
22
+ };
23
+ controller: {
24
+ type: typeof PanelContainerGroupController;
25
+ required: true;
26
+ };
27
+ }>>, {}, {}>>;
28
+ export default IBizPanelContainerGroup;
@@ -0,0 +1,20 @@
1
+ import { registerPanelItemProvider } from '@ibiz-template/runtime';
2
+ import { withInstall } from '@ibiz-template/vue3-util';
3
+ export { PanelContainerGroupState } from './panel-container-group.state.mjs';
4
+ import { PanelContainerGroupProvider } from './panel-container-group.provider.mjs';
5
+ export { PanelContainerGroupController } from './panel-container-group.controller.mjs';
6
+ import { PanelContainerGroup } from './panel-container-group.mjs';
7
+
8
+ "use strict";
9
+ const IBizPanelContainerGroup = withInstall(
10
+ PanelContainerGroup,
11
+ function(v) {
12
+ v.component(PanelContainerGroup.name, PanelContainerGroup);
13
+ registerPanelItemProvider(
14
+ "CONTAINER_CONTAINER_GROUP",
15
+ () => new PanelContainerGroupProvider()
16
+ );
17
+ }
18
+ );
19
+
20
+ export { IBizPanelContainerGroup, IBizPanelContainerGroup as default };
@@ -0,0 +1,31 @@
1
+ import { PanelItemController } from '@ibiz-template/runtime';
2
+ import { IPanelContainer } from '@ibiz/model-core';
3
+ import { PanelContainerGroupState } from './panel-container-group.state';
4
+ /**
5
+ * 面板分组容器控制器
6
+ *
7
+ * @export
8
+ * @class PanelContainerGroupController
9
+ * @extends {PanelItemController}
10
+ */
11
+ export declare class PanelContainerGroupController extends PanelItemController<IPanelContainer> {
12
+ state: PanelContainerGroupState;
13
+ protected createState(): PanelContainerGroupState;
14
+ /**
15
+ * 禁用关闭
16
+ *
17
+ * @author chitanda
18
+ * @date 2022-09-14 14:09:51
19
+ * @readonly
20
+ * @type {boolean}
21
+ */
22
+ get disableClose(): boolean;
23
+ /**
24
+ * 是否默认展开分组
25
+ *
26
+ * @author chitanda
27
+ * @date 2022-09-14 14:09:09
28
+ * @readonly
29
+ */
30
+ get defaultExpansion(): boolean;
31
+ }
@@ -0,0 +1,35 @@
1
+ import { PanelItemController } from '@ibiz-template/runtime';
2
+ import { PanelContainerGroupState } from './panel-container-group.state.mjs';
3
+
4
+ "use strict";
5
+ class PanelContainerGroupController extends PanelItemController {
6
+ createState() {
7
+ var _a;
8
+ return new PanelContainerGroupState((_a = this.parent) == null ? void 0 : _a.state);
9
+ }
10
+ /**
11
+ * 禁用关闭
12
+ *
13
+ * @author chitanda
14
+ * @date 2022-09-14 14:09:51
15
+ * @readonly
16
+ * @type {boolean}
17
+ */
18
+ get disableClose() {
19
+ const { titleBarCloseMode: mode } = this.model;
20
+ return mode === 0 || mode === void 0;
21
+ }
22
+ /**
23
+ * 是否默认展开分组
24
+ *
25
+ * @author chitanda
26
+ * @date 2022-09-14 14:09:09
27
+ * @readonly
28
+ */
29
+ get defaultExpansion() {
30
+ const { titleBarCloseMode: mode } = this.model;
31
+ return this.disableClose || mode === 1;
32
+ }
33
+ }
34
+
35
+ export { PanelContainerGroupController };
@@ -0,0 +1 @@
1
+ .ibiz-panel-container-group{--ibiz-panel-container-group-bg-color:transparent;--ibiz-panel-container-group-header-bg-color:transparent;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base-tight);--ibiz-panel-container-group-header-border-color:var(--ibiz-color-border);--ibiz-panel-container-group-header-height:49px;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-0);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-panel-container-group-content-bg-color:transparent;--ibiz-panel-container-group-content-padding:var(--ibiz-spacing-tight)}.ibiz-panel-container-group{height:100%;background-color:var(--ibiz-panel-container-group-bg-color);border-radius:var(--ibiz-border-radius-base)}.ibiz-panel-container-group__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-panel-container-group-caption-font-size);font-weight:var(--ibiz-panel-container-group-caption-font-weight);color:var(--ibiz-panel-container-group-caption-text-color)}.ibiz-panel-container-group-collapse>.ibiz-panel-container-group-content{display:block}.ibiz-panel-container-group-collapse.is-collapse>.ibiz-panel-container-group-content{display:none}.ibiz-panel-container-group-header{display:flex;height:var(--ibiz-panel-container-group-header-height);padding:var(--ibiz-panel-container-group-header-padding);margin:var(--ibiz-panel-container-group-header-margin);border-bottom:1px solid var(--ibiz-panel-container-group-header-border-color)}.ibiz-panel-container-group-header__left,.ibiz-panel-container-group-header__right{display:inline-block;width:50%}.ibiz-panel-container-group-header__right{text-align:right;display:flex;align-items:center;justify-content:flex-end}.ibiz-panel-container-group-content{width:100%;height:100%}.ibiz-panel-container-group-content__row{width:100%;height:100%}.ibiz-panel-container-group--show-header>.ibiz-panel-container-group-content{height:calc(100% - var(--ibiz-panel-container-group-header-height));padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}
@@ -0,0 +1,28 @@
1
+ import { IPanelContainer } from '@ibiz/model-core';
2
+ import { PropType } from 'vue';
3
+ import { PanelContainerGroupController } from './panel-container-group.controller';
4
+ import './panel-container-group.scss';
5
+ export declare const PanelContainerGroup: import("vue").DefineComponent<{
6
+ modelData: {
7
+ type: PropType<IPanelContainer>;
8
+ required: true;
9
+ };
10
+ controller: {
11
+ type: typeof PanelContainerGroupController;
12
+ required: true;
13
+ };
14
+ }, {
15
+ ns: import("@ibiz-template/core").Namespace;
16
+ captionText: import("vue").ComputedRef<any>;
17
+ changeCollapse: () => void;
18
+ isCollapse: import("vue").Ref<boolean>;
19
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
+ modelData: {
21
+ type: PropType<IPanelContainer>;
22
+ required: true;
23
+ };
24
+ controller: {
25
+ type: typeof PanelContainerGroupController;
26
+ required: true;
27
+ };
28
+ }>>, {}, {}>;
@@ -0,0 +1,107 @@
1
+ import { isVNode, ref, computed, resolveComponent, createVNode, defineComponent } from 'vue';
2
+ import { useNamespace } from '@ibiz-template/vue3-util';
3
+ import { PanelContainerGroupController } from './panel-container-group.controller.mjs';
4
+ import './panel-container-group.css';
5
+
6
+ "use strict";
7
+ function _isSlot(s) {
8
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
9
+ }
10
+ const PanelContainerGroup = /* @__PURE__ */ defineComponent({
11
+ name: "IBizPanelContainerGroup",
12
+ props: {
13
+ modelData: {
14
+ type: Object,
15
+ required: true
16
+ },
17
+ controller: {
18
+ type: PanelContainerGroupController,
19
+ required: true
20
+ }
21
+ },
22
+ setup(props) {
23
+ const ns = useNamespace("panel-container-group");
24
+ const isCollapse = ref(!props.controller.defaultExpansion);
25
+ const changeCollapse = () => {
26
+ if (!props.controller.disableClose) {
27
+ isCollapse.value = !isCollapse.value;
28
+ }
29
+ };
30
+ const captionText = computed(() => {
31
+ const {
32
+ captionItemName,
33
+ caption,
34
+ capLanguageRes
35
+ } = props.modelData;
36
+ if (captionItemName) {
37
+ return props.controller.data[captionItemName];
38
+ }
39
+ let text = caption;
40
+ if (capLanguageRes) {
41
+ text = ibiz.i18n.t(capLanguageRes.lanResTag, caption);
42
+ }
43
+ return text;
44
+ });
45
+ return {
46
+ ns,
47
+ captionText,
48
+ changeCollapse,
49
+ isCollapse
50
+ };
51
+ },
52
+ render() {
53
+ var _a, _b;
54
+ let _slot;
55
+ const classArr = [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass, this.ns.is("hidden", !this.controller.state.visible)];
56
+ if (this.modelData.showCaption === true) {
57
+ classArr.push(this.ns.m("show-header"));
58
+ classArr.push(this.ns.b("collapse"));
59
+ classArr.push(this.ns.is("collapse", this.isCollapse));
60
+ if (this.controller.disableClose) {
61
+ classArr.push(this.ns.bm("collapse", "disable-close"));
62
+ }
63
+ }
64
+ const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
65
+ const content = createVNode(resolveComponent("iBizRow"), {
66
+ "slot": "content",
67
+ "layout": this.modelData.layout
68
+ }, _isSlot(_slot = defaultSlots.map((slot) => {
69
+ const props = slot.props;
70
+ if (!props || !props.controller) {
71
+ return slot;
72
+ }
73
+ return createVNode(resolveComponent("iBizCol"), {
74
+ "layoutPos": props.modelData.layoutPos,
75
+ "state": props.controller.state
76
+ }, _isSlot(slot) ? slot : {
77
+ default: () => [slot]
78
+ });
79
+ })) ? _slot : {
80
+ default: () => [_slot]
81
+ });
82
+ let header = null;
83
+ if (this.modelData.showCaption) {
84
+ header = createVNode("div", {
85
+ "class": [this.ns.b("header")],
86
+ "onClick": this.changeCollapse
87
+ }, [createVNode("div", {
88
+ "class": [this.ns.be("header", "left")]
89
+ }, [createVNode("div", {
90
+ "class": [this.ns.e("caption"), ...this.controller.labelClass]
91
+ }, [this.captionText])]), createVNode("div", {
92
+ "class": [this.ns.be("header", "right")]
93
+ }, [this.modelData.titleBarCloseMode !== void 0 && this.modelData.titleBarCloseMode !== 0 && (this.isCollapse ? createVNode("ion-icon", {
94
+ "name": "caret-forward-sharp"
95
+ }, null) : createVNode("ion-icon", {
96
+ "name": "caret-down-sharp"
97
+ }, null))])]);
98
+ }
99
+ return createVNode("div", {
100
+ "class": classArr
101
+ }, [header, createVNode("div", {
102
+ "class": [this.ns.b("content")]
103
+ }, [content])]);
104
+ }
105
+ });
106
+
107
+ export { PanelContainerGroup };
@@ -0,0 +1,15 @@
1
+ import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
2
+ import { IPanelContainer } from '@ibiz/model-core';
3
+ /**
4
+ * 面板分组容器适配器
5
+ *
6
+ * @author lxm
7
+ * @date 2022-09-19 22:09:03
8
+ * @export
9
+ * @class PanelContainerGroupProvider
10
+ * @implements {EditorProvider}
11
+ */
12
+ export declare class PanelContainerGroupProvider implements IPanelItemProvider {
13
+ component: string;
14
+ createController(panelItem: IPanelContainer, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
15
+ }
@@ -0,0 +1,21 @@
1
+ import { PanelContainerGroupController } from './panel-container-group.controller.mjs';
2
+
3
+ "use strict";
4
+ var __defProp = Object.defineProperty;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __publicField = (obj, key, value) => {
7
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
+ return value;
9
+ };
10
+ class PanelContainerGroupProvider {
11
+ constructor() {
12
+ __publicField(this, "component", "IBizPanelContainerGroup");
13
+ }
14
+ async createController(panelItem, panel, parent) {
15
+ const c = new PanelContainerGroupController(panelItem, panel, parent);
16
+ await c.init();
17
+ return c;
18
+ }
19
+ }
20
+
21
+ export { PanelContainerGroupProvider };
@@ -0,0 +1,12 @@
1
+ import { PanelItemState } from '@ibiz-template/runtime';
2
+ /**
3
+ * 面板分组容器状态
4
+ *
5
+ * @author lxm
6
+ * @date 2023-02-07 06:04:27
7
+ * @export
8
+ * @class PanelContainerGroupState
9
+ * @extends {PanelItemState}
10
+ */
11
+ export declare class PanelContainerGroupState extends PanelItemState {
12
+ }
@@ -0,0 +1,7 @@
1
+ import { PanelItemState } from '@ibiz-template/runtime';
2
+
3
+ "use strict";
4
+ class PanelContainerGroupState extends PanelItemState {
5
+ }
6
+
7
+ export { PanelContainerGroupState };
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var customParseFormat = {exports: {}};
4
+
5
+ exports.__module = customParseFormat;
@@ -17,19 +17,13 @@ const IBizDateRangePicker = /* @__PURE__ */ vue.defineComponent({
17
17
  const editorModel = c.model;
18
18
  let valueSeparator = ",";
19
19
  let unlinkPanels = false;
20
- let startPlaceHolder = "";
21
- let endPlaceHolder = "";
20
+ const startPlaceHolder = editorModel.placeHolder ? editorModel.placeHolder.split(";")[0] || "" : "";
21
+ const endPlaceHolder = editorModel.placeHolder ? editorModel.placeHolder.split(";")[1] || "" : "";
22
22
  let rangeSeparator = "\u81F3";
23
23
  if (editorModel.editorParams) {
24
24
  if (editorModel.editorParams.valueSeparator) {
25
25
  valueSeparator = editorModel.editorParams.valueSeparator;
26
26
  }
27
- if (editorModel.editorParams.startPlaceHolder) {
28
- startPlaceHolder = editorModel.editorParams.startPlaceHolder;
29
- }
30
- if (editorModel.editorParams.endPlaceHolder) {
31
- endPlaceHolder = editorModel.editorParams.endPlaceHolder;
32
- }
33
27
  if (editorModel.editorParams.rangeSeparator) {
34
28
  rangeSeparator = editorModel.editorParams.rangeSeparator;
35
29
  }
@@ -20,8 +20,8 @@ const IBizNumberRangePicker = /* @__PURE__ */ vue.defineComponent({
20
20
  let min = -Infinity;
21
21
  let precision = 0;
22
22
  let valueSeparator = "-";
23
- let startPlaceHolder = "";
24
- let endPlaceHolder = "";
23
+ const startPlaceHolder = editorModel.placeHolder ? editorModel.placeHolder.split(";")[0] || "" : "";
24
+ const endPlaceHolder = editorModel.placeHolder ? editorModel.placeHolder.split(";")[1] || "" : "";
25
25
  let rangeSeparator = "~";
26
26
  if (editorModel.editorParams) {
27
27
  if (editorModel.editorParams.maxvalue) {
@@ -36,12 +36,6 @@ const IBizNumberRangePicker = /* @__PURE__ */ vue.defineComponent({
36
36
  if (editorModel.editorParams.valueSeparator) {
37
37
  valueSeparator = editorModel.editorParams.valueSeparator;
38
38
  }
39
- if (editorModel.editorParams.startPlaceHolder) {
40
- startPlaceHolder = editorModel.editorParams.startPlaceHolder;
41
- }
42
- if (editorModel.editorParams.endPlaceHolder) {
43
- endPlaceHolder = editorModel.editorParams.endPlaceHolder;
44
- }
45
39
  if (editorModel.editorParams.rangeSeparator) {
46
40
  rangeSeparator = editorModel.editorParams.rangeSeparator;
47
41
  }
@@ -6,8 +6,16 @@ require('./span.css');
6
6
  var ramda = require('ramda');
7
7
  var core = require('@ibiz-template/core');
8
8
  var dayjs = require('dayjs');
9
+ var customParseFormat = require('../../../node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/customParseFormat.cjs');
9
10
 
10
11
  "use strict";
12
+ dayjs.extend(customParseFormat.default);
13
+ function isValidDateFormat(dateStr, format) {
14
+ if (dateStr === format) {
15
+ return false;
16
+ }
17
+ return dayjs(dateStr, format, true).isValid();
18
+ }
11
19
  const IBizSpan = /* @__PURE__ */ vue.defineComponent({
12
20
  name: "IBizSpan",
13
21
  props: vue3Util.getSpanProps(),
@@ -58,7 +66,7 @@ const IBizSpan = /* @__PURE__ */ vue.defineComponent({
58
66
  text.value = dayjs(newVal).format(valueFormat);
59
67
  } else {
60
68
  const tempVal = dayjs(newVal).format(valueFormat);
61
- if (tempVal !== "Invalid Date") {
69
+ if (isValidDateFormat(tempVal, valueFormat)) {
62
70
  text.value = tempVal;
63
71
  } else {
64
72
  text.value = ibiz.util.text.format(`${newVal}`, valueFormat);
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _commonjsHelpers = require('../../../../../../_virtual/_commonjsHelpers.cjs');
6
+ var customParseFormat$2 = require('../../../../../../_virtual/customParseFormat.cjs');
7
+
8
+ var customParseFormat = customParseFormat$2.__module.exports;
9
+
10
+ (function (module, exports) {
11
+ !function(e,t){"object"=='object'&&"undefined"!='object'?module.exports=t():"function"==typeof undefined&&undefined.amd?undefined(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t();}(_commonjsHelpers.commonjsGlobal,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return (e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1);}],a:[i,function(e){this.afternoon=u(e,!0);}],S:[/\d/,function(e){this.milliseconds=100*+e;}],SS:[n,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=h("months"),n=(h("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f<a;f+=1){var h=s[f],u=d[h],c=u&&u[0],l=u&&u[1];s[f]=l?{regex:c,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,h=e.slice(r),u=o.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],h=!0===s[3],u=f||h,d=s[2];h&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,e);};}}));
12
+ } (customParseFormat$2.__module, customParseFormat$2.__module.exports));
13
+
14
+ var customParseFormatExports = customParseFormat$2.__module.exports;
15
+ var customParseFormat$1 = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(customParseFormatExports);
16
+
17
+ exports.default = customParseFormat$1;
@@ -19,6 +19,7 @@ var index$7 = require('./panel-index-view-search/index.cjs');
19
19
  var index$e = require('./panel-app-login-view/index.cjs');
20
20
  var index$f = require('./panel-remember-me/index.cjs');
21
21
  var index$8 = require('./index-actions/index.cjs');
22
+ var index$g = require('./panel-container-group/index.cjs');
22
23
  var navPosIndex_state = require('./nav-pos-index/nav-pos-index.state.cjs');
23
24
  var navPosIndex_controller = require('./nav-pos-index/nav-pos-index.controller.cjs');
24
25
  var panelButton_controller = require('./panel-button/panel-button.controller.cjs');
@@ -53,6 +54,7 @@ const IBizPanelComponents = {
53
54
  v.use(index$e.IBizPanelAppLoginView);
54
55
  v.use(index$f.IBizPanelRememberMe);
55
56
  v.use(index$8.IBizIndexActions);
57
+ v.use(index$g.IBizPanelContainerGroup);
56
58
  }
57
59
  };
58
60
 
@@ -1 +1 @@
1
- .ibiz-panel-button{--ibiz-panel-button-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-panel-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-panel-button-icon-max-height:var(--ibiz-width-icon-medium);padding:var(--ibiz-spacing-tight);overflow:hidden}.ibiz-panel-button .el-button{width:100%}.ibiz-panel-button .el-button .ibiz-panel-button-content{display:flex;align-items:center;justify-content:flex-start}.ibiz-panel-button .el-button .ibiz-panel-button-content i,.ibiz-panel-button .el-button .ibiz-panel-button-content img{display:inline-block;max-width:var(--ibiz-panel-button-icon-max-width);max-height:var(--ibiz-panel-button-icon-max-height)}.ibiz-panel-button .el-button .ibiz-panel-button-content .ibiz-icon+.ibiz-panel-button-content--caption{margin-left:var(--ibiz-panel-button-icon-margin)}.ibiz-panel-button.is-loading .el-button .ibiz-icon{display:none}
1
+ .ibiz-panel-button{--ibiz-panel-button-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-panel-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-panel-button-icon-max-height:var(--ibiz-width-icon-medium);width:100%;padding:var(--ibiz-spacing-tight);overflow:hidden}.ibiz-panel-button .el-button{width:100%}.ibiz-panel-button .el-button .ibiz-panel-button-content{display:flex;align-items:center;justify-content:flex-start}.ibiz-panel-button .el-button .ibiz-panel-button-content i,.ibiz-panel-button .el-button .ibiz-panel-button-content img{display:inline-block;max-width:var(--ibiz-panel-button-icon-max-width);max-height:var(--ibiz-panel-button-icon-max-height)}.ibiz-panel-button .el-button .ibiz-panel-button-content .ibiz-icon+.ibiz-panel-button-content--caption{margin-left:var(--ibiz-panel-button-icon-margin)}.ibiz-panel-button.is-loading .el-button .ibiz-icon{display:none}
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var runtime = require('@ibiz-template/runtime');
6
+ var vue3Util = require('@ibiz-template/vue3-util');
7
+ var panelContainerGroup_state = require('./panel-container-group.state.cjs');
8
+ var panelContainerGroup_provider = require('./panel-container-group.provider.cjs');
9
+ var panelContainerGroup_controller = require('./panel-container-group.controller.cjs');
10
+ var panelContainerGroup = require('./panel-container-group.cjs');
11
+
12
+ "use strict";
13
+ const IBizPanelContainerGroup = vue3Util.withInstall(
14
+ panelContainerGroup.PanelContainerGroup,
15
+ function(v) {
16
+ v.component(panelContainerGroup.PanelContainerGroup.name, panelContainerGroup.PanelContainerGroup);
17
+ runtime.registerPanelItemProvider(
18
+ "CONTAINER_CONTAINER_GROUP",
19
+ () => new panelContainerGroup_provider.PanelContainerGroupProvider()
20
+ );
21
+ }
22
+ );
23
+
24
+ exports.PanelContainerGroupState = panelContainerGroup_state.PanelContainerGroupState;
25
+ exports.PanelContainerGroupController = panelContainerGroup_controller.PanelContainerGroupController;
26
+ exports.IBizPanelContainerGroup = IBizPanelContainerGroup;
27
+ exports.default = IBizPanelContainerGroup;