@sankhyalabs/sankhyablocks 1.1.25 → 1.2.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/LICENSE +21 -21
- package/README.md +75 -75
- package/package.json +94 -49
- package/react/.keepfolder +1 -0
- package/dist/cjs/ApplicationUtils-05b74ee9.js +0 -39
- package/dist/cjs/AssetsUtils-7e3c38f9.js +0 -24
- package/dist/cjs/CSSVarsUtils-75ca9c64.js +0 -19
- package/dist/cjs/ez-action-chip.cjs.entry.js +0 -27
- package/dist/cjs/ez-application.cjs.entry.js +0 -26
- package/dist/cjs/ez-button_4.cjs.entry.js +0 -660
- package/dist/cjs/ez-calendar.cjs.entry.js +0 -223
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +0 -47
- package/dist/cjs/ez-combo-box.cjs.entry.js +0 -278
- package/dist/cjs/ez-date-input.cjs.entry.js +0 -102
- package/dist/cjs/ez-date-time-input.cjs.entry.js +0 -145
- package/dist/cjs/ez-dialog.cjs.entry.js +0 -89
- package/dist/cjs/ez-form.cjs.entry.js +0 -463
- package/dist/cjs/ez-grid.cjs.entry.js +0 -647
- package/dist/cjs/ez-icon.cjs.entry.js +0 -41
- package/dist/cjs/ez-label-chip.cjs.entry.js +0 -104
- package/dist/cjs/ez-modal_2.cjs.entry.js +0 -316
- package/dist/cjs/ez-number-input.cjs.entry.js +0 -86
- package/dist/cjs/ez-popover.cjs.entry.js +0 -120
- package/dist/cjs/ez-popup.cjs.entry.js +0 -48
- package/dist/cjs/ez-search.cjs.entry.js +0 -64
- package/dist/cjs/ez-tabselector.cjs.entry.js +0 -198
- package/dist/cjs/ez-text-area.cjs.entry.js +0 -114
- package/dist/cjs/ez-text-input.cjs.entry.js +0 -201
- package/dist/cjs/ez-time-input.cjs.entry.js +0 -118
- package/dist/cjs/ez-toast.cjs.entry.js +0 -44
- package/dist/cjs/ez-upload.cjs.entry.js +0 -356
- package/dist/cjs/index-682c98b2.js +0 -1771
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/sankhyablocks.cjs.js +0 -19
- package/dist/cjs/snk-application.cjs.entry.js +0 -7065
- package/dist/cjs/test-du.cjs.entry.js +0 -76
- package/dist/collection/collection-manifest.json +0 -47
- package/dist/collection/components/snk-application/snk-application.css +0 -5
- package/dist/collection/components/snk-application/snk-application.js +0 -495
- package/dist/collection/index.js +0 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +0 -158
- package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js +0 -23
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +0 -188
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +0 -25
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +0 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +0 -59
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +0 -30
- package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js +0 -66
- package/dist/collection/lib/utils/pesquisa.js +0 -16
- package/dist/collection/lib/utils/urlutils.js +0 -23
- package/dist/collection/lib/workspace/workspace.js +0 -7
- package/dist/components/ApplicationUtils.js +0 -37
- package/dist/components/AssetsUtils.js +0 -22
- package/dist/components/CSSVarsUtils.js +0 -17
- package/dist/components/ez-action-chip.js +0 -44
- package/dist/components/ez-application.js +0 -39
- package/dist/components/ez-button.js +0 -6
- package/dist/components/ez-button2.js +0 -105
- package/dist/components/ez-calendar.js +0 -6
- package/dist/components/ez-calendar2.js +0 -242
- package/dist/components/ez-check.js +0 -6
- package/dist/components/ez-check2.js +0 -94
- package/dist/components/ez-collapsible-box.js +0 -67
- package/dist/components/ez-combo-box.js +0 -6
- package/dist/components/ez-combo-box2.js +0 -311
- package/dist/components/ez-date-input.js +0 -135
- package/dist/components/ez-date-time-input.js +0 -179
- package/dist/components/ez-dialog.js +0 -124
- package/dist/components/ez-form.js +0 -6
- package/dist/components/ez-form2.js +0 -485
- package/dist/components/ez-grid.js +0 -738
- package/dist/components/ez-icon.js +0 -6
- package/dist/components/ez-icon2.js +0 -56
- package/dist/components/ez-label-chip.js +0 -125
- package/dist/components/ez-list.js +0 -6
- package/dist/components/ez-list2.js +0 -523
- package/dist/components/ez-modal.js +0 -6
- package/dist/components/ez-modal2.js +0 -82
- package/dist/components/ez-number-input.js +0 -115
- package/dist/components/ez-popover.js +0 -145
- package/dist/components/ez-popup.js +0 -67
- package/dist/components/ez-search.js +0 -100
- package/dist/components/ez-tabselector.js +0 -6
- package/dist/components/ez-tabselector2.js +0 -213
- package/dist/components/ez-text-area.js +0 -137
- package/dist/components/ez-text-input.js +0 -6
- package/dist/components/ez-text-input2.js +0 -223
- package/dist/components/ez-time-input.js +0 -153
- package/dist/components/ez-toast.js +0 -64
- package/dist/components/ez-upload.js +0 -382
- package/dist/components/grid-config.js +0 -6
- package/dist/components/grid-config2.js +0 -318
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/select-box.js +0 -6
- package/dist/components/select-box2.js +0 -47
- package/dist/components/snk-application.d.ts +0 -11
- package/dist/components/snk-application.js +0 -7094
- package/dist/components/test-du.js +0 -101
- package/dist/esm/ApplicationUtils-e0b6d857.js +0 -37
- package/dist/esm/AssetsUtils-6e6624dc.js +0 -22
- package/dist/esm/CSSVarsUtils-0787c3f3.js +0 -17
- package/dist/esm/ez-action-chip.entry.js +0 -23
- package/dist/esm/ez-application.entry.js +0 -22
- package/dist/esm/ez-button_4.entry.js +0 -653
- package/dist/esm/ez-calendar.entry.js +0 -219
- package/dist/esm/ez-collapsible-box.entry.js +0 -43
- package/dist/esm/ez-combo-box.entry.js +0 -274
- package/dist/esm/ez-date-input.entry.js +0 -98
- package/dist/esm/ez-date-time-input.entry.js +0 -141
- package/dist/esm/ez-dialog.entry.js +0 -85
- package/dist/esm/ez-form.entry.js +0 -459
- package/dist/esm/ez-grid.entry.js +0 -643
- package/dist/esm/ez-icon.entry.js +0 -37
- package/dist/esm/ez-label-chip.entry.js +0 -100
- package/dist/esm/ez-modal_2.entry.js +0 -311
- package/dist/esm/ez-number-input.entry.js +0 -82
- package/dist/esm/ez-popover.entry.js +0 -116
- package/dist/esm/ez-popup.entry.js +0 -44
- package/dist/esm/ez-search.entry.js +0 -60
- package/dist/esm/ez-tabselector.entry.js +0 -194
- package/dist/esm/ez-text-area.entry.js +0 -110
- package/dist/esm/ez-text-input.entry.js +0 -197
- package/dist/esm/ez-time-input.entry.js +0 -114
- package/dist/esm/ez-toast.entry.js +0 -40
- package/dist/esm/ez-upload.entry.js +0 -352
- package/dist/esm/index-35088a3f.js +0 -1740
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/sankhyablocks.js +0 -17
- package/dist/esm/snk-application.entry.js +0 -7061
- package/dist/esm/test-du.entry.js +0 -72
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-action-chip/ez-action-chip.css +0 -67
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-application/ez-application.css +0 -3
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-button/ez-button.css +0 -180
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-calendar/ez-calendar.css +0 -319
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-check/ez-check.css +0 -327
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +0 -162
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -217
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-input/ez-date-input.css +0 -49
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-time-input/ez-date-time-input.css +0 -44
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-dialog/ez-dialog.css +0 -527
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-form/ez-form.css +0 -5
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/ez-grid.css +0 -31
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +0 -129
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +0 -10
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-icon/ez-icon.css +0 -176
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-label-chip/ez-label-chip.css +0 -139
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-list/ez-list.css +0 -335
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-modal/ez-modal.css +0 -358
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-number-input/ez-number-input.css +0 -4
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popover/ez-popover.css +0 -44
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popup/ez-popup.css +0 -405
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-search/ez-search.css +0 -3
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -138
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-area/ez-text-area.css +0 -165
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-input/ez-text-input.css +0 -196
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-time-input/ez-time-input.css +0 -10
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-toast/ez-toast.css +0 -127
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-upload/ez-upload.css +0 -568
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/test-du/test-du.css +0 -3
- package/dist/sankhyablocks/index.esm.js +0 -0
- package/dist/sankhyablocks/p-0183d259.entry.js +0 -1
- package/dist/sankhyablocks/p-01f23a70.entry.js +0 -1
- package/dist/sankhyablocks/p-07c32f68.entry.js +0 -1
- package/dist/sankhyablocks/p-0f90499d.entry.js +0 -1
- package/dist/sankhyablocks/p-105724a3.entry.js +0 -1
- package/dist/sankhyablocks/p-2ac02d48.entry.js +0 -1
- package/dist/sankhyablocks/p-35364a97.entry.js +0 -1
- package/dist/sankhyablocks/p-3f6aa9a7.entry.js +0 -1
- package/dist/sankhyablocks/p-5f9af495.entry.js +0 -1
- package/dist/sankhyablocks/p-60967cf0.js +0 -1
- package/dist/sankhyablocks/p-6ce33b60.entry.js +0 -57
- package/dist/sankhyablocks/p-70ad6c16.entry.js +0 -1
- package/dist/sankhyablocks/p-710bfffe.entry.js +0 -1
- package/dist/sankhyablocks/p-735440c1.entry.js +0 -1
- package/dist/sankhyablocks/p-811b4b9d.js +0 -1
- package/dist/sankhyablocks/p-813fe4f7.js +0 -1
- package/dist/sankhyablocks/p-85a9446b.js +0 -2
- package/dist/sankhyablocks/p-89a1100f.entry.js +0 -1
- package/dist/sankhyablocks/p-8b543003.entry.js +0 -1
- package/dist/sankhyablocks/p-9750632b.entry.js +0 -1
- package/dist/sankhyablocks/p-a96272f7.entry.js +0 -1
- package/dist/sankhyablocks/p-ac8842e5.entry.js +0 -1
- package/dist/sankhyablocks/p-ba64cc41.entry.js +0 -1
- package/dist/sankhyablocks/p-c1ede043.entry.js +0 -1
- package/dist/sankhyablocks/p-d90ebb85.entry.js +0 -1
- package/dist/sankhyablocks/p-e17dfaae.entry.js +0 -1
- package/dist/sankhyablocks/p-e5355a29.entry.js +0 -1
- package/dist/sankhyablocks/p-ef04b633.entry.js +0 -1
- package/dist/sankhyablocks/p-f6db07fb.entry.js +0 -1
- package/dist/sankhyablocks/p-fcd9bd92.entry.js +0 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +0 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -44
- package/dist/types/components.d.ts +0 -66
- package/dist/types/index.d.ts +0 -1
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +0 -15
- package/dist/types/lib/http/data-fetcher/fetchers/application-config-fetcher.d.ts +0 -6
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +0 -12
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +0 -5
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +0 -2
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +0 -13
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +0 -6
- package/dist/types/lib/http/data-fetcher/state/LoadStateManager.d.ts +0 -23
- package/dist/types/lib/utils/pesquisa.d.ts +0 -2
- package/dist/types/lib/utils/urlutils.d.ts +0 -4
- package/dist/types/lib/workspace/workspace.d.ts +0 -4
- package/dist/types/stencil-public-runtime.d.ts +0 -1565
- package/loader/cdn.js +0 -3
- package/loader/index.cjs.js +0 -3
- package/loader/index.d.ts +0 -12
- package/loader/index.es2017.js +0 -3
- package/loader/index.js +0 -4
- package/loader/package.json +0 -10
- package/react/components.d.ts +0 -32
- package/react/components.js +0 -35
- package/react/components.js.map +0 -1
- package/react/react-component-lib/createComponent.d.ts +0 -10
- package/react/react-component-lib/createComponent.js +0 -75
- package/react/react-component-lib/createComponent.js.map +0 -1
- package/react/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/react/react-component-lib/createOverlayComponent.js +0 -109
- package/react/react-component-lib/createOverlayComponent.js.map +0 -1
- package/react/react-component-lib/index.d.ts +0 -2
- package/react/react-component-lib/index.js +0 -3
- package/react/react-component-lib/index.js.map +0 -1
- package/react/react-component-lib/interfaces.d.ts +0 -29
- package/react/react-component-lib/interfaces.js +0 -1
- package/react/react-component-lib/interfaces.js.map +0 -1
- package/react/react-component-lib/utils/attachProps.d.ts +0 -12
- package/react/react-component-lib/utils/attachProps.js +0 -98
- package/react/react-component-lib/utils/attachProps.js.map +0 -1
- package/react/react-component-lib/utils/case.d.ts +0 -2
- package/react/react-component-lib/utils/case.js +0 -7
- package/react/react-component-lib/utils/case.js.map +0 -1
- package/react/react-component-lib/utils/dev.d.ts +0 -2
- package/react/react-component-lib/utils/dev.js +0 -13
- package/react/react-component-lib/utils/dev.js.map +0 -1
- package/react/react-component-lib/utils/index.d.ts +0 -10
- package/react/react-component-lib/utils/index.js +0 -34
- package/react/react-component-lib/utils/index.js.map +0 -1
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { g as getSpritePath } from './AssetsUtils.js';
|
|
3
|
-
import { StringUtils } from '@sankhyalabs/core';
|
|
4
|
-
import { d as defineCustomElement$8 } from './ez-button2.js';
|
|
5
|
-
import { d as defineCustomElement$7 } from './ez-check2.js';
|
|
6
|
-
import { d as defineCustomElement$6 } from './ez-combo-box2.js';
|
|
7
|
-
import { d as defineCustomElement$5 } from './ez-icon2.js';
|
|
8
|
-
import { d as defineCustomElement$4 } from './ez-list2.js';
|
|
9
|
-
import { d as defineCustomElement$3 } from './ez-tabselector2.js';
|
|
10
|
-
import { d as defineCustomElement$2 } from './ez-text-input2.js';
|
|
11
|
-
import { d as defineCustomElement$1 } from './select-box2.js';
|
|
12
|
-
|
|
13
|
-
const gridConfigCss = ".sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid__group--font-family:var(--font-pattern, \"Sora\");--ez-grid__group--font-size:var(--text--medium, 14px);--ez-grid__group--font-weight:var(--text-weight--large, 600);--ez-grid__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.heigth-calc.sc-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:space-between;align-items:center;width:359px}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-grid-config{display:flex;margin:0;font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight);line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary)}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-grid-config{font-family:var(--ez-grid__group--font-family);font-size:var(--ez-grid__group--font-size);font-weight:var(--ez-grid__group--font-weight);padding-bottom:var(--ez-grid__group--padding-bottom)}";
|
|
14
|
-
|
|
15
|
-
const GridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.__registerHost();
|
|
19
|
-
this.configFinish = createEvent(this, "configFinish", 7);
|
|
20
|
-
this.configCancel = createEvent(this, "configCancel", 7);
|
|
21
|
-
this._columnListHistory = [];
|
|
22
|
-
this._orderListItems = [];
|
|
23
|
-
this._columListItems = [];
|
|
24
|
-
this.selectedTab = "Colunas";
|
|
25
|
-
this._selectedIndex = -1;
|
|
26
|
-
}
|
|
27
|
-
/* Creation Methods */
|
|
28
|
-
createOrderList() {
|
|
29
|
-
var _a;
|
|
30
|
-
let newList = [];
|
|
31
|
-
if (((_a = this._columnListHistory) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
32
|
-
this._columnListHistory.find(group => group.group === "Visíveis").items.forEach(column => {
|
|
33
|
-
let item = { label: column.label };
|
|
34
|
-
newList.push(item);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.columns.forEach(column => {
|
|
39
|
-
let item = { name: column.name, label: column.label };
|
|
40
|
-
if (!column.hidden) {
|
|
41
|
-
newList.push(item);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
this._orderListItems = newList;
|
|
46
|
-
}
|
|
47
|
-
createColumnList() {
|
|
48
|
-
let visibleGroup = {
|
|
49
|
-
group: 'Visíveis',
|
|
50
|
-
items: [],
|
|
51
|
-
};
|
|
52
|
-
let hiddenGroup = {
|
|
53
|
-
group: 'Ocultas',
|
|
54
|
-
items: [],
|
|
55
|
-
sort: 'ASC'
|
|
56
|
-
};
|
|
57
|
-
this.columns.forEach(column => {
|
|
58
|
-
let item = { label: column.label };
|
|
59
|
-
if (column.hidden) {
|
|
60
|
-
hiddenGroup.items.push(item);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
visibleGroup.items.push(item);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
if (this._columnListHistory.length <= 0) {
|
|
67
|
-
this._columListItems = [visibleGroup, hiddenGroup];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
buildColumnListSlot(item, group) {
|
|
71
|
-
return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + item + group, value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
|
|
72
|
-
}
|
|
73
|
-
buildOrderListSlot(item) {
|
|
74
|
-
let existingItem = this.columns.find(columnItem => columnItem.label === item.label);
|
|
75
|
-
return (h("div", null, h("select-box", { selectedOption: existingItem === null || existingItem === void 0 ? void 0 : existingItem.sort, key: 'select-box' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item); } })));
|
|
76
|
-
}
|
|
77
|
-
updateOrder(sortOrder, updatedItem) {
|
|
78
|
-
let newList = [...this.columns];
|
|
79
|
-
let newItem = newList.find(item => item.label === updatedItem.label);
|
|
80
|
-
if (newItem) {
|
|
81
|
-
newItem.sort = sortOrder.value;
|
|
82
|
-
}
|
|
83
|
-
this.columns = newList;
|
|
84
|
-
}
|
|
85
|
-
/* Actions Methods */
|
|
86
|
-
switchColumnGroup(ev, switchedItem) {
|
|
87
|
-
ev.stopPropagation();
|
|
88
|
-
let newList = [...this._columListItems];
|
|
89
|
-
if (ev.detail === true) {
|
|
90
|
-
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
91
|
-
let index = hiddenGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
92
|
-
if (index >= 0) {
|
|
93
|
-
hiddenGroup.items.splice(index, 1);
|
|
94
|
-
}
|
|
95
|
-
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
96
|
-
visibleGroup.items.push(switchedItem);
|
|
97
|
-
this._columListItems = newList;
|
|
98
|
-
this.createOrderList();
|
|
99
|
-
}
|
|
100
|
-
else if (ev.detail === false) {
|
|
101
|
-
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
102
|
-
let index = visibleGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
103
|
-
if (index >= 0) {
|
|
104
|
-
visibleGroup.items.splice(index, 1);
|
|
105
|
-
}
|
|
106
|
-
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
107
|
-
hiddenGroup.items.push(switchedItem);
|
|
108
|
-
this._columListItems = newList;
|
|
109
|
-
this.createOrderList();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
finish() {
|
|
113
|
-
let newColumnList = [];
|
|
114
|
-
this._columListItems.forEach(group => {
|
|
115
|
-
group.items.forEach(item => {
|
|
116
|
-
const baseColumn = this.columns.find(column => column.label === item.label);
|
|
117
|
-
let newColumnItem = Object.assign({}, baseColumn);
|
|
118
|
-
if (group.group === "Ocultas") {
|
|
119
|
-
newColumnItem.hidden = true;
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
newColumnItem.hidden = false;
|
|
123
|
-
}
|
|
124
|
-
newColumnList.push(newColumnItem);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
this._columnListHistory = [];
|
|
128
|
-
this.columns = newColumnList;
|
|
129
|
-
this.configFinish.emit(this.columns);
|
|
130
|
-
}
|
|
131
|
-
async locateColumn(evt, searchingText) {
|
|
132
|
-
var _a;
|
|
133
|
-
const hitEnter = evt.key === "Enter";
|
|
134
|
-
if (!searchingText) {
|
|
135
|
-
searchingText = (_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
136
|
-
}
|
|
137
|
-
let newSelected = -1;
|
|
138
|
-
if (this.selectedTab === "Ordenação das linhas") {
|
|
139
|
-
if (searchingText) {
|
|
140
|
-
const matchedIndexes = [];
|
|
141
|
-
let orderListDatasource;
|
|
142
|
-
await this._orderList.getList().then(listGroup => {
|
|
143
|
-
orderListDatasource = listGroup;
|
|
144
|
-
orderListDatasource.forEach((column, index) => {
|
|
145
|
-
if (this.compareWords(column, searchingText)) {
|
|
146
|
-
matchedIndexes.push(index);
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
if (matchedIndexes.length > 0) {
|
|
151
|
-
if (hitEnter) {
|
|
152
|
-
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
153
|
-
if (matchedIndexes[j] > this._selectedIndex) {
|
|
154
|
-
newSelected = matchedIndexes[j];
|
|
155
|
-
break;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
if (newSelected === -1) {
|
|
160
|
-
newSelected = matchedIndexes[0];
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
this._selectedIndex = newSelected;
|
|
164
|
-
let selectedColumn;
|
|
165
|
-
selectedColumn = orderListDatasource[newSelected];
|
|
166
|
-
if (selectedColumn) {
|
|
167
|
-
this._orderList.setSelection({ label: selectedColumn.label }, true);
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
this._orderList.setSelection(undefined);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
this._orderList.setSelection(undefined);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
if (searchingText) {
|
|
179
|
-
const matchedIndexes = [];
|
|
180
|
-
this.columns.forEach((column, index) => {
|
|
181
|
-
if (this.compareWords(column, searchingText)) {
|
|
182
|
-
matchedIndexes.push(index);
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
if (matchedIndexes.length > 0) {
|
|
186
|
-
if (hitEnter) {
|
|
187
|
-
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
188
|
-
if (matchedIndexes[j] > this._selectedIndex) {
|
|
189
|
-
newSelected = matchedIndexes[j];
|
|
190
|
-
break;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
if (newSelected === -1) {
|
|
195
|
-
newSelected = matchedIndexes[0];
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
this._selectedIndex = newSelected;
|
|
199
|
-
let selectedColumn = this.columns[newSelected];
|
|
200
|
-
if (selectedColumn) {
|
|
201
|
-
this._columnList.setSelection({ label: selectedColumn.label }, true);
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
this._columnList.setSelection(undefined);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
else {
|
|
208
|
-
this._columnList.setSelection(undefined);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
compareWords(column, searchingText) {
|
|
213
|
-
if (StringUtils.replaceAccentuatedChars(column.label).indexOf(StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
|
|
214
|
-
return true;
|
|
215
|
-
}
|
|
216
|
-
return false;
|
|
217
|
-
}
|
|
218
|
-
closeConfig() {
|
|
219
|
-
this._columnListHistory = [];
|
|
220
|
-
this.configCancel.emit();
|
|
221
|
-
}
|
|
222
|
-
/* Handlers */
|
|
223
|
-
handleTabChange(ev) {
|
|
224
|
-
var _a;
|
|
225
|
-
if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
|
|
226
|
-
if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
227
|
-
this._columnListHistory = this._columnList.dataSource;
|
|
228
|
-
this.createOrderList();
|
|
229
|
-
}
|
|
230
|
-
this.selectedTab = ev.target.selectedTab;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
handleColumnListChange(ev) {
|
|
234
|
-
var _a;
|
|
235
|
-
if (ev.detail) {
|
|
236
|
-
let visibleItems = (_a = ev.detail.find(group => group.group === "Visíveis")) === null || _a === void 0 ? void 0 : _a.items;
|
|
237
|
-
if (visibleItems) {
|
|
238
|
-
this._orderListItems = visibleItems;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
componentWillRender() {
|
|
243
|
-
var _a;
|
|
244
|
-
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
245
|
-
this.createColumnList();
|
|
246
|
-
this.createOrderList();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
componentDidRender() {
|
|
250
|
-
var _a;
|
|
251
|
-
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
252
|
-
this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
render() {
|
|
256
|
-
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", href: getSpritePath("search") })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "heigth-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
|
|
257
|
-
}
|
|
258
|
-
static get assetsDirs() { return ["../assets"]; }
|
|
259
|
-
static get style() { return gridConfigCss; }
|
|
260
|
-
}, [2, "grid-config", {
|
|
261
|
-
"selectedTab": [1025, "selected-tab"],
|
|
262
|
-
"columns": [1040]
|
|
263
|
-
}]);
|
|
264
|
-
function defineCustomElement() {
|
|
265
|
-
if (typeof customElements === "undefined") {
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
const components = ["grid-config", "ez-button", "ez-check", "ez-combo-box", "ez-icon", "ez-list", "ez-tabselector", "ez-text-input", "select-box"];
|
|
269
|
-
components.forEach(tagName => { switch (tagName) {
|
|
270
|
-
case "grid-config":
|
|
271
|
-
if (!customElements.get(tagName)) {
|
|
272
|
-
customElements.define(tagName, GridConfig);
|
|
273
|
-
}
|
|
274
|
-
break;
|
|
275
|
-
case "ez-button":
|
|
276
|
-
if (!customElements.get(tagName)) {
|
|
277
|
-
defineCustomElement$8();
|
|
278
|
-
}
|
|
279
|
-
break;
|
|
280
|
-
case "ez-check":
|
|
281
|
-
if (!customElements.get(tagName)) {
|
|
282
|
-
defineCustomElement$7();
|
|
283
|
-
}
|
|
284
|
-
break;
|
|
285
|
-
case "ez-combo-box":
|
|
286
|
-
if (!customElements.get(tagName)) {
|
|
287
|
-
defineCustomElement$6();
|
|
288
|
-
}
|
|
289
|
-
break;
|
|
290
|
-
case "ez-icon":
|
|
291
|
-
if (!customElements.get(tagName)) {
|
|
292
|
-
defineCustomElement$5();
|
|
293
|
-
}
|
|
294
|
-
break;
|
|
295
|
-
case "ez-list":
|
|
296
|
-
if (!customElements.get(tagName)) {
|
|
297
|
-
defineCustomElement$4();
|
|
298
|
-
}
|
|
299
|
-
break;
|
|
300
|
-
case "ez-tabselector":
|
|
301
|
-
if (!customElements.get(tagName)) {
|
|
302
|
-
defineCustomElement$3();
|
|
303
|
-
}
|
|
304
|
-
break;
|
|
305
|
-
case "ez-text-input":
|
|
306
|
-
if (!customElements.get(tagName)) {
|
|
307
|
-
defineCustomElement$2();
|
|
308
|
-
}
|
|
309
|
-
break;
|
|
310
|
-
case "select-box":
|
|
311
|
-
if (!customElements.get(tagName)) {
|
|
312
|
-
defineCustomElement$1();
|
|
313
|
-
}
|
|
314
|
-
break;
|
|
315
|
-
} });
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
export { GridConfig as G, defineCustomElement as d };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/* sankhyablocks custom elements */
|
|
2
|
-
|
|
3
|
-
import type { Components, JSX } from "../types/components";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Used to manually set the base path where assets can be found.
|
|
7
|
-
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
8
|
-
* such as "setAssetPath(import.meta.url)". Other options include
|
|
9
|
-
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
10
|
-
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
11
|
-
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
12
|
-
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
13
|
-
* will have to ensure the static assets are copied to its build directory.
|
|
14
|
-
*/
|
|
15
|
-
export declare const setAssetPath: (path: string) => void;
|
|
16
|
-
|
|
17
|
-
export interface SetPlatformOptions {
|
|
18
|
-
raf?: (c: FrameRequestCallback) => number;
|
|
19
|
-
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
20
|
-
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
21
|
-
}
|
|
22
|
-
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
23
|
-
|
|
24
|
-
export type { Components, JSX };
|
|
25
|
-
|
|
26
|
-
export * from '../types';
|
package/dist/components/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$2 } from './ez-combo-box2.js';
|
|
3
|
-
import { d as defineCustomElement$1 } from './ez-text-input2.js';
|
|
4
|
-
|
|
5
|
-
const selectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
|
|
6
|
-
|
|
7
|
-
const SelectBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
this.ezChange = createEvent(this, "ezChange", 7);
|
|
13
|
-
this.selectedOption = { value: "na", label: "N/A" };
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return (h("ez-combo-box", { class: "grid-config-combo inverted", label: "", value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, h("option", { value: "na" }, "N/A"), h("option", { value: "asc" }, "A-Z"), h("option", { value: "desc" }, "Z-A")));
|
|
17
|
-
}
|
|
18
|
-
static get assetsDirs() { return ["../assets"]; }
|
|
19
|
-
static get style() { return selectBoxCss; }
|
|
20
|
-
}, [1, "select-box", {
|
|
21
|
-
"selectedOption": [1, "selected-option"]
|
|
22
|
-
}]);
|
|
23
|
-
function defineCustomElement() {
|
|
24
|
-
if (typeof customElements === "undefined") {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const components = ["select-box", "ez-combo-box", "ez-text-input"];
|
|
28
|
-
components.forEach(tagName => { switch (tagName) {
|
|
29
|
-
case "select-box":
|
|
30
|
-
if (!customElements.get(tagName)) {
|
|
31
|
-
customElements.define(tagName, SelectBox);
|
|
32
|
-
}
|
|
33
|
-
break;
|
|
34
|
-
case "ez-combo-box":
|
|
35
|
-
if (!customElements.get(tagName)) {
|
|
36
|
-
defineCustomElement$2();
|
|
37
|
-
}
|
|
38
|
-
break;
|
|
39
|
-
case "ez-text-input":
|
|
40
|
-
if (!customElements.get(tagName)) {
|
|
41
|
-
defineCustomElement$1();
|
|
42
|
-
}
|
|
43
|
-
break;
|
|
44
|
-
} });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { SelectBox as S, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface SnkApplication extends Components.SnkApplication, HTMLElement {}
|
|
4
|
-
export const SnkApplication: {
|
|
5
|
-
prototype: SnkApplication;
|
|
6
|
-
new (): SnkApplication;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|