@dnncommunity/dnn-elements 0.24.0-beta.8 → 0.24.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dnn-checkbox.cjs.entry.js +4 -1
- package/dist/cjs/dnn-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-chevron.cjs.entry.js +1 -1
- package/dist/cjs/dnn-collapsible.cjs.entry.js +1 -1
- package/dist/cjs/dnn-color-input.cjs.entry.js +14 -14
- package/dist/cjs/dnn-color-picker.cjs.entry.js +3 -3
- package/dist/cjs/dnn-dropzone.cjs.entry.js +9 -9
- package/dist/cjs/dnn-fieldset.cjs.entry.js +4 -4
- package/dist/cjs/dnn-image-cropper.cjs.entry.js +2 -2
- package/dist/cjs/dnn-input.cjs.entry.js +7 -7
- package/dist/cjs/dnn-modal.cjs.entry.js +2 -2
- package/dist/cjs/dnn-monaco-editor.cjs.entry.js +1 -1
- package/dist/cjs/dnn-permissions-grid.cjs.entry.js +10 -10
- package/dist/cjs/dnn-permissions-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dnn-richtext.cjs.entry.js +2 -2
- package/dist/cjs/dnn-searchbox.cjs.entry.js +1 -1
- package/dist/cjs/dnn-select.cjs.entry.js +2 -2
- package/dist/cjs/dnn-sort-icon.cjs.entry.js +4 -4
- package/dist/cjs/dnn-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/dnn-textarea.cjs.entry.js +1 -1
- package/dist/cjs/dnn-toggle.cjs.entry.js +2 -2
- package/dist/cjs/dnn-treeview-item.cjs.entry.js +2 -2
- package/dist/cjs/dnn-vertical-overflow-menu.cjs.entry.js +2 -2
- package/dist/cjs/dnn-vertical-splitview.cjs.entry.js +4 -4
- package/dist/cjs/dnn.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.js +14 -2
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.js.map +1 -1
- package/dist/collection/components/dnn-chevron/dnn-chevron.js +1 -1
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.js +1 -1
- package/dist/collection/components/dnn-color-input/dnn-color-input.js +14 -14
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.js +3 -3
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.js +9 -9
- package/dist/collection/components/dnn-fieldset/dnn-fieldset.js +4 -4
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.js +2 -2
- package/dist/collection/components/dnn-input/dnn-input.js +7 -7
- package/dist/collection/components/dnn-modal/dnn-modal.js +2 -2
- package/dist/collection/components/dnn-monaco-editor/dnn-monaco-editor.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.css +1 -1
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js +9 -9
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js.map +1 -1
- package/dist/collection/components/dnn-progress-bar/dnn-progress-bar.js +1 -1
- package/dist/collection/components/dnn-richtext/dnn-richtext.js +2 -2
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.js +1 -1
- package/dist/collection/components/dnn-select/dnn-select.js +2 -2
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.js +4 -4
- package/dist/collection/components/dnn-tab/dnn-tab.js +2 -2
- package/dist/collection/components/dnn-tabs/dnn-tabs.js +1 -1
- package/dist/collection/components/dnn-textarea/dnn-textarea.js +1 -1
- package/dist/collection/components/dnn-toggle/dnn-toggle.js +2 -2
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.js +2 -2
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js +2 -2
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js +4 -4
- package/dist/dnn/dnn.esm.js +1 -1
- package/dist/dnn/dnn.esm.js.map +1 -1
- package/dist/dnn/{p-6e54915d.entry.js → p-03d3f2b1.entry.js} +2 -2
- package/dist/dnn/{p-96c850a8.entry.js → p-15c86eb3.entry.js} +2 -2
- package/dist/dnn/{p-350e4008.entry.js → p-16db9c38.entry.js} +2 -2
- package/dist/dnn/p-45e1c385.entry.js +2 -0
- package/dist/dnn/{p-2486e9db.entry.js.map → p-45e1c385.entry.js.map} +1 -1
- package/dist/dnn/{p-4574844c.entry.js → p-52ae7b31.entry.js} +2 -2
- package/dist/dnn/{p-90dd4620.entry.js → p-576364af.entry.js} +2 -2
- package/dist/dnn/{p-07a78c58.entry.js → p-5a244627.entry.js} +2 -2
- package/dist/dnn/{p-70b71aeb.entry.js → p-5b8e0904.entry.js} +2 -2
- package/dist/dnn/{p-50b6bb3f.entry.js → p-6643b369.entry.js} +2 -2
- package/dist/dnn/{p-7c4bcd14.entry.js → p-6659a086.entry.js} +2 -2
- package/dist/dnn/{p-8564bc60.entry.js → p-672fb82d.entry.js} +2 -2
- package/dist/dnn/{p-61dfb826.entry.js → p-69d5f883.entry.js} +2 -2
- package/dist/dnn/p-6e2adf25.entry.js +2 -0
- package/dist/dnn/p-6e2adf25.entry.js.map +1 -0
- package/dist/dnn/{p-b96b7c4a.entry.js → p-73fddf11.entry.js} +2 -2
- package/dist/dnn/p-9a06ad79.entry.js +2 -0
- package/dist/dnn/{p-535748e2.entry.js → p-a6982c8d.entry.js} +2 -2
- package/dist/dnn/{p-9ecfe643.entry.js → p-af925605.entry.js} +2 -2
- package/dist/dnn/{p-d7d6dffb.entry.js → p-bc1dd08b.entry.js} +2 -2
- package/dist/dnn/{p-21c5ef07.entry.js → p-cfbd1373.entry.js} +2 -2
- package/dist/dnn/{p-b553c159.entry.js → p-d67edea7.entry.js} +2 -2
- package/dist/dnn/{p-e23840d6.entry.js → p-dcf4505a.entry.js} +2 -2
- package/dist/dnn/p-ea2d6fd2.entry.js +2 -0
- package/dist/dnn/p-ea2d6fd2.entry.js.map +1 -0
- package/dist/dnn/{p-3b3475e0.entry.js → p-f107355e.entry.js} +2 -2
- package/dist/esm/dnn-checkbox.entry.js +4 -1
- package/dist/esm/dnn-checkbox.entry.js.map +1 -1
- package/dist/esm/dnn-chevron.entry.js +1 -1
- package/dist/esm/dnn-collapsible.entry.js +1 -1
- package/dist/esm/dnn-color-input.entry.js +14 -14
- package/dist/esm/dnn-color-picker.entry.js +3 -3
- package/dist/esm/dnn-dropzone.entry.js +9 -9
- package/dist/esm/dnn-fieldset.entry.js +4 -4
- package/dist/esm/dnn-image-cropper.entry.js +2 -2
- package/dist/esm/dnn-input.entry.js +7 -7
- package/dist/esm/dnn-modal.entry.js +2 -2
- package/dist/esm/dnn-monaco-editor.entry.js +1 -1
- package/dist/esm/dnn-permissions-grid.entry.js +10 -10
- package/dist/esm/dnn-permissions-grid.entry.js.map +1 -1
- package/dist/esm/dnn-progress-bar.entry.js +1 -1
- package/dist/esm/dnn-richtext.entry.js +2 -2
- package/dist/esm/dnn-searchbox.entry.js +1 -1
- package/dist/esm/dnn-select.entry.js +2 -2
- package/dist/esm/dnn-sort-icon.entry.js +4 -4
- package/dist/esm/dnn-tab_2.entry.js +3 -3
- package/dist/esm/dnn-textarea.entry.js +1 -1
- package/dist/esm/dnn-toggle.entry.js +2 -2
- package/dist/esm/dnn-treeview-item.entry.js +2 -2
- package/dist/esm/dnn-vertical-overflow-menu.entry.js +2 -2
- package/dist/esm/dnn-vertical-splitview.entry.js +4 -4
- package/dist/esm/dnn.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/dnn-checkbox/dnn-checkbox.d.ts +2 -1
- package/dist/types/components.d.ts +12 -0
- package/package.json +1 -1
- package/dist/dnn/p-2486e9db.entry.js +0 -2
- package/dist/dnn/p-3d1d6321.entry.js +0 -2
- package/dist/dnn/p-3d1d6321.entry.js.map +0 -1
- package/dist/dnn/p-5b15b44a.entry.js +0 -2
- package/dist/dnn/p-b5241c09.entry.js +0 -2
- package/dist/dnn/p-b5241c09.entry.js.map +0 -1
- /package/dist/dnn/{p-6e54915d.entry.js.map → p-03d3f2b1.entry.js.map} +0 -0
- /package/dist/dnn/{p-96c850a8.entry.js.map → p-15c86eb3.entry.js.map} +0 -0
- /package/dist/dnn/{p-350e4008.entry.js.map → p-16db9c38.entry.js.map} +0 -0
- /package/dist/dnn/{p-4574844c.entry.js.map → p-52ae7b31.entry.js.map} +0 -0
- /package/dist/dnn/{p-90dd4620.entry.js.map → p-576364af.entry.js.map} +0 -0
- /package/dist/dnn/{p-07a78c58.entry.js.map → p-5a244627.entry.js.map} +0 -0
- /package/dist/dnn/{p-70b71aeb.entry.js.map → p-5b8e0904.entry.js.map} +0 -0
- /package/dist/dnn/{p-50b6bb3f.entry.js.map → p-6643b369.entry.js.map} +0 -0
- /package/dist/dnn/{p-7c4bcd14.entry.js.map → p-6659a086.entry.js.map} +0 -0
- /package/dist/dnn/{p-8564bc60.entry.js.map → p-672fb82d.entry.js.map} +0 -0
- /package/dist/dnn/{p-61dfb826.entry.js.map → p-69d5f883.entry.js.map} +0 -0
- /package/dist/dnn/{p-b96b7c4a.entry.js.map → p-73fddf11.entry.js.map} +0 -0
- /package/dist/dnn/{p-5b15b44a.entry.js.map → p-9a06ad79.entry.js.map} +0 -0
- /package/dist/dnn/{p-535748e2.entry.js.map → p-a6982c8d.entry.js.map} +0 -0
- /package/dist/dnn/{p-9ecfe643.entry.js.map → p-af925605.entry.js.map} +0 -0
- /package/dist/dnn/{p-d7d6dffb.entry.js.map → p-bc1dd08b.entry.js.map} +0 -0
- /package/dist/dnn/{p-21c5ef07.entry.js.map → p-cfbd1373.entry.js.map} +0 -0
- /package/dist/dnn/{p-b553c159.entry.js.map → p-d67edea7.entry.js.map} +0 -0
- /package/dist/dnn/{p-e23840d6.entry.js.map → p-dcf4505a.entry.js.map} +0 -0
- /package/dist/dnn/{p-3b3475e0.entry.js.map → p-f107355e.entry.js.map} +0 -0
|
@@ -24,6 +24,9 @@ const DnnCheckbox = class {
|
|
|
24
24
|
this.name = undefined;
|
|
25
25
|
this.focused = false;
|
|
26
26
|
}
|
|
27
|
+
handleClick() {
|
|
28
|
+
this.changeState();
|
|
29
|
+
}
|
|
27
30
|
componentWillLoad() {
|
|
28
31
|
this.originalChecked = this.checked;
|
|
29
32
|
this.internals.setFormValue(this.checked);
|
|
@@ -68,7 +71,7 @@ const DnnCheckbox = class {
|
|
|
68
71
|
this.checkedchange.emit(this.checked);
|
|
69
72
|
}
|
|
70
73
|
render() {
|
|
71
|
-
return (index.h(index.Host, { key: '
|
|
74
|
+
return (index.h(index.Host, { key: '33f0a20c02ea3d1be40803102dca7298fc9f0a8d', tabIndex: this.focused ? -1 : 0, onFocus: () => this.button.focus(), onBlur: () => this.button.blur() }, index.h("button", { key: '7249f860fea2548cd7469daf88594ceaa36ad69c', ref: el => this.button = el, onFocus: () => this.focused = true, onBlur: () => this.focused = false, class: `icon ${this.checked}` }, index.h("div", { key: '8033ce35b1ad4733c5bc3151e183bcef5ad3608c', class: "unchecked" }, index.h("slot", { key: 'bd22365edda141a1d99f12197579ef08f145e298', name: "uncheckedicon" }, index.h("svg", { key: 'b8fdd87c069040ec31552c9c97fe9a73d6b1566b', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: '786778ac6170c2efe8e60399ce377cb3f4b81496', d: "M0 0h24v24H0z", fill: "none" }), index.h("path", { key: '2875985769c607626e17552bc86ee7eef8f1bd2b', d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" })))), index.h("div", { key: '3b1022f97690827381751638a2326806f6bbc914', class: "checked" }, index.h("slot", { key: 'd47bf5c9b8227f72f5af9d8a9497ef90fe9ed54a', name: "checkedicon" }, index.h("svg", { key: '579f8cedf788976a23929f230afe489be49056a3', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: 'a22e16649d8fcbae5f382f585ec44d877592d072', d: "M0 0h24v24H0z", fill: "none" }), index.h("path", { key: 'f851cbcf9ff4ea371c3abeb9fdfbd73199d95633', d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" })))), index.h("div", { key: 'dac2ba83db7a5f2a791db48ef4366c846ece0ac1', class: "intermediate" }, index.h("slot", { key: '99794fb6b191a7c61efcf77683125d5e38075347', name: "intermediateicon" }, index.h("svg", { key: 'b3c5fa7961169fd5ea9437346cd5246a3c3f2dc3', class: "undefined", xmlns: "http://www.w3.org/2000/svg", "enable-background": "new 0 0 24 24", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("g", { key: '53bfc9815a54ee36bd9cde2b35ca35bdb052a559' }, index.h("rect", { key: '6938a2a44ea6a23b3896ea7186d1109d2e06b4f8', fill: "none", height: "24", width: "24" })), index.h("g", { key: 'beea185432ee31b13f4368cd288195fda4798569' }, index.h("g", { key: '8c9b0636ce4685fd714ae76d2cd8e63ffdc0e590' }, index.h("g", { key: 'b6a8198cb9067af8bd439948e2a23e58b6ff29dc' }, index.h("path", { key: '5e0f01cc5c7033845f7f41f3721e903cc8436f91', d: "M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13H7v-2h10V13z" }))))))))));
|
|
72
75
|
}
|
|
73
76
|
static get formAssociated() { return true; }
|
|
74
77
|
get el() { return index.getElement(this); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dnn-checkbox.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,sjBAAsjB,CAAC;AAC9kB,0BAAe,cAAc;;MCchB,WAAW;;;;;;;;;;;uBAIyB,WAAW;+BAGvB,KAAK;qBAGhB,IAAI;;
|
|
1
|
+
{"file":"dnn-checkbox.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,sjBAAsjB,CAAC;AAC9kB,0BAAe,cAAc;;MCchB,WAAW;;;;;;;;;;;uBAIyB,WAAW;+BAGvB,KAAK;qBAGhB,IAAI;;uBAaT,KAAK;;IAJxB,WAAW;QACT,IAAI,CAAC,WAAW,EAAE,CAAC;KACpB;IASD,iBAAiB;QACf,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC;QACpC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC3C;IAGD,mBAAmB,CAAC,QAAsB,EAAE,QAAsB;QAChE,IAAI,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,IAAI,SAAS,EAAE;YACtD,IAAI,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACnC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SACnC;KACF;;IAGD,iBAAiB;QACf,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC;KACrC;IAEO,WAAW;QACjB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAC;YACxB,QAAQ,IAAI,CAAC,OAAO;gBAClB,KAAK,SAAS;oBACZ,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;oBAC3B,MAAM;gBACR,KAAK,WAAW,CAAC;gBACjB,KAAK,cAAc;oBACjB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;oBACzB,MAAM;aAGT;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtC,OAAO;SACR;QACD,QAAQ,IAAI,CAAC,OAAO;YAClB,KAAK,SAAS;gBACZ,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC;gBAC9B,MAAM;YACR,KAAK,cAAc;gBACjB,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;gBAC3B,MAAM;YACR,KAAK,WAAW;gBACd,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;gBACzB,MAAM;SAGT;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACvC;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDACH,QAAQ,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,EAC/B,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,EAClC,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAEhCD,qEACE,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,IAAI,EAClC,MAAM,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,KAAK,EAClC,KAAK,EAAE,QAAQ,IAAI,CAAC,OAAO,EAAE,IAE7BA,kEAAK,KAAK,EAAC,WAAW,IACpBA,mEAAM,IAAI,EAAC,eAAe,IACxBA,kEAAK,KAAK,EAAC,4BAA4B,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,IAACA,mEAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAE,EAAAA,mEAAM,CAAC,EAAC,4FAA4F,GAAE,CAAM,CAClP,CACH,EACNA,kEAAK,KAAK,EAAC,SAAS,IAClBA,mEAAM,IAAI,EAAC,aAAa,IACtBA,kEAAK,KAAK,EAAC,4BAA4B,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,IAACA,mEAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAE,EAAAA,mEAAM,CAAC,EAAC,qIAAqI,GAAE,CAAM,CAC3R,CACH,EACNA,kEAAK,KAAK,EAAC,cAAc,IACvBA,mEAAM,IAAI,EAAC,kBAAkB,IAC3BA,kEAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,uBAAmB,eAAe,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,IAACA,kEAAGA,mEAAM,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,GAAE,CAAI,EAAAA,kEAAGA,kEAAGA,kEAAGA,mEAAM,CAAC,EAAC,wGAAwG,GAAE,CAAI,CAAI,CAAI,CAAM,CACnV,CACH,CACC,CACJ,EACP;KACH;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/dnn-checkbox/dnn-checkbox.scss?tag=dnn-checkbox&encapsulation=shadow","src/components/dnn-checkbox/dnn-checkbox.tsx"],"sourcesContent":[":host {\n /**\n * @prop --focus-color: The color to outline the checkbox when hovered or focused, default to the dnn primary color.\n */\n --focus-color: var(--dnn-color-primary, #3792ED);\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n margin: 3px;\n}\nbutton{\n cursor: pointer; \n background-color: transparent;\n border: 0;\n padding: 0;\n margin: 0;\n outline: none;\n display: flex;\n justify-content: center;\n align-items: center;\n .unchecked, .checked, .intermediate{\n display: none;\n }\n &.checked .checked, &.unchecked .unchecked, &.intermediate .intermediate{\n display: block;\n }\n svg.undefined{\n opacity: 0.45;\n cursor: default;\n }\n &:focus-visible{\n box-shadow: 0 0 2px 2px var(--focus-color);\n }\n}\nlabel {\n cursor: pointer; \n}","import { Component, Element, Host, h, Prop, Event, EventEmitter, AttachInternals, Watch, State, Listen } from '@stencil/core';\nimport { CheckedState } from './types';\n\n/**\n * @slot @deprecated - The label for the checkbox - Obsolete, implement your own label.\n * @slot checkedicon - Allows overriding the default checked icon.\n * @slot uncheckedicon - Allows overriding the unchecked icon.\n * @slot intermediateicon - If intermadiate state is used, allows overriding its icon.\n */\n@Component({\n tag: 'dnn-checkbox',\n styleUrl: 'dnn-checkbox.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DnnCheckbox {\n @Element() el: HTMLDnnCheckboxElement;\n\n /** Defines if the checkbox is checked (true) or unchecked (false) or in an intermediate state (undefined) */\n @Prop({mutable: true}) checked: CheckedState = \"unchecked\";\n\n /** Defines if clicking the checkbox will go through the intermediate state between checked and unchecked (tri-state) */\n @Prop() useIntermediate: boolean = false;\n\n /** The value for this checkbox (not to be confused with its checked state). */\n @Prop() value: string = \"on\";\n\n /** The name to show in the formData (if using forms). */\n @Prop() name: string;\n\n /** Fires up when the checkbox checked property changes. */\n @Event() checkedchange: EventEmitter<\"checked\" | \"unchecked\" | \"intermediate\">;\n\n @Listen(\"click\", { capture: true })\n handleClick() {\n this.changeState();\n }\n\n @State() focused = false;\n \n @AttachInternals() internals: ElementInternals;\n \n private originalChecked: CheckedState;\n private button: HTMLButtonElement;\n\n componentWillLoad() {\n this.originalChecked = this.checked;\n this.internals.setFormValue(this.checked);\n }\n\n @Watch(\"checked\")\n handleCheckedChange(newValue: CheckedState, oldValue: CheckedState) {\n if (newValue !== oldValue && this.checked == \"checked\") {\n var data = new FormData();\n data.append(this.name, this.value);\n this.internals.setFormValue(data);\n }\n }\n\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n formResetCallback() {\n this.internals.setValidity({});\n this.checked = this.originalChecked;\n }\n\n private changeState(): void {\n if (!this.useIntermediate){\n switch (this.checked) {\n case \"checked\":\n this.checked = \"unchecked\";\n break;\n case \"unchecked\":\n case \"intermediate\":\n this.checked = \"checked\";\n break;\n default:\n break;\n }\n this.checkedchange.emit(this.checked);\n return;\n }\n switch (this.checked) {\n case \"checked\":\n this.checked = \"intermediate\";\n break;\n case \"intermediate\":\n this.checked = \"unchecked\";\n break;\n case \"unchecked\":\n this.checked = \"checked\";\n break;\n default:\n break;\n }\n this.checkedchange.emit(this.checked);\n }\n\n render() {\n return (\n <Host\n tabIndex={this.focused ? -1 : 0}\n onFocus={() => this.button.focus()}\n onBlur={() => this.button.blur()}\n >\n <button\n ref={el => this.button = el}\n onFocus={() => this.focused = true}\n onBlur={() => this.focused = false}\n class={`icon ${this.checked}`}\n >\n <div class=\"unchecked\">\n <slot name=\"uncheckedicon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"/></svg>\n </slot>\n </div>\n <div class=\"checked\">\n <slot name=\"checkedicon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"/></svg>\n </slot>\n </div>\n <div class=\"intermediate\">\n <slot name=\"intermediateicon\">\n <svg class=\"undefined\" xmlns=\"http://www.w3.org/2000/svg\" enable-background=\"new 0 0 24 24\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><g><g><path d=\"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13H7v-2h10V13z\"/></g></g></g></svg>\n </slot>\n </div>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -20,7 +20,7 @@ const DnnChevron = class {
|
|
|
20
20
|
this.changed.emit(newValue);
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (index.h(index.Host, { key: '
|
|
23
|
+
return (index.h(index.Host, { key: 'ee94a5e40e8df1d4c9b6816c0419aadd696167c0', tabIndex: this.focused ? -1 : 0, onFocus: () => this.button.focus(), onBlur: () => this.button.blur() }, index.h("button", { key: '229b59723b03b0f83cbaaa5952059fa2ad0aa265', ref: el => this.button = el, "aria-label": this.expanded ? this.collapseText : this.expandText, onClick: () => this.expanded = !this.expanded, onFocus: () => this.focused = true, onBlur: () => this.focused = false }, index.h("svg", { key: '286451ec61c1704a7ed4fcf7ca942327835feebc', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: 'aa1016e8bae25bceba593d7ffa3d37384b74dce6', d: "M0 0h24v24H0z", fill: "none" }), index.h("path", { key: '38829c57c40f2818ecaa1f464fc53c7104a244b5', d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" })))));
|
|
24
24
|
}
|
|
25
25
|
static get watchers() { return {
|
|
26
26
|
"expanded": ["handleExpandedChanged"]
|
|
@@ -54,7 +54,7 @@ const DnnCollapsible = class {
|
|
|
54
54
|
this.container.style.transition = `max-height ${this.transitionDuration}ms ease-in-out`;
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return (index.h(index.Host, { key: '
|
|
57
|
+
return (index.h(index.Host, { key: '76ba7514e40374f07a9908ea63555688b10a09f1' }, index.h("div", { key: 'cac471cb9f670f6eab23aa85caaf94530d9d689c', id: "container", class: this.expanded && "expanded", ref: el => this.container = el, style: { transition: `max-height ${this.transitionDuration}ms ease-in-out` } }, index.h("slot", { key: 'b1fb33ad2ce23cd1d5fceec433b759f523b83fd4' }))));
|
|
58
58
|
}
|
|
59
59
|
get el() { return index.getElement(this); }
|
|
60
60
|
static get watchers() { return {
|
|
@@ -100,20 +100,20 @@ const DnnColorInput = class {
|
|
|
100
100
|
}
|
|
101
101
|
render() {
|
|
102
102
|
var _a, _b, _c, _d, _e;
|
|
103
|
-
return (index.h(index.Host, { key: '
|
|
104
|
-
index.h("div", { key: '
|
|
105
|
-
index.h("div", { key: '
|
|
106
|
-
index.h("div", { key: '
|
|
107
|
-
index.h("button", { key: '
|
|
108
|
-
index.h("div", { key: '
|
|
109
|
-
index.h("dnn-tabs", { key: '
|
|
110
|
-
index.h("dnn-tab", { key: '
|
|
111
|
-
index.h("dnn-tab", { key: '
|
|
112
|
-
index.h("dnn-tab", { key: '
|
|
113
|
-
index.h("dnn-color-picker", { key: '
|
|
114
|
-
index.h("div", { key: '
|
|
115
|
-
index.h("div", { key: '
|
|
116
|
-
index.h("div", { key: '
|
|
103
|
+
return (index.h(index.Host, { key: '722affca46b0605ab63409bd938f5032ea45db18', tabIndex: this.focused ? -1 : 0, onFocus: () => this.button.focus(), onBlur: () => this.button.blur() }, index.h("dnn-fieldset", { key: 'c5d939a1bca9286398ff7d0fa652406bd4e6df3d', label: this.label, id: this.labelId, focused: this.focused, helpText: this.helpText }, index.h("div", { key: '7fca976fe59f26e560cb2a4412d01356391308c2', class: "inner-container" }, index.h("slot", { key: '3ec1651ac8ee6a4cdf40dc2d1bf9408aa611e559', name: "prefix" }), index.h("div", { key: '50b34dd1d2e8ff2d9999f87b9bd72ddfb577e5ee', class: "color-preview" }, this.useLightColor &&
|
|
104
|
+
index.h("div", { key: '5eb78240709025161e7011e040fddbe0fb8845da', style: { backgroundColor: `#${this.lightColor}` } }), index.h("div", { key: '18ae5db63545be3b824d445ee3045611de5fac47', style: { backgroundColor: `#${this.color}` } }), this.useDarkColor &&
|
|
105
|
+
index.h("div", { key: '88ea0a66d09361aece5753aa2f116c824ce78edb', style: { backgroundColor: `#${this.darkColor}` } }), this.useContrastColor &&
|
|
106
|
+
index.h("div", { key: 'fe2f71930826ffcff305e25a7c47986dff2b9c16', class: "contrast", style: { color: `#${this.contrastColor}` } }, index.h("hr", { key: 'eef74b6b8d5176128c0a487d82827b2c4ac6aa07', style: { color: `#${this.contrastColor}` } }), index.h("span", { key: '6615c23bb06c50fc9ba36fd74066f8344a125303' }, this.localization.contrast), index.h("hr", { key: '06421c535aa56fc8d8cefefd3087ce1d679679eb', style: { color: `#${this.contrastColor}` } }))), !this.readonly &&
|
|
107
|
+
index.h("button", { key: '01766ed62e5e3af7831585370be5e4f563fddd83', ref: el => this.button = el, "aria-labelledby": this.labelId, onClick: () => this.showPicker(), onFocus: () => this.focused = true, onBlur: () => this.focused = false }, index.h("svg", { key: '4b84477b59644d1c6d87c53d0143f7b4886e3a88', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960" }, index.h("path", { key: '05251a0087769115fc7e9fd62e08ade0d3997752', d: "M200-200h56l345-345-56-56-345 345v56Zm572-403L602-771l56-56q23-23 56.5-23t56.5 23l56 56q23 23 24 55.5T829-660l-57 57Zm-58 59L290-120H120v-170l424-424 170 170Zm-141-29-28-28 56 56-28-28Z" }))), index.h("slot", { key: '73fda889edbe3d375e4f5def837a06cd631494af', name: "suffix" }))), index.h("dnn-modal", { key: '48f0b7ecc4e187bf4d495725556f712c022094b2', ref: el => this.colorModal = el, backdropDismiss: false }, this.currentColor &&
|
|
108
|
+
index.h("div", { key: '21e84f6b00f197952622c1726813dc3164844b35', class: "modal-content" }, this.hasMultipleColors() &&
|
|
109
|
+
index.h("dnn-tabs", { key: 'a2d81adf564e9908c6586fb7fa551979f2e52e11' }, index.h("dnn-tab", { key: '9df0030996b43c88a28265fabc6d68e2d4f4e947', tabTitle: this.localization.normal }, index.h("dnn-color-picker", { key: 'b89397aaf0a6ef2e852585f63863f7424fd5801d', color: (_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.color, onColorChanged: e => this.currentColor = Object.assign(Object.assign({}, this.currentColor), { color: e.detail.hex }) })), this.useLightColor &&
|
|
110
|
+
index.h("dnn-tab", { key: '03cba449faada93d9fc113c0106ab24345279f94', tabTitle: this.localization.light }, index.h("dnn-color-picker", { key: 'f2364df9c8e56af1539c032b45ebb4be6cb67cc7', color: (_b = this.currentColor) === null || _b === void 0 ? void 0 : _b.lightColor, onColorChanged: e => this.currentColor = Object.assign(Object.assign({}, this.currentColor), { lightColor: e.detail.hex }) })), this.useDarkColor &&
|
|
111
|
+
index.h("dnn-tab", { key: '7ce2accefcb3a7c4d9159311883309bf6f6d8255', tabTitle: this.localization.dark }, index.h("dnn-color-picker", { key: '5d54a2ff099956daccb2b23dded73d6b6258d36a', color: (_c = this.currentColor) === null || _c === void 0 ? void 0 : _c.darkColor, onColorChanged: e => this.currentColor = Object.assign(Object.assign({}, this.currentColor), { darkColor: e.detail.hex }) })), this.useContrastColor &&
|
|
112
|
+
index.h("dnn-tab", { key: 'c00615ce72d44510a10d1664b95ea685300c48d0', tabTitle: this.localization.contrast }, index.h("dnn-color-picker", { key: 'fe4ff29caf538dd459db0478ad56d3b35cb16602', color: (_d = this.currentColor) === null || _d === void 0 ? void 0 : _d.contrastColor, onColorChanged: e => this.currentColor = Object.assign(Object.assign({}, this.currentColor), { contrastColor: e.detail.hex }) }))), !this.hasMultipleColors() &&
|
|
113
|
+
index.h("dnn-color-picker", { key: '0b016c6d2e48f00f018dd52f941a32498d2686f8', color: (_e = this.currentColor) === null || _e === void 0 ? void 0 : _e.color, onColorChanged: e => this.currentColor = Object.assign(Object.assign({}, this.currentColor), { color: e.detail.hex }) }), index.h("h3", { key: '3f7d790877eab2603b404742dddc91caa4558078' }, "Preview"), index.h("div", { key: 'e406cb06b6bb09e1f42343e8c7a152dcaa583761', class: "color-preview" }, this.useLightColor &&
|
|
114
|
+
index.h("div", { key: 'c6b3ad4d35ae6bb9bd2009b322c83c2a9b36e67e', style: { backgroundColor: `#${this.currentColor.lightColor}` } }), index.h("div", { key: 'ce5a6482f603b72e25505048addae3718da56292', style: { backgroundColor: `#${this.currentColor.color}` } }), this.useDarkColor &&
|
|
115
|
+
index.h("div", { key: 'ab08de041e1403eae14aeee40637cacd2b65a236', style: { backgroundColor: `#${this.currentColor.darkColor}` } }), this.useContrastColor &&
|
|
116
|
+
index.h("div", { key: 'e4a34aa10934332c83bb0446c881c307e263bcce', class: "contrast", style: { color: `#${this.currentColor.contrastColor}` } }, index.h("hr", { key: '8735a2c4427f9fdc8e112c0c395139d91fc4d336', style: { color: `#${this.currentColor.contrastColor}` } }), index.h("span", { key: '98e119f43c4a7c736e48940e59563a58a6c67df0' }, this.localization.contrast), index.h("hr", { key: 'fe6891f255cfbb9dd1662937e635a89f18ad853a', style: { color: `#${this.currentColor.contrastColor}` } }))), index.h("div", { key: '39dcff0c2dc1bf96d77c713f0163d11d21960e6d', class: "controls" }, index.h("dnn-button", { key: 'f86f95402a4495e0333710b14a14324ac751e630', reversed: true, onClick: () => this.colorModal.hide() }, this.localization.cancel), index.h("dnn-button", { key: '1b6558d0878a0e0e160c884677ba89484ca50ba2', onClick: () => this.saveColor() }, this.localization.confirm))))));
|
|
117
117
|
}
|
|
118
118
|
static get formAssociated() { return true; }
|
|
119
119
|
static get watchers() { return {
|
|
@@ -476,13 +476,13 @@ const DnnColorPicker = class {
|
|
|
476
476
|
const red = this.currentColor.red;
|
|
477
477
|
const green = this.currentColor.green;
|
|
478
478
|
const blue = this.currentColor.blue;
|
|
479
|
-
return (index.h(index.Host, { key: '
|
|
479
|
+
return (index.h(index.Host, { key: '3270ad5db8fe3d6e4b0b77b8eaaab7ca49f845a1', tabIndex: this.focused ? -1 : 0, onFocus: () => this.saturationBrightnessButton.focus(), onBlur: () => this.saturationBrightnessButton.blur() }, index.h("div", { key: 'b92a03280c86835af30df24364f9923627f77ea9', class: "dnn-color-picker" }, index.h("div", { key: '5e23ef4f0678d73e3908d7d81aa57f1e9f8a75dc', class: "dnn-color-sliders" }, index.h("div", { key: '416fcb88cd209236acb5299719b2148c741beba8', class: "dnn-color-s-b", ref: (element) => this.saturationLightnessBox = element, style: { backgroundColor: `hsl(${hue},100%,50%)` }, onMouseDown: this.handleSaturationLightnessMouseDown.bind(this) }, index.h("button", { key: '1a4ae20c8308ec5132da58ccaeb6420b737588c7', ref: el => this.saturationBrightnessButton = el, class: "dnn-s-b-picker", "aria-label": "Press up or down to adjust lightness, left or right to adjust saturation, hold shift to move by 10%", role: "slider", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuetext": `Saturation: ${Math.round(this.currentColor.saturation * 100)}%, Lightness: ${Math.round(this.currentColor.lightness * 100)}%`, style: {
|
|
480
480
|
left: Math.round(saturation * 100) + "%",
|
|
481
481
|
bottom: Math.round(lightness * 100) + "%"
|
|
482
|
-
}, onKeyDown: (e) => this.handleSaturationLightnessKeyDown(e), onFocus: () => this.focused = true, onBlur: () => this.focused = false })), index.h("div", { key: '
|
|
482
|
+
}, onKeyDown: (e) => this.handleSaturationLightnessKeyDown(e), onFocus: () => this.focused = true, onBlur: () => this.focused = false })), index.h("div", { key: '1ac761c0b53f096f585bba62eb63048aa00ec244', class: "dnn-color-bar" }, index.h("div", { key: '67e90b41602a2667c4820cf77e855d12309b71f1', class: "dnn-color-result", style: {
|
|
483
483
|
backgroundColor: '#' + this.getHex(),
|
|
484
484
|
boxShadow: "0 0 2px 1px " + "#" + this.getContrast()
|
|
485
|
-
} }), index.h("div", { key: '
|
|
485
|
+
} }), index.h("div", { key: '4b6593671043f63f14641f3335ccf39b04b0fe5d', class: "dnn-color-hue", ref: (element) => this.hueRange = element, onMouseDown: this.handleHueMouseDown.bind(this) }, index.h("button", { key: '01c59ab72393b1d7dfef31196adfc6d10e68ceb0', class: "dnn-hue-picker", "aria-label": "Press left or right to adjust hue, hold shift to move by 10 degrees", role: "slider", "aria-valuemin": "0", "aria-valuemax": "359", "aria-valuenow": Math.round(hue), style: { left: (hue / 359 * 100).toString() + "%" }, onKeyDown: (e) => this.handleHueKeyDown(e) })))), index.h("div", { key: 'f2cd5649fb1788700a1e40bc28d0293e6522df02', class: "dnn-color-fields" }, index.h("div", { key: '261f1f240094a62d976cbddcb5d1d53772776ddc', class: "dnn-rgb-color-fields", style: { display: this.rgbDisplay } }, index.h("div", { key: '61416a06bff45ac743e03a117f932f217f02c1c0', class: "dnn-rgb-color-field" }, index.h("label", { key: '27b5b1742d903aeb5b5f3f2edcf69b29c32eab39' }, "R"), index.h("input", { key: '86b35afd62520a4c1b712ced31ed079e3e5394f7', type: "number", min: "0", max: "255", step: "1", class: "red", value: red, "aria-label": "red value", onChange: (e) => this.handleComponentValueChange(e, 'red') })), index.h("div", { key: '69115f117b7d0f619765b2a01503ad17448263c5', class: "dnn-rgb-color-field" }, index.h("label", { key: '6f1870bd898b2f7d061075dedac54a6f81bd4ee0' }, "G"), index.h("input", { key: 'e48f0a48c8a4cf69a4893cb8d8c74084bfc3044c', type: "number", min: "0", max: "255", class: "green", value: green, "aria-label": "green value", onChange: (e) => this.handleComponentValueChange(e, 'green') })), index.h("div", { key: 'c6ef7f77a1c34a9960c72a618d54391c53f74f4d', class: "dnn-rgb-color-field" }, index.h("label", { key: 'bb4e309c363171764bde998fe58430b4eb6ebf4f' }, "B"), index.h("input", { key: 'e9dfe614313e271b45ca0c60ba26655d59f39447', type: "number", min: "0", max: "255", class: "blue", value: blue, "aria-label": "blue value", onChange: (e) => this.handleComponentValueChange(e, 'blue') })), index.h("div", { key: '29ef67398fc1522c0564f62033039f77b49edc2b', class: "dnn-color-mode-switch" }, index.h("button", { key: 'd0367da5c40215fbd1f3eadf10dd6bca08a963a6', id: "rgb-switch", onClick: this.switchColorMode.bind(this), "aria-label": "switch to hexadecimal value entry" }, index.h("svg", { key: '53cb5cdae4143c70e8240990d842ea4457d7ae14', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: '0271d81c2bd99e134803b4edab2a7272a6020d87', d: "M0 0h24v24H0z", fill: "none" }), index.h("path", { key: 'd25d380ab10e7109238476344c6b5c638a4f96ca', d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" }))))), index.h("div", { key: '6698763d1fbb8d2c1da28e0d42f6be753b14c4c8', class: "dnn-hsl-color-fields", style: { display: this.hslDisplay } }, index.h("div", { key: '28173e72c4e7fee625fca382b80f824b9488cfb7', class: "dnn-hsl-color-field" }, index.h("label", { key: 'dfdb1809df786e1ff923e8c3e3161f53654ba685' }, "H"), index.h("input", { key: 'd9e7c99eb2a50c938e6021bf49131309507e96b1', type: "number", min: "0", max: "359", step: 1, value: Math.round(hue), "aria-label": "Hue", onChange: (e) => this.handleHSLChange(e, 'hue') })), index.h("div", { key: 'a4fdbdd1f043a550d1d0b8ab8a0b7f04994cf8d5', class: "dnn-hsl-color-field" }, index.h("label", { key: 'c96a8928f7f36e403e24938c5cec79aa74b00a25' }, "S"), index.h("input", { key: '7c1bb89131a0cf7f3062f2e8cf73c14fd2932db8', type: "number", min: "0", max: "100", step: 1, value: Math.round(saturation * 100), "aria-label": "Saturation", onChange: (e) => this.handleHSLChange(e, 'saturation') })), index.h("div", { key: '067f8b87d94bb6e7d7a95ff043282b2e049898a0', class: "dnn-hsl-color-field" }, index.h("label", { key: 'f77c69f8e0fbef9b25692acca6ed5c3007a1b53c' }, "L"), index.h("input", { key: 'b65b95e1fd5926a44f83f219f2bb96c89c489a28', type: "number", min: "0", max: "100", step: 1, value: Math.round(lightness * 100), "aria-label": "Lightness", onChange: (e) => this.handleHSLChange(e, 'lightness') })), index.h("div", { key: 'c0cfb39dcf480e86355a0c87e416fa054aa9f4e5', class: "dnn-color-mode-switch" }, index.h("button", { key: '8c19afde9cfb3b8333a1313e55395b92f34dec2c', id: "hsl-switch", onClick: this.switchColorMode.bind(this), "aria-label": "Switch to red, green, blue entry mode" }, index.h("svg", { key: '54ccf0a690d6e2a102c33a0dbc1d08cf99c11ed0', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: '87f25bab11448e091e4427a82e40e44956aa83a1', d: "M0 0h24v24H0z", fill: "none" }), index.h("path", { key: '3a83e2cf45ee881ae05fb73e2077289d73a140af', d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" }))))), index.h("div", { key: '0b7a592d2230136808b34ed36e5c84ee56328e53', class: "dnn-hex-color-fields", style: { display: this.hexDisplay } }, index.h("div", { key: 'aa832989de6451ea2abdb0cf5282a99b2ba0a6eb', class: "dnn-hex-color-field" }, index.h("label", { key: 'f5319d53261202307f5984172143e440995427e9' }, "HEX"), index.h("div", { key: 'e68434340c0b59d6fb24f0c509c861b948842b68', class: "hex-input" }, index.h("input", { key: 'fb40e1d785cfcc29b43a788d6ef9fd447ca01401', type: "text", "aria-label": "Hexadecimal value", value: this.getHex(), onChange: e => this.handleHexChange(e.target.value) }), index.h("button", { key: 'e6a21c14dc0d7005d92538014031e6675becea5e', class: "copy", "aria-label": "copy value" }, index.h("svg", { key: 'beb4d7d7f5a97f27db768b29e478949ba84a23d7', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: '3376034e2172767665169ad4476f025b97746665', d: "M0 0h24v24H0z", fill: "none" }), index.h("path", { key: 'd0bbb664e9d5c77a9a5a9c155e90e4666b6168bf', d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }))))), index.h("div", { key: '20aee791254a22327a58a8bc570c25cf0ea436a7', class: "dnn-color-mode-switch" }, index.h("button", { key: '2b978bff44ce5a51461ed03d4f1df40c0e77c5af', id: "hex-switch", onClick: this.switchColorMode.bind(this), "aria-label": "Switch to hue saturation lightness values" }, index.h("svg", { key: '34eef4f8d254a78519a8ce254d97fbc2f5d3c728', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: 'dd50ec024953f5f09fd593f2fe181bcf220fd7a5', d: "M0 0h24v24H0z", fill: "none" }), index.h("path", { key: '5817f1b8f93fec23a215124272a084a4d7cef286', d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" })))))))));
|
|
486
486
|
}
|
|
487
487
|
get el() { return index.getElement(this); }
|
|
488
488
|
static get watchers() { return {
|
|
@@ -198,25 +198,25 @@ const DnnDropzone = class {
|
|
|
198
198
|
}
|
|
199
199
|
render() {
|
|
200
200
|
var _a, _b, _c, _d, _e, _f;
|
|
201
|
-
return (index.h(index.Host, { key: '
|
|
201
|
+
return (index.h(index.Host, { key: 'e8cb239b37d1be0f7c41240465cd6a158ab0097b', ref: e => this.dropzone = e, class: "dropzone", onDragOver: e => this.handleDragOver(e), onDrop: e => this.handleDrop(e), onDragLeave: () => this.dropzone.classList.remove("dropping"), tabIndex: this.focused ? -1 : 0, onFocus: () => this.uploadLabel.focus(), onBlur: () => this.uploadLabel.blur() }, !this.takingPicture &&
|
|
202
202
|
[
|
|
203
|
-
index.h("p", { key: '
|
|
204
|
-
index.h("p", { key: '
|
|
203
|
+
index.h("p", { key: '0a6f9cdb3eef3449dc2092cd6ed5d32e431f3c2d' }, (_a = this.localResx) === null || _a === void 0 ? void 0 : _a.dragAndDropFile),
|
|
204
|
+
index.h("p", { key: '1179185c6fa4615e9f3ad362e7f7b663c80ee8f9' }, "- ", (_b = this.localResx) === null || _b === void 0 ? void 0 :
|
|
205
205
|
_b.or, " -"),
|
|
206
|
-
index.h("label", { key: '
|
|
206
|
+
index.h("label", { key: '15a2262c638dd5b4b2f5c0d51fb4d361ccdc98cc', class: "upload-file", tabIndex: 0, onKeyDown: e => this.handleUploadKeyDown(e), ref: el => this.uploadLabel = el, onFocus: () => this.focused = true, onBlur: () => this.focused = false }, index.h("input", { key: '8890c891d3805213887403528b9e8d8661f81100', type: "file", ref: el => this.fileInput = el, onChange: e => this.handleUploadButton(e.target) }), index.h("span", { key: 'e4b5083f873c27f7550f29ee5d6f433a4e79ab58' }, index.h("svg", { key: '3f3d9e3e491ab3159767da319d08b3a07c08a65d', xmlns: "http://www.w3.org/2000/svg", "enable-background": "new 0 0 24 24", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("g", { key: 'd88531469503abfc3b33940f7f690545a6bd7c47' }, index.h("rect", { key: '67cfd319af430b66b2c3c4db9cf043b5ca8b44d2', fill: "none", height: "24", width: "24" })), index.h("g", { key: '929ff336aa3a765c6b0ae3804af479152f15580e' }, index.h("path", { key: '423d42dd1312a6e92e58112c9abb17c9747c5edc', d: "M5,20h14v-2H5V20z M5,10h4v6h6v-6h4l-7-7L5,10z" })))), "\u00A0", (_c = this.localResx) === null || _c === void 0 ? void 0 :
|
|
207
207
|
_c.uploadFile),
|
|
208
208
|
this.canTakeSnapshots &&
|
|
209
209
|
[
|
|
210
|
-
index.h("p", { key: '
|
|
210
|
+
index.h("p", { key: '79d4eba604972b765af99a259444017effc430d0' }, "- ", (_d = this.localResx) === null || _d === void 0 ? void 0 :
|
|
211
211
|
_d.or, " -"),
|
|
212
|
-
index.h("button", { key: '
|
|
212
|
+
index.h("button", { key: '181c7f2c3e0fe10a0e442f671b585d7fd52240e4', onClick: () => this.takeSnapshot() }, index.h("svg", { key: 'a7895b7adac1558f45ccccc87f449bb2ffec557c', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: '23128d601f71f2e8cd8af075fe74de8e7f67e92c', d: "M0 0h24v24H0z", fill: "none" }), index.h("circle", { key: 'a082e32a026bfa4586fe203783cbd585e244f774', cx: "12", cy: "12", r: "3.2" }), index.h("path", { key: '8f1b6b43558cb3ad0e375b01f71da751d88afea8', d: "M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z" })), (_e = this.localResx) === null || _e === void 0 ? void 0 :
|
|
213
213
|
_e.takePicture)
|
|
214
214
|
]
|
|
215
215
|
], this.takingPicture &&
|
|
216
|
-
index.h("div", { key: '
|
|
216
|
+
index.h("div", { key: '48ccb4be518d323659462b075f0ee2bf6d7ae052', class: "video-preview" }, index.h("video", { key: '26659446b8ac3c291aa89352c19515978e0596f8', ref: e => this.videoPreview = e }), index.h("button", { key: '9b7699d716d94611d4b3ae7590a5e76efe4f8b83', onClick: () => this.applySnapshot() }, index.h("svg", { key: '5576687f6e6592825ff4d89e12cc8da2cacf7b49', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: 'fb833f77e4803eb29d6eb68a92e1a9de775c756b', d: "M0 0h24v24H0z", fill: "none" }), index.h("circle", { key: '0abc995fbda0ce7af15004867d8cced2e153577d', cx: "12", cy: "12", r: "3.2" }), index.h("path", { key: 'd3045fa3aecc259628598a2ed67c38a7721f1148', d: "M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z" })), "\u00A0", (_f = this.localResx) === null || _f === void 0 ? void 0 :
|
|
217
217
|
_f.capture)), this.fileTooLarge &&
|
|
218
|
-
index.h("div", { key: '
|
|
219
|
-
index.h("div", { key: '
|
|
218
|
+
index.h("div", { key: 'b66d8d9f21a9948595df5217f9745e8ecc08f779', class: 'error' }, index.h("p", { key: '080b2779e7656c953d77a4b9719cc4984890ec87' }, this.localResx.uploadSizeTooLarge, index.h("br", { key: '683ecdcf26529260f25e16988be94a71d570c61f' }), this.localResx.fileSizeLimit.replace("{0}", stringUtilities.getReadableFileSizeString(this.maxFileSize)))), this.invalidExtension &&
|
|
219
|
+
index.h("div", { key: '3b48bf8ba1e235d2f4fb3e2192cf18735dfa35df', class: 'error' }, index.h("p", { key: 'c0b42d27ae92e7d38d48fe9ac86c70d9d657b8c7' }, this.localResx.invalidExtension, index.h("br", { key: '1e0995b7bb02db676e56840e5692b36e2ca5191a' }), this.getInvalidExtensionsMessage()))));
|
|
220
220
|
}
|
|
221
221
|
static get formAssociated() { return true; }
|
|
222
222
|
static get watchers() { return {
|
|
@@ -65,10 +65,10 @@ const DnnFieldset = class {
|
|
|
65
65
|
return classes.join(" ");
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
return (index.h(index.Host, { key: '
|
|
69
|
-
index.h("label", { key: '
|
|
70
|
-
index.h("div", { key: '
|
|
71
|
-
index.h("div", { key: '
|
|
68
|
+
return (index.h(index.Host, { key: 'f97ae39c92d41cd55c68e49726d2d03cd95d5a4e' }, index.h("div", { key: '428c954731215899b0b8d85132c93d2452dabf1d', class: this.getContainerClasses() }, this.label &&
|
|
69
|
+
index.h("label", { key: '1430170d4d130c7174f4bb369520ecff89e42b23' }, index.h("slot", { key: '381665dc530db579968d89fe826f081b4d7c0957', name: "label-prefix" }), this.label, index.h("slot", { key: '513395e461546b1b3cf214c59f4afe5ba580ffd9', name: "label-suffix" })), index.h("div", { key: '621ddedaf8da8d3e79346778a70e9de7039483fe', class: "resizer", style: { resize: this.resizable, overflow: this.resizable == "none" ? "visible" : "auto" } }, index.h("div", { key: '42b3cd52e1a8182abfc3eba043ab79b80f15d310', class: "inner-container" }, index.h("slot", { key: 'a4225c9af1d7e2fd613e0b3b1975c53ef98e8448' })))), this.invalid && this.customValidityMessage &&
|
|
70
|
+
index.h("div", { key: '917c3db73b9eef42934152494cf0cb03e94082df', class: "error-message" }, this.customValidityMessage), !this.invalid &&
|
|
71
|
+
index.h("div", { key: '5300002ff371d1b32292831e7849db4d985059c1', class: "help-text" }, this.helpText)));
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
DnnFieldset.style = DnnFieldsetStyle0;
|
|
@@ -443,7 +443,7 @@ const DnnImageCropper = class {
|
|
|
443
443
|
}
|
|
444
444
|
render() {
|
|
445
445
|
var _a, _b;
|
|
446
|
-
return (index.h(index.Host, { key: '
|
|
446
|
+
return (index.h(index.Host, { key: '381246ee476b95d7869bbdaef99e4032aabefb3a', tabIndex: this.focused ? -1 : 0, onFocus: () => this.inputField.focus(), onBlur: () => this.inputField.blur() }, index.h("canvas", { key: '86c84108ff8438cc20e840d6f6ea14597b547c7f', ref: el => this.canvas = el }), index.h("div", { key: '709fcd6dbd4385a3b46b7621367a3448aa3aee30', class: "view", ref: el => this.hasPictureView = el }, index.h("div", { key: 'd5ebd8b8ba823e62d6702254fcd4bd5d57439fe3', class: "cropper" }, index.h("img", { key: '85c591654d1c794be00067d105b04e09d7219d7c', ref: el => this.image = el }), index.h("div", { key: 'e21d5065734dddac7093b51c409fcd452ed079c6', class: "backdrop" }), index.h("div", { key: '72ae44e6cbdcc1ac76751fb82a7be59eed5bb5d1', class: "crop", ref: e => this.crop = e, onMouseDown: this.handleCropMouseDown, onTouchStart: this.handleCropMouseDown }, index.h("div", { key: '1da722312999868d8c47af1608f918cbf4478713', class: "nw" }), index.h("div", { key: '4e5fb43ff7e69bf8b498391317df0fc5716d2999', class: "ne" }), index.h("div", { key: '4b2eba3a46f7514b3d9e446d6dc27d6102554fd4', class: "se" }), index.h("div", { key: 'eb92e846bdbd2409ead0d4339f30c6d78b0e1225', class: "sw" })))), index.h("div", { key: '2cf6c91c1b5cb2517f84e5c39548be4213fc27c2', class: "view", ref: el => this.noPictureView = el }, index.h("dnn-dropzone", { key: 'c9c2e904842f8462b87952836fa864a9e09079f2', allowCameraMode: true, onFilesSelected: e => this.handleNewFile(e.detail[0]), allowedExtensions: ['jpg', 'jpeg', 'gif', 'png', 'svg', 'webp', 'bmp'], resx: {
|
|
447
447
|
capture: this.localResx.capture,
|
|
448
448
|
dragAndDropFile: this.localResx.dragAndDropFile,
|
|
449
449
|
or: this.localResx.or,
|
|
@@ -451,7 +451,7 @@ const DnnImageCropper = class {
|
|
|
451
451
|
uploadFile: this.localResx.uploadFile,
|
|
452
452
|
uploadSizeTooLarge: "The file you tried to upload is too large.",
|
|
453
453
|
fileSizeLimit: "The maximum size is",
|
|
454
|
-
}, ref: el => this.inputField = el, onFocus: () => this.focused = true, onBlur: () => this.focused = false })), index.h("dnn-modal", { key: '
|
|
454
|
+
}, ref: el => this.inputField = el, onFocus: () => this.focused = true, onBlur: () => this.focused = false })), index.h("dnn-modal", { key: 'd70385ac62db570303947cd133a6dace89851fe3', ref: el => this.imageTooSmallModal = el, "close-text": this.localResx.modalCloseText }, index.h("p", { key: 'c96b96c98b7a7918b0f954323cb30146ead874a3' }, this.localResx.imageTooSmall.replace("{width}", (_a = this.width) === null || _a === void 0 ? void 0 : _a.toString()).replace("{height}", (_b = this.height) === null || _b === void 0 ? void 0 : _b.toString())))));
|
|
455
455
|
}
|
|
456
456
|
static get formAssociated() { return true; }
|
|
457
457
|
get host() { return index.getElement(this); }
|
|
@@ -125,13 +125,13 @@ const DnnInput = class {
|
|
|
125
125
|
}
|
|
126
126
|
render() {
|
|
127
127
|
var _a;
|
|
128
|
-
return (index.h(index.Host, { key: '
|
|
129
|
-
index.h("slot", { key: '
|
|
130
|
-
index.h("slot", { key: '
|
|
131
|
-
index.h("svg", { key: '
|
|
132
|
-
index.h("button", { key: '
|
|
133
|
-
index.h("svg", { key: '
|
|
134
|
-
index.h("svg", { key: '
|
|
128
|
+
return (index.h(index.Host, { key: '75a60d744c7321a21e8be2eb5e1e96ed61e81c0e', tabIndex: this.focused ? -1 : 0, onFocus: () => this.inputField.focus(), onBlur: () => this.inputField.blur() }, index.h("dnn-fieldset", { key: '1dd7ccc6c05d28be7c850117f7f93e7356e44e0b', ref: el => this.fieldset = el, invalid: !this.valid, focused: this.focused, label: `${(_a = this.label) !== null && _a !== void 0 ? _a : ""}${this.required ? " *" : ""}`, helpText: this.helpText, id: this.labelId, disabled: this.disabled, floatLabel: this.shouldLabelFloat(), onClick: () => !this.focused && this.inputField.focus(), onFocus: () => this.focused = true, onBlur: () => this.focused = false }, index.h("div", { key: '0e320d003cfe21a25592d59ca0832c8d5de434c2', class: "inner-container" }, !this.shouldLabelFloat() &&
|
|
129
|
+
index.h("slot", { key: '9c7d840d04ad9e1e2e9044e535b231727cd7d56f', name: "prefix" }), index.h("input", { key: 'ed6c75cea2c9bad544c79312e47131854fdab612', ref: el => this.inputField = el, name: this.name, type: this.type, disabled: this.disabled, required: this.required, autoComplete: this.autocomplete, min: this.min, max: this.max, minlength: this.minlength, maxlength: this.maxlength, multiple: this.multiple, pattern: this.pattern, readonly: this.readonly, step: this.step, value: this.value, onBlur: () => this.handleBlur(), onFocus: () => this.focused = true, onInput: e => this.handleInput(e.target.value), onInvalid: () => this.handleInvalid(), onChange: () => this.handleChange(), "aria-labelledby": this.labelId }), !this.shouldLabelFloat() &&
|
|
130
|
+
index.h("slot", { key: '442d4adb37d95742d797c976175f4f1bc5f9fe86', name: "suffix" }), !this.valid &&
|
|
131
|
+
index.h("svg", { key: 'f95905a8e402cc4689afd686f52d2a151236a221', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", class: "error" }, index.h("path", { key: 'ca7cb76e9df70463206a747bbd9ac1be20e2515b', d: "M479.982-280q14.018 0 23.518-9.482 9.5-9.483 9.5-23.5 0-14.018-9.482-23.518-9.483-9.5-23.5-9.5-14.018 0-23.518 9.482-9.5 9.483-9.5 23.5 0 14.018 9.482 23.518 9.483 9.5 23.5 9.5ZM453-433h60v-253h-60v253Zm27.266 353q-82.734 0-155.5-31.5t-127.266-86q-54.5-54.5-86-127.341Q80-397.681 80-480.5q0-82.819 31.5-155.659Q143-709 197.5-763t127.341-85.5Q397.681-880 480.5-880q82.819 0 155.659 31.5Q709-817 763-763t85.5 127Q880-563 880-480.266q0 82.734-31.5 155.5T763-197.684q-54 54.316-127 86Q563-80 480.266-80Zm.234-60Q622-140 721-239.5t99-241Q820-622 721.188-721 622.375-820 480-820q-141 0-240.5 98.812Q140-622.375 140-480q0 141 99.5 240.5t241 99.5Zm-.5-340Z" })), this.allowShowPassword &&
|
|
132
|
+
index.h("button", { key: '531517334b451784cd98de67ba24dad5c902afc6', class: "show-password", onClick: () => this.switchPasswordVisibility() }, this.type === "text" &&
|
|
133
|
+
index.h("svg", { key: '8b0a02d79dc816d4969eab39a19c33b625f72b28', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960" }, index.h("path", { key: '3b4965787039c15525ed55b7aff8640a3bf48792', d: "M480.118-330Q551-330 600.5-379.618q49.5-49.617 49.5-120.5Q650-571 600.382-620.5q-49.617-49.5-120.5-49.5Q409-670 359.5-620.382q-49.5 49.617-49.5 120.5Q310-429 359.618-379.5q49.617 49.5 120.5 49.5Zm-.353-58Q433-388 400.5-420.735q-32.5-32.736-32.5-79.5Q368-547 400.735-579.5q32.736-32.5 79.5-32.5Q527-612 559.5-579.265q32.5 32.736 32.5 79.5Q592-453 559.265-420.5q-32.736 32.5-79.5 32.5ZM480-200q-146 0-264-83T40-500q58-134 176-217t264-83q146 0 264 83t176 217q-58 134-176 217t-264 83Zm0-300Zm-.169 240Q601-260 702.5-325.5 804-391 857-500q-53-109-154.331-174.5-101.332-65.5-222.5-65.5Q359-740 257.5-674.5 156-609 102-500q54 109 155.331 174.5 101.332 65.5 222.5 65.5Z" })), this.type == "password" &&
|
|
134
|
+
index.h("svg", { key: '87f2176b428c9ca9260b1ea7e2ce5ed6beae219c', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960" }, index.h("path", { key: '8acc664162e4b7039f3997949747e17c5def279c', d: "m629-419-44-44q26-71-27-118t-115-24l-44-44q17-11 38-16t43-5q71 0 120.5 49.5T650-500q0 22-5.5 43.5T629-419Zm129 129-40-40q49-36 85.5-80.5T857-500q-50-111-150-175.5T490-740q-42 0-86 8t-69 19l-46-47q35-16 89.5-28T485-800q143 0 261.5 81.5T920-500q-26 64-67 117t-95 93Zm58 226L648-229q-35 14-79 21.5t-89 7.5q-146 0-265-81.5T40-500q20-52 55.5-101.5T182-696L56-822l42-43 757 757-39 44ZM223-654q-37 27-71.5 71T102-500q51 111 153.5 175.5T488-260q33 0 65-4t48-12l-64-64q-11 5-27 7.5t-30 2.5q-70 0-120-49t-50-121q0-15 2.5-30t7.5-27l-97-97Zm305 142Zm-116 58Z" })))))));
|
|
135
135
|
}
|
|
136
136
|
static get formAssociated() { return true; }
|
|
137
137
|
};
|
|
@@ -70,8 +70,8 @@ const DnnModal = class {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
|
-
return (index.h(index.Host, { key: '
|
|
74
|
-
index.h("button", { key: '
|
|
73
|
+
return (index.h(index.Host, { key: '5afa6fff1bbbebc41181dae23858a7c401c7b4e2' }, index.h("div", { key: '732e4d6acbf68cc346531dbbdc22f5d330b0f979', id: "backdrop", class: this.visible ? 'overlay visible' : 'overlay', onClick: e => this.handleBackdropClick(e) }, index.h("div", { key: 'df4541d67f115d953b4a57510f92fba522f42746', class: "modal", ref: el => this.modal = el }, this.showCloseButton &&
|
|
74
|
+
index.h("button", { key: 'bea18c2d23fac79da39194d2824af782bed037c2', class: "close", "aria-label": this.closeText, onClick: () => this.handleDismiss() }, index.h("svg", { key: 'e454aa75f4fca4c6681b4afb4eeae601e28bc202', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { key: '3af30051a6689a7c35773317933f80b36a3ec624', d: "M0 0h24v24H0z", fill: "none" }), index.h("path", { key: 'f5c35fc743dd27682425f7428d25f91213aa82c7', d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" }))), index.h("div", { key: '620ce468ff4148b80cd365e5ec70b908015117d3', class: "content" }, index.h("slot", { key: '3a6482708a275ba3d3e9942f72fdaf60ad45fd95' })), this.resizable && index.h("div", { key: 'ae052d5d1771c79d33ed780b338b2aea1fc169e2', class: 'se', ref: el => this.seDrag = el })))));
|
|
75
75
|
}
|
|
76
76
|
get el() { return index.getElement(this); }
|
|
77
77
|
};
|
|
@@ -81,7 +81,7 @@ const DnnMonacoEditor = class {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
render() {
|
|
84
|
-
return (index.h(index.Host, { key: '
|
|
84
|
+
return (index.h(index.Host, { key: '16cdb4922f43e0b38175afb8cd888052d67339ac', tabIndex: this.focused ? -1 : 0, onFocus: () => this.focusElement(), onBlur: () => this.textArea.blur() }, index.h("div", { key: 'd1e272cf64061ae57ff01898b0036de5347d49d7', class: "editor-container", ref: el => this.editorContainer = el })));
|
|
85
85
|
}
|
|
86
86
|
static get formAssociated() { return true; }
|
|
87
87
|
static get watchers() { return {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-97332e7c.js');
|
|
6
6
|
|
|
7
|
-
const dnnPermissionsGridCss = ":host{display:block}.add-role-row{display:flex;gap:1em;align-items:center;flex-wrap:wrap}.add-role-row label{margin-right:0.5em}.search-user{display:flex;gap:1em;margin-top:1em}.search-user .search-control{position:relative}.search-user .search-control dnn-collapsible{position:absolute;left:0;top:calc(100% - 2px);width:100%;box-shadow:0px 4px 4px}.search-user .search-control dnn-collapsible .dropdown{background-color:white;border:1px solid lightgray;display:flex;flex-direction:column}.search-user .search-control dnn-collapsible .dropdown button{background-color:transparent;border:none;border-bottom:1px solid lightgray;padding:0.25em;margin:0;text-align:left}table{border:1px solid lightgray;border-collapse:collapse;margin-top:1em}table thead{text-align:center}table thead tr{border-bottom:1px solid lightgray}table thead th{background-color:lightgray;padding:0.25em 0.5em}table thead th:first-child{border-right:1px solid lightgray}table tbody tr{border-bottom:1px dotted lightgray}table tbody tr th{text-align:left;border-right:1px solid lightgray;padding:0 0.5em}table tbody tr td{text-align:center}table tbody tr td
|
|
7
|
+
const dnnPermissionsGridCss = ":host{display:block}.add-role-row{display:flex;gap:1em;align-items:center;flex-wrap:wrap}.add-role-row label{margin-right:0.5em}.search-user{display:flex;gap:1em;margin-top:1em}.search-user .search-control{position:relative}.search-user .search-control dnn-collapsible{position:absolute;left:0;top:calc(100% - 2px);width:100%;box-shadow:0px 4px 4px}.search-user .search-control dnn-collapsible .dropdown{background-color:white;border:1px solid lightgray;display:flex;flex-direction:column}.search-user .search-control dnn-collapsible .dropdown button{background-color:transparent;border:none;border-bottom:1px solid lightgray;padding:0.25em;margin:0;text-align:left}table{border:1px solid lightgray;border-collapse:collapse;margin-top:1em}table thead{text-align:center}table thead tr{border-bottom:1px solid lightgray}table thead th{background-color:lightgray;padding:0.25em 0.5em}table thead th:first-child{border-right:1px solid lightgray}table tbody tr{border-bottom:1px dotted lightgray}table tbody tr th{text-align:left;border-right:1px solid lightgray;padding:0 0.5em}table tbody tr td{text-align:center}table tbody tr td label .hidden{display:none}table tbody tr td button{background-color:transparent;border:0;padding:0;margin:0;margin-right:1em}";
|
|
8
8
|
const DnnPermissionsGridStyle0 = dnnPermissionsGridCss;
|
|
9
9
|
|
|
10
10
|
const DnnPermissionsGrid = class {
|
|
@@ -116,12 +116,12 @@ const DnnPermissionsGrid = class {
|
|
|
116
116
|
return (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("g", { fill: "none" }, index.h("path", { d: "M0 0h24v24H0V0z" }), index.h("path", { d: "M0 0h24v24H0V0z", opacity: ".87" })), index.h("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z" })));
|
|
117
117
|
}
|
|
118
118
|
const checked = item == undefined ? "intermediate" : item.allowAccess ? "checked" : "unchecked";
|
|
119
|
-
return (index.h("dnn-checkbox", { "use-intermediate": true, checked: checked, onCheckedchange: e => this.handleRoleChanged(e.detail, rolePermission, permissionDefinition) }, index.h("div", { slot: "intermediateicon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }))), index.h("div", { slot: "uncheckedicon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z" })))
|
|
119
|
+
return (index.h("label", null, index.h("span", { class: "hidden" }, permissionDefinition.permissionName), index.h("dnn-checkbox", { "use-intermediate": true, checked: checked, onCheckedchange: e => this.handleRoleChanged(e.detail, rolePermission, permissionDefinition) }, index.h("div", { slot: "intermediateicon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }))), index.h("div", { slot: "uncheckedicon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z" }))))));
|
|
120
120
|
}
|
|
121
121
|
renderUserCheckBox(userPermission, permissionDefinition) {
|
|
122
122
|
const item = userPermission.permissions.filter(permission => permission.permissionId == permissionDefinition.permissionId)[0];
|
|
123
123
|
const checked = item == undefined ? "intermediate" : item.allowAccess ? "checked" : "unchecked";
|
|
124
|
-
return (index.h("dnn-checkbox", { "use-intermediate": true, checked: checked, onCheckedchange: e => this.handleUserChanged(e.detail, userPermission, permissionDefinition) }, index.h("div", { slot: "intermediateicon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }))), index.h("div", { slot: "uncheckedicon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z" })))
|
|
124
|
+
return (index.h("label", null, index.h("span", { class: "hidden" }, permissionDefinition.permissionName), index.h("dnn-checkbox", { "use-intermediate": true, checked: checked, onCheckedchange: e => this.handleUserChanged(e.detail, userPermission, permissionDefinition) }, index.h("div", { slot: "intermediateicon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }))), index.h("div", { slot: "uncheckedicon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z" }))))));
|
|
125
125
|
}
|
|
126
126
|
handleRoleChanged(checked, rolePermission, permissionDefinition) {
|
|
127
127
|
switch (checked) {
|
|
@@ -309,13 +309,13 @@ const DnnPermissionsGrid = class {
|
|
|
309
309
|
}
|
|
310
310
|
render() {
|
|
311
311
|
const filteredRoles = this.getRoles();
|
|
312
|
-
return (index.h(index.Host, { key: '
|
|
313
|
-
index.h("div", { key: '
|
|
314
|
-
index.h("dnn-button", { key: '
|
|
315
|
-
]), index.h("table", { key: '
|
|
316
|
-
index.h("button", { onClick: () => this.removeRole(rolePermission) }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" })))))))), index.h("div", { key: '
|
|
317
|
-
index.h("dnn-button", { key: '
|
|
318
|
-
index.h("table", { key: '
|
|
312
|
+
return (index.h(index.Host, { key: 'cf72a4f914f45cc67dc2c3eda77f9edde7f60270', tabIndex: this.focused ? -1 : 0, onFocus: () => this.rolesDropdown.focus(), onBlur: () => this.rolesDropdown.blur() }, index.h("div", { key: '8c4ebce85c93f4f08c4ad24f0b6223de8dc6449c', class: "add-role-row" }, index.h("div", { key: '585768e943955c909194a25dba06a8b84ae4e7be', class: "dropdown" }, index.h("label", { key: 'e9823e0e553a3ae23384e79354696de2c649bea2' }, this.localResx.FilterByGroup, " :"), index.h("select", { key: '5a8cc2742a103bd024243708b18c069b43e70674', ref: el => this.rolesDropdown = el, onChange: e => this.handleRoleGroupChanged(e.target), onFocus: () => this.focused = true, onBlur: () => this.focused = false }, index.h("option", { key: 'daa1a622f34c7b08145b8486201ffaacbb129b78', value: -2, selected: this.selectedRoleGroupId == -2 }, this.localResx.AllRoles), index.h("option", { key: '039fb0a46c56712dccc0d76b3a8872ff8b2d06db', value: -1, selected: this.selectedRoleGroupId == -1 }, this.localResx.GlobalRoles), this.roleGroups.map(roleGroup => index.h("option", { value: roleGroup.id, selected: this.selectedRoleGroupId == roleGroup.id }, roleGroup.name)))), filteredRoles && filteredRoles.length > 0 && [
|
|
313
|
+
index.h("div", { key: '1db52ea02ecf75268ec9996fbd68ea7726733679', class: "dropdown" }, index.h("label", { key: '7fa52a0247951ca88ad80cbf810e7810688dc918' }, this.localResx.SelectRole, " :"), index.h("select", { key: 'cf7baac0e6c22c33ddcac117f05046b942ad6d4e', ref: el => this.roleDropDown = el }, this.getRoles().map(role => index.h("option", { value: role.RoleId }, role.RoleName)))),
|
|
314
|
+
index.h("dnn-button", { key: 'b95196cf538d86c255440a5a88a7f85f019b6632', type: "primary", onClick: () => this.addRole() }, this.localResx.Add)
|
|
315
|
+
]), index.h("table", { key: '51110cb5293a2b753f808572418210094bdc1f7d', class: "roles-table" }, index.h("caption", { key: '2c1abc3f0fe54307b48be57e7f9b61939b4822b3' }, this.localResx.RolePermissions), index.h("thead", { key: 'b7e89b31ba60e0b0c866f2c4f83f5df98d6f83b3' }, index.h("tr", { key: '4f2c16c8425483d7dc1aba76cedd20083dcf9dc3' }, index.h("th", { key: '4c0910460873ecab0b9f55352be83c56c575f6a6' }, this.localResx.Role), this.permissions.permissionDefinitions.map(permissionDefinition => index.h("th", null, permissionDefinition.permissionName)), index.h("th", { key: 'a41f294b08733b13d2f75032d9b99891727a6b21' }, "\u00A0"))), index.h("tbody", { key: '66367d43acd71c2660ee7e38a383c2cc4cdeff2b' }, this.permissions.rolePermissions.map(rolePermission => index.h("tr", null, index.h("th", null, rolePermission.roleName), this.permissions.permissionDefinitions.map(permissionDefinition => index.h("td", null, this.renderRoleCheckBox(rolePermission, permissionDefinition))), index.h("td", null, !rolePermission.default &&
|
|
316
|
+
index.h("button", { onClick: () => this.removeRole(rolePermission) }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" })))))))), index.h("div", { key: '96d18900b0c2e1915b49dbae8dfca84ce22f9224', class: "search-user" }, index.h("div", { key: 'cd5f5916d43a53a827654226fb2ca5cf2842d2fd', class: "search-control" }, index.h("dnn-searchbox", { key: '47a8f6b69fba9e87806a02c2101d8eac0d65cfb7', placeholder: this.localResx.User, debounced: true, onQueryChanged: e => this.handleQueryChanged(e.detail), onKeyDown: e => this.handleSearchUserFieldKeyDown(e), query: this.userQuery }), index.h("dnn-collapsible", { key: '21e8ecd420d7a4174a1e8633a00ff609c88391d3', ref: el => this.userCollapsible = el }, index.h("div", { key: 'e8996049d1743358d16515c6e7a62fbf1c3449f4', class: "dropdown" }, this.getFilteredUsers().map(searchedUser => index.h("button", { onKeyDown: e => this.handleSearchedUserKeyDown(e), onClick: () => this.handleUserPicked(searchedUser) }, searchedUser.displayName))))), this.pickedUser &&
|
|
317
|
+
index.h("dnn-button", { key: '5a3159e4b75a1eaf7e04d76a5e7c207efbcb4bbd', onClick: () => this.addUser() }, this.localResx.Add)), this.permissions.userPermissions && this.permissions.userPermissions.length > 0 &&
|
|
318
|
+
index.h("table", { key: '1c67fd050abc84cc1d46c2f22ac54b72536c059c', class: "users-table" }, index.h("caption", { key: '5a94b92f18104a0307e2282945f36855d055c09a' }, this.localResx.UserPermissions), index.h("thead", { key: '85447eb661dae9d68aa076275b4bc6a3d710d86c' }, index.h("tr", { key: '896a922a18c02b682a48ee613088bf3140291d02' }, index.h("th", { key: 'd6606accc9147704a1e71a401550b161f76a132c' }, this.localResx.User), this.permissions.permissionDefinitions.map(permissionDefinition => index.h("th", null, permissionDefinition.permissionName)), index.h("th", { key: '87d8b97ab435a913177f828afa637740ba4a2d7b' }, "\u00A0"))), index.h("tbody", { key: '8649339d5206c4d2c096d97705fa84c56735a8d1' }, this.permissions.userPermissions.map(userPermission => index.h("tr", null, index.h("th", null, userPermission.displayName), this.permissions.permissionDefinitions.map(permissionDefinition => index.h("td", null, this.renderUserCheckBox(userPermission, permissionDefinition))), index.h("td", null, index.h("button", { onClick: () => this.removeUser(userPermission) }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, index.h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), index.h("path", { d: "M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" }))))))))));
|
|
319
319
|
}
|
|
320
320
|
static get watchers() { return {
|
|
321
321
|
"foundUsers": ["handleFoundUsersChanged"],
|