@dnncommunity/dnn-elements 0.24.0-beta.6 → 0.24.0-beta.7

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.
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-97332e7c.js');
6
6
  const stringUtilities = require('./stringUtilities-ffd71dc2.js');
7
7
 
8
- const dnnTextareaCss = ":host{display:inline-block;--foreground:var(--dnn-color-foreground, #000);--background:var(--dnn-color-background, #fff);--focus-color:var(--dnn-color-primary, #3792ED);--danger-color:var(--dnn-color-danger, #900);--control-radius:var(--dnn-controls-radius, 3px)}dnn-fieldset{width:100%}textarea{border:none;outline:none;background-color:transparent;color:var(--foreground);width:100%;height:100%;resize:none}";
8
+ const dnnTextareaCss = ":host{display:inline-block;--foreground:var(--dnn-color-foreground, #000);--background:var(--dnn-color-background, #fff);--focus-color:var(--dnn-color-primary, #3792ED);--danger-color:var(--dnn-color-danger, #900);--control-radius:var(--dnn-controls-radius, 3px)}dnn-fieldset{width:100%}textarea{border:none;outline:none;background-color:transparent;color:var(--foreground);width:calc(100% - 1em);height:calc(100% - 1em);line-height:1.5em;resize:none}";
9
9
  const DnnTextareaStyle0 = dnnTextareaCss;
10
10
 
11
11
  const DnnTextarea = class {
@@ -31,6 +31,7 @@ const DnnTextarea = class {
31
31
  this.minlength = undefined;
32
32
  this.maxlength = undefined;
33
33
  this.readonly = undefined;
34
+ this.rows = 3;
34
35
  this.focused = false;
35
36
  this.valid = true;
36
37
  this.customValidityMessage = undefined;
@@ -53,6 +54,7 @@ const DnnTextarea = class {
53
54
  }
54
55
  componentWillLoad() {
55
56
  this.labelId = stringUtilities.generateRandomId();
57
+ this.textarea.style.minHeight = `${this.rows * 1.5}em`;
56
58
  }
57
59
  // eslint-disable-next-line @stencil-community/own-methods-must-be-private
58
60
  formResetCallback() {
@@ -93,7 +95,7 @@ const DnnTextarea = class {
93
95
  }
94
96
  render() {
95
97
  var _a;
96
- return (index.h(index.Host, { key: 'a3b5e0100ce757b101071df983a91706fc0466f7', tabIndex: this.focused ? -1 : 0, onFocus: () => this.textarea.focus(), onBlur: () => this.textarea.blur() }, index.h("dnn-fieldset", { key: 'fdf3fbd79a23657f71a33275f34598e2ecbce692', ref: el => this.fieldset = el, invalid: !this.valid, focused: this.focused, resizable: this.resizable, label: `${(_a = this.label) !== null && _a !== void 0 ? _a : ""}${this.required ? " *" : ""}`, helpText: this.helpText, disabled: this.disabled, id: this.labelId, floatLabel: this.shouldLabelFloat(), onClick: () => !this.focused && this.textarea.focus() }, index.h("textarea", { key: '77fec48727c61e467c19ad3cefaaa43a0187b018', ref: el => this.textarea = el, name: this.name, value: this.value, required: this.required, onBlur: () => this.focused = false, onFocus: () => this.focused = true, onChange: () => this.handleChange(), onInput: e => this.handleInput(e.target.value), onInvalid: () => this.handleInvalid(), disabled: this.disabled, autoComplete: this.autocomplete, minlength: this.minlength, maxlength: this.maxlength, readonly: this.readonly, "aria-labelledby": this.labelId }))));
98
+ return (index.h(index.Host, { key: 'b1b22b0fdc9975613ff99e40d7a8fa6047f62105', tabIndex: this.focused ? -1 : 0, onFocus: () => this.textarea.focus(), onBlur: () => this.textarea.blur() }, index.h("dnn-fieldset", { key: '6e509bb911c243f10c1af6fb70e0aefd49ddb2ad', ref: el => this.fieldset = el, invalid: !this.valid, focused: this.focused, resizable: this.resizable, label: `${(_a = this.label) !== null && _a !== void 0 ? _a : ""}${this.required ? " *" : ""}`, helpText: this.helpText, disabled: this.disabled, id: this.labelId, floatLabel: this.shouldLabelFloat(), onClick: () => !this.focused && this.textarea.focus() }, index.h("textarea", { key: '9dd9d48e90d6cd12c88e1d09fd1b60b018761845', ref: el => this.textarea = el, name: this.name, value: this.value, required: this.required, onBlur: () => this.focused = false, onFocus: () => this.focused = true, onChange: () => this.handleChange(), onInput: e => this.handleInput(e.target.value), onInvalid: () => this.handleInvalid(), disabled: this.disabled, autoComplete: this.autocomplete, minlength: this.minlength, maxlength: this.maxlength, readonly: this.readonly, "aria-labelledby": this.labelId, rows: this.rows }))));
97
99
  }
98
100
  static get formAssociated() { return true; }
99
101
  };
@@ -1 +1 @@
1
- {"file":"dnn-textarea.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,cAAc,GAAG,2ZAA2Z,CAAC;AACnb,0BAAe,cAAc;;MCShB,WAAW;;;;;;;;;;;;yBAEgE,OAAO;;;;;;;4BAqB9D,KAAK;;;;uBAsCjB,KAAK;qBACP,IAAI;;;;IApBrB,MAAM,aAAa;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;KAC/B;;IAID,MAAM,iBAAiB,CAAC,OAAe;QACrC,IAAI,OAAO,IAAI,SAAS,IAAI,OAAO,IAAI,EAAE,EAAE;YACzC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAChC,OAAO;SACR;QAED,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;KAC1C;IAYD,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAGA,gCAAgB,EAAE,CAAC;KACnC;;IAGD,iBAAiB;QACf,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;KACjC;IAEO,WAAW,CAAC,KAAa;QAC/B,IAAI,CAAC,KAAK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ACH;;;;;;;","names":["generateRandomId","h","Host"],"sources":["src/components/dnn-textarea/dnn-textarea.scss?tag=dnn-textarea&encapsulation=shadow","src/components/dnn-textarea/dnn-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n\n /** @prop --foreground: Defines the foreground color. */\n --foreground: var(--dnn-color-foreground, #000);\n\n /** @prop --background: Defines the background color. */\n --background: var(--dnn-color-background, #fff);\n \n /** @prop --focus-color: Defines the color when the component is focused. */\n --focus-color: var(--dnn-color-primary, #3792ED);\n \n /** @prop --danger-color: Defines the danger color used for invalid data. */\n --danger-color: var(--dnn-color-danger, #900);\n \n /** @prop --control-radius: Defines the radius for the control corners. */\n --control-radius: var(--dnn-controls-radius, 3px);\n}\n\ndnn-fieldset{\n width: 100%;\n}\n\ntextarea{\n border: none;\n outline: none;\n background-color: transparent;\n color: var(--foreground);\n width: 100%;\n height: 100%;\n resize: none;\n}","import { Component, Host, h, Prop, AttachInternals, State, Event, EventEmitter, Method } from '@stencil/core';\nimport { generateRandomId } from '../../utilities/stringUtilities';\n\n/** A custom textarea component. */\n@Component({\n tag: 'dnn-textarea',\n styleUrl: 'dnn-textarea.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DnnTextarea {\n /** Can be set to change how the user can resize the field. */\n @Prop() resizable: \"none\" | \"both\" | \"horizontal\" | \"vertical\" | \"block\" | \"inline\" = \"block\";\n\n /** Sets the value of the textarea. */\n @Prop({mutable: true}) value: string;\n\n /** The label for this input. */\n @Prop() label: string;\n\n /** The name for this input when used in forms. */\n @Prop() name: string;\n\n /** Defines the help label displayed under the field. */\n @Prop() helpText: string;\n\n /** Defines whether the field requires having a value. */\n @Prop() required: boolean;\n\n /** Defines whether the field is disabled. */\n @Prop() disabled: boolean;\n\n /** Defines the type of auto-completion to use for this field, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete. */\n @Prop() autocomplete: string = \"off\";\n\n /** Defines the minimum amount of charaters. */\n @Prop() minlength: number;\n\n /** Defines the maximum amount of charaters. */\n @Prop() maxlength: number;\n\n /** Defines wheter the defined value is readonly. */\n @Prop() readonly: boolean;\n\n /** Fires when the using is inputing data (on keystrokes). */\n @Event() valueInput: EventEmitter<string>;\n\n /** Fires when the value has changed and the user exits the input. */\n @Event() valueChange: EventEmitter<string>;\n\n /** Reports the input validity details. See https://developer.mozilla.org/en-US/docs/Web/API/ValidityState */\n @Method()\n async checkValidity(): Promise<ValidityState> {\n return this.textarea.validity;\n }\n\n /** Can be used to set a custom validity message. */\n @Method()\n async setCustomValidity(message: string): Promise<void> {\n if (message == undefined || message == \"\") {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.fieldset.setValidity(true);\n return;\n }\n\n this.customValidityMessage = message;\n this.valid = false;\n this.textarea.setCustomValidity(message);\n }\n\n @State() focused = false;\n @State() valid = true;\n @State() customValidityMessage: string;\n\n @AttachInternals() internals: ElementInternals;\n \n private textarea: HTMLTextAreaElement;\n private fieldset: HTMLDnnFieldsetElement;\n private labelId: string;\n\n componentWillLoad() {\n this.labelId = generateRandomId();\n }\n\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n formResetCallback() {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.value = \"\";\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n private handleInput(value: string): void {\n this.value = value;\n var valid = this.textarea.checkValidity();\n this.valid = valid;\n this.valueInput.emit(this.value);\n }\n\n private handleInvalid(): void {\n this.valid = false;\n if (this.customValidityMessage == undefined){\n this.customValidityMessage = this.textarea.validationMessage;\n }\n }\n\n private handleChange() {\n this.valueChange.emit(this.value);\n if (this.name != undefined){\n var data = new FormData();\n data.append(this.name, this.value.toString());\n this.internals.setFormValue(data);\n }\n }\n\n private shouldLabelFloat(): boolean {\n if (this.focused) {\n return false;\n }\n\n if (this.value != undefined && this.value != \"\") {\n return false;\n }\n \n return true;\n }\n\n render() {\n return (\n <Host\n tabIndex={this.focused ? -1 : 0}\n onFocus={() => this.textarea.focus()}\n onBlur={() => this.textarea.blur()}\n >\n <dnn-fieldset\n ref={el => this.fieldset = el}\n invalid={!this.valid}\n focused={this.focused}\n resizable={this.resizable}\n label={`${this.label ?? \"\"}${this.required ? \" *\" : \"\"}`}\n helpText={this.helpText}\n disabled={this.disabled}\n id={this.labelId}\n floatLabel={this.shouldLabelFloat()}\n onClick={() => !this.focused && this.textarea.focus()}\n >\n <textarea\n ref={el => this.textarea = el}\n name={this.name}\n value={this.value}\n required={this.required}\n onBlur={() => this.focused = false}\n onFocus={() => this.focused=true}\n onChange={() => this.handleChange()}\n onInput={e => this.handleInput((e.target as HTMLTextAreaElement).value)}\n onInvalid={() => this.handleInvalid()}\n disabled={this.disabled}\n autoComplete={this.autocomplete}\n minlength={this.minlength}\n maxlength={this.maxlength}\n readonly={this.readonly}\n aria-labelledby={this.labelId}\n />\n </dnn-fieldset>\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"dnn-textarea.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,cAAc,GAAG,qcAAqc,CAAC;AAC7d,0BAAe,cAAc;;MCShB,WAAW;;;;;;;;;;;;yBAEgE,OAAO;;;;;;;4BAqB9D,KAAK;;;;oBAYb,CAAC;uBA6BL,KAAK;qBACP,IAAI;;;;IApBrB,MAAM,aAAa;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;KAC/B;;IAID,MAAM,iBAAiB,CAAC,OAAe;QACrC,IAAI,OAAO,IAAI,SAAS,IAAI,OAAO,IAAI,EAAE,EAAE;YACzC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAChC,OAAO;SACR;QAED,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI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AK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,KAAK,EAClC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,GAAC,IAAI,EAChC,QAAQ,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EACnC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAE,CAAC,CAAC,MAA8B,CAAC,KAAK,CAAC,EACvE,SAAS,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,EACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,qBACN,IAAI,CAAC,OAAO,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,GACf,CACW,CACV,EACP;KACH;;;;;;;","names":["generateRandomId","h","Host"],"sources":["src/components/dnn-textarea/dnn-textarea.scss?tag=dnn-textarea&encapsulation=shadow","src/components/dnn-textarea/dnn-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n\n /** @prop --foreground: Defines the foreground color. */\n --foreground: var(--dnn-color-foreground, #000);\n\n /** @prop --background: Defines the background color. */\n --background: var(--dnn-color-background, #fff);\n \n /** @prop --focus-color: Defines the color when the component is focused. */\n --focus-color: var(--dnn-color-primary, #3792ED);\n \n /** @prop --danger-color: Defines the danger color used for invalid data. */\n --danger-color: var(--dnn-color-danger, #900);\n \n /** @prop --control-radius: Defines the radius for the control corners. */\n --control-radius: var(--dnn-controls-radius, 3px);\n}\n\ndnn-fieldset{\n width: 100%;\n}\n\ntextarea{\n border: none;\n outline: none;\n background-color: transparent;\n color: var(--foreground);\n width: calc(100% - 1em);\n height: calc(100% - 1em);\n line-height: 1.5em;\n resize: none;\n}","import { Component, Host, h, Prop, AttachInternals, State, Event, EventEmitter, Method } from '@stencil/core';\nimport { generateRandomId } from '../../utilities/stringUtilities';\n\n/** A custom textarea component. */\n@Component({\n tag: 'dnn-textarea',\n styleUrl: 'dnn-textarea.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DnnTextarea {\n /** Can be set to change how the user can resize the field. */\n @Prop() resizable: \"none\" | \"both\" | \"horizontal\" | \"vertical\" | \"block\" | \"inline\" = \"block\";\n\n /** Sets the value of the textarea. */\n @Prop({mutable: true}) value: string;\n\n /** The label for this input. */\n @Prop() label: string;\n\n /** The name for this input when used in forms. */\n @Prop() name: string;\n\n /** Defines the help label displayed under the field. */\n @Prop() helpText: string;\n\n /** Defines whether the field requires having a value. */\n @Prop() required: boolean;\n\n /** Defines whether the field is disabled. */\n @Prop() disabled: boolean;\n\n /** Defines the type of auto-completion to use for this field, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete. */\n @Prop() autocomplete: string = \"off\";\n\n /** Defines the minimum amount of charaters. */\n @Prop() minlength: number;\n\n /** Defines the maximum amount of charaters. */\n @Prop() maxlength: number;\n\n /** Defines wheter the defined value is readonly. */\n @Prop() readonly: boolean;\n\n /** Defines how many rows (lines of text) to initially show. */\n @Prop() rows: number = 3;\n\n /** Fires when the using is inputing data (on keystrokes). */\n @Event() valueInput: EventEmitter<string>;\n\n /** Fires when the value has changed and the user exits the input. */\n @Event() valueChange: EventEmitter<string>;\n\n /** Reports the input validity details. See https://developer.mozilla.org/en-US/docs/Web/API/ValidityState */\n @Method()\n async checkValidity(): Promise<ValidityState> {\n return this.textarea.validity;\n }\n\n /** Can be used to set a custom validity message. */\n @Method()\n async setCustomValidity(message: string): Promise<void> {\n if (message == undefined || message == \"\") {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.fieldset.setValidity(true);\n return;\n }\n\n this.customValidityMessage = message;\n this.valid = false;\n this.textarea.setCustomValidity(message);\n }\n\n @State() focused = false;\n @State() valid = true;\n @State() customValidityMessage: string;\n\n @AttachInternals() internals: ElementInternals;\n \n private textarea: HTMLTextAreaElement;\n private fieldset: HTMLDnnFieldsetElement;\n private labelId: string;\n\n componentWillLoad() {\n this.labelId = generateRandomId();\n this.textarea.style.minHeight = `${this.rows * 1.5}em`;\n }\n\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n formResetCallback() {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.value = \"\";\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n private handleInput(value: string): void {\n this.value = value;\n var valid = this.textarea.checkValidity();\n this.valid = valid;\n this.valueInput.emit(this.value);\n }\n\n private handleInvalid(): void {\n this.valid = false;\n if (this.customValidityMessage == undefined){\n this.customValidityMessage = this.textarea.validationMessage;\n }\n }\n\n private handleChange() {\n this.valueChange.emit(this.value);\n if (this.name != undefined){\n var data = new FormData();\n data.append(this.name, this.value.toString());\n this.internals.setFormValue(data);\n }\n }\n\n private shouldLabelFloat(): boolean {\n if (this.focused) {\n return false;\n }\n\n if (this.value != undefined && this.value != \"\") {\n return false;\n }\n \n return true;\n }\n\n render() {\n return (\n <Host\n tabIndex={this.focused ? -1 : 0}\n onFocus={() => this.textarea.focus()}\n onBlur={() => this.textarea.blur()}\n >\n <dnn-fieldset\n ref={el => this.fieldset = el}\n invalid={!this.valid}\n focused={this.focused}\n resizable={this.resizable}\n label={`${this.label ?? \"\"}${this.required ? \" *\" : \"\"}`}\n helpText={this.helpText}\n disabled={this.disabled}\n id={this.labelId}\n floatLabel={this.shouldLabelFloat()}\n onClick={() => !this.focused && this.textarea.focus()}\n >\n <textarea\n ref={el => this.textarea = el}\n name={this.name}\n value={this.value}\n required={this.required}\n onBlur={() => this.focused = false}\n onFocus={() => this.focused=true}\n onChange={() => this.handleChange()}\n onInput={e => this.handleInput((e.target as HTMLTextAreaElement).value)}\n onInvalid={() => this.handleInvalid()}\n disabled={this.disabled}\n autoComplete={this.autocomplete}\n minlength={this.minlength}\n maxlength={this.maxlength}\n readonly={this.readonly}\n aria-labelledby={this.labelId}\n rows={this.rows}\n />\n </dnn-fieldset>\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["dnn-color-input.cjs",[[65,"dnn-color-input",{"color":[1025],"contrastColor":[1025,"contrast-color"],"lightColor":[1025,"light-color"],"darkColor":[1025,"dark-color"],"label":[1],"readonly":[4],"localization":[16],"name":[1],"helpText":[1,"help-text"],"useContrastColor":[4,"use-contrast-color"],"useLightColor":[4,"use-light-color"],"useDarkColor":[4,"use-dark-color"],"currentColor":[32],"focused":[32]},null,{"currentColor":["currentColorChanged"]}]]],["dnn-image-cropper.cjs",[[65,"dnn-image-cropper",{"width":[2],"height":[2],"resx":[16],"quality":[2],"preventUndersized":[4,"prevent-undersized"],"name":[1],"view":[32],"localResx":[32],"fileName":[32],"focused":[32],"clear":[64]},null,{"resx":["resxChanged"]}]]],["dnn-autocomplete.cjs",[[65,"dnn-autocomplete",{"label":[1],"name":[1],"helpText":[1,"help-text"],"value":[1537],"required":[4],"disabled":[4],"suggestions":[16],"renderSuggestion":[16],"totalSuggestions":[2,"total-suggestions"],"preloadThresholdPixels":[2,"preload-threshold-pixels"],"focused":[32],"valid":[32],"customValidityMessage":[32],"selectedIndex":[32],"positionInitialized":[32],"lastScrollTop":[32],"checkValidity":[64],"setCustomValidity":[64]},[[4,"click","handleOutsideClick"]]]]],["dnn-input.cjs",[[65,"dnn-input",{"type":[1025],"label":[1],"name":[1],"value":[1544],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"min":[8],"max":[8],"minlength":[2],"maxlength":[2],"multiple":[4],"pattern":[1],"readonly":[4],"step":[8],"disableValidityReporting":[4,"disable-validity-reporting"],"allowShowPassword":[4,"allow-show-password"],"focused":[32],"valid":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-select.cjs",[[65,"dnn-select",{"label":[1],"name":[1],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"disableValidityReporting":[4,"disable-validity-reporting"],"value":[1537],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64]}]]],["dnn-textarea.cjs",[[65,"dnn-textarea",{"resizable":[1],"value":[1025],"label":[1],"name":[1],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"minlength":[2],"maxlength":[2],"readonly":[4],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-treeview-item.cjs",[[1,"dnn-treeview-item",{"expanded":[1540],"hasChildren":[32],"focused":[32]},null,{"expanded":["watchExpanded"]}]]],["dnn-chevron.cjs",[[1,"dnn-chevron",{"expandText":[1,"expand-text"],"collapseText":[1,"collapse-text"],"expanded":[1540],"focused":[32]},null,{"expanded":["handleExpandedChanged"]}]]],["dnn-monaco-editor.cjs",[[66,"dnn-monaco-editor",{"language":[1],"value":[1025],"name":[1],"focused":[32]},null,{"language":["languageChanged"],"value":["valueChanged"]}]]],["dnn-progress-bar.cjs",[[1,"dnn-progress-bar",{"value":[2],"max":[2],"useGradient":[4,"use-gradient"]}]]],["dnn-richtext.cjs",[[65,"dnn-richtext",{"options":[16],"value":[1],"name":[1],"focused":[32]},null,{"value":["watchValueChanged"]}]]],["dnn-sort-icon.cjs",[[1,"dnn-sort-icon",{"sortDirection":[1025,"sort-direction"],"focused":[32]}]]],["dnn-toggle.cjs",[[65,"dnn-toggle",{"checked":[1028],"disabled":[4],"name":[1],"value":[1],"focused":[32]},null,{"checked":["checkedChanged"]}]]],["dnn-vertical-overflow-menu.cjs",[[1,"dnn-vertical-overflow-menu",{"showDropdownButton":[32],"showDropdownMenu":[32]}]]],["dnn-vertical-splitview.cjs",[[1,"dnn-vertical-splitview",{"splitterWidth":[2,"splitter-width"],"splitWidthPercentage":[1026,"split-width-percentage"],"leftWidth":[32],"rightWidth":[32],"setSplitWidthPercentage":[64],"getSplitWidthPercentage":[64]}]]],["dnn-checkbox.cjs",[[65,"dnn-checkbox",{"checked":[1025],"useIntermediate":[4,"use-intermediate"],"value":[1],"name":[1],"focused":[32]},null,{"checked":["handleCheckedChange"]}]]],["dnn-color-picker.cjs",[[1,"dnn-color-picker",{"color":[1],"colorBoxHeight":[1,"color-box-height"],"currentColor":[32],"rgbDisplay":[32],"hslDisplay":[32],"hexDisplay":[32],"focused":[32]},null,{"currentColor":["handeCurrentColorChanged"]}]]],["dnn-dropzone.cjs",[[65,"dnn-dropzone",{"resx":[16],"allowedExtensions":[16],"allowCameraMode":[4,"allow-camera-mode"],"captureQuality":[2,"capture-quality"],"maxFileSize":[2,"max-file-size"],"name":[1],"canTakeSnapshots":[32],"takingPicture":[32],"fileTooLarge":[32],"invalidExtension":[32],"localResx":[32],"focused":[32]},null,{"resx":["resxChanged"]}]]],["dnn-searchbox.cjs",[[1,"dnn-searchbox",{"placeholder":[1],"debounced":[4],"debounceTime":[2,"debounce-time"],"query":[1025],"focused":[32]},null,{"query":["handleQueryChanged"]}]]],["dnn-tab_2.cjs",[[1,"dnn-tab",{"tabTitle":[1,"tab-title"],"visible":[32],"show":[64],"hide":[64]}],[1,"dnn-tabs",{"tabTitles":[32],"selectedTabTitle":[32]}]]],["dnn-collapsible.cjs",[[1,"dnn-collapsible",{"expanded":[516],"transitionDuration":[2,"transition-duration"],"updateSize":[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{"expanded":["handledExpandedChanged"]}]]],["dnn-modal.cjs",[[1,"dnn-modal",{"backdropDismiss":[4,"backdrop-dismiss"],"closeText":[1,"close-text"],"resizable":[4],"showCloseButton":[4,"show-close-button"],"visible":[1540],"show":[64],"hide":[64]}]]],["dnn-button.cjs",[[65,"dnn-button",{"type":[1],"appearance":[1],"formButtonType":[1,"form-button-type"],"reversed":[4],"size":[1],"confirm":[4],"confirmYesText":[1,"confirm-yes-text"],"confirmNoText":[1,"confirm-no-text"],"confirmMessage":[1,"confirm-message"],"disabled":[4],"focused":[32],"modalVisible":[32]}]]],["dnn-permissions-grid.cjs",[[1,"dnn-permissions-grid",{"permissions":[1040],"roleGroups":[16],"roles":[16],"resx":[16],"foundUsers":[16],"selectedRoleGroupId":[32],"userQuery":[32],"pickedUser":[32],"localResx":[32],"focused":[32]},null,{"foundUsers":["handleFoundUsersChanged"],"resx":["resxChanged"]}]]],["dnn-fieldset.cjs",[[1,"dnn-fieldset",{"focused":[1540],"disabled":[1540],"invalid":[1540],"label":[1],"floatLabel":[1540,"float-label"],"helpText":[1,"help-text"],"resizable":[1],"customValidityMessage":[32],"setFocused":[64],"setBlurred":[64],"disable":[64],"enable":[64],"pinLabel":[64],"unpinLabel":[64],"setValidity":[64]}]]]], options);
22
+ return index.bootstrapLazy([["dnn-color-input.cjs",[[65,"dnn-color-input",{"color":[1025],"contrastColor":[1025,"contrast-color"],"lightColor":[1025,"light-color"],"darkColor":[1025,"dark-color"],"label":[1],"readonly":[4],"localization":[16],"name":[1],"helpText":[1,"help-text"],"useContrastColor":[4,"use-contrast-color"],"useLightColor":[4,"use-light-color"],"useDarkColor":[4,"use-dark-color"],"currentColor":[32],"focused":[32]},null,{"currentColor":["currentColorChanged"]}]]],["dnn-image-cropper.cjs",[[65,"dnn-image-cropper",{"width":[2],"height":[2],"resx":[16],"quality":[2],"preventUndersized":[4,"prevent-undersized"],"name":[1],"view":[32],"localResx":[32],"fileName":[32],"focused":[32],"clear":[64]},null,{"resx":["resxChanged"]}]]],["dnn-autocomplete.cjs",[[65,"dnn-autocomplete",{"label":[1],"name":[1],"helpText":[1,"help-text"],"value":[1537],"required":[4],"disabled":[4],"suggestions":[16],"renderSuggestion":[16],"totalSuggestions":[2,"total-suggestions"],"preloadThresholdPixels":[2,"preload-threshold-pixels"],"focused":[32],"valid":[32],"customValidityMessage":[32],"selectedIndex":[32],"positionInitialized":[32],"lastScrollTop":[32],"checkValidity":[64],"setCustomValidity":[64]},[[4,"click","handleOutsideClick"]]]]],["dnn-input.cjs",[[65,"dnn-input",{"type":[1025],"label":[1],"name":[1],"value":[1544],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"min":[8],"max":[8],"minlength":[2],"maxlength":[2],"multiple":[4],"pattern":[1],"readonly":[4],"step":[8],"disableValidityReporting":[4,"disable-validity-reporting"],"allowShowPassword":[4,"allow-show-password"],"focused":[32],"valid":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-select.cjs",[[65,"dnn-select",{"label":[1],"name":[1],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"disableValidityReporting":[4,"disable-validity-reporting"],"value":[1537],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64]}]]],["dnn-textarea.cjs",[[65,"dnn-textarea",{"resizable":[1],"value":[1025],"label":[1],"name":[1],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"minlength":[2],"maxlength":[2],"readonly":[4],"rows":[2],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-treeview-item.cjs",[[1,"dnn-treeview-item",{"expanded":[1540],"hasChildren":[32],"focused":[32]},null,{"expanded":["watchExpanded"]}]]],["dnn-chevron.cjs",[[1,"dnn-chevron",{"expandText":[1,"expand-text"],"collapseText":[1,"collapse-text"],"expanded":[1540],"focused":[32]},null,{"expanded":["handleExpandedChanged"]}]]],["dnn-monaco-editor.cjs",[[66,"dnn-monaco-editor",{"language":[1],"value":[1025],"name":[1],"focused":[32]},null,{"language":["languageChanged"],"value":["valueChanged"]}]]],["dnn-progress-bar.cjs",[[1,"dnn-progress-bar",{"value":[2],"max":[2],"useGradient":[4,"use-gradient"]}]]],["dnn-richtext.cjs",[[65,"dnn-richtext",{"options":[16],"value":[1],"name":[1],"focused":[32]},null,{"value":["watchValueChanged"]}]]],["dnn-sort-icon.cjs",[[1,"dnn-sort-icon",{"sortDirection":[1025,"sort-direction"],"focused":[32]}]]],["dnn-toggle.cjs",[[65,"dnn-toggle",{"checked":[1028],"disabled":[4],"name":[1],"value":[1],"focused":[32]},null,{"checked":["checkedChanged"]}]]],["dnn-vertical-overflow-menu.cjs",[[1,"dnn-vertical-overflow-menu",{"showDropdownButton":[32],"showDropdownMenu":[32]}]]],["dnn-vertical-splitview.cjs",[[1,"dnn-vertical-splitview",{"splitterWidth":[2,"splitter-width"],"splitWidthPercentage":[1026,"split-width-percentage"],"leftWidth":[32],"rightWidth":[32],"setSplitWidthPercentage":[64],"getSplitWidthPercentage":[64]}]]],["dnn-checkbox.cjs",[[65,"dnn-checkbox",{"checked":[1025],"useIntermediate":[4,"use-intermediate"],"value":[1],"name":[1],"focused":[32]},null,{"checked":["handleCheckedChange"]}]]],["dnn-color-picker.cjs",[[1,"dnn-color-picker",{"color":[1],"colorBoxHeight":[1,"color-box-height"],"currentColor":[32],"rgbDisplay":[32],"hslDisplay":[32],"hexDisplay":[32],"focused":[32]},null,{"currentColor":["handeCurrentColorChanged"]}]]],["dnn-dropzone.cjs",[[65,"dnn-dropzone",{"resx":[16],"allowedExtensions":[16],"allowCameraMode":[4,"allow-camera-mode"],"captureQuality":[2,"capture-quality"],"maxFileSize":[2,"max-file-size"],"name":[1],"canTakeSnapshots":[32],"takingPicture":[32],"fileTooLarge":[32],"invalidExtension":[32],"localResx":[32],"focused":[32]},null,{"resx":["resxChanged"]}]]],["dnn-searchbox.cjs",[[1,"dnn-searchbox",{"placeholder":[1],"debounced":[4],"debounceTime":[2,"debounce-time"],"query":[1025],"focused":[32]},null,{"query":["handleQueryChanged"]}]]],["dnn-tab_2.cjs",[[1,"dnn-tab",{"tabTitle":[1,"tab-title"],"visible":[32],"show":[64],"hide":[64]}],[1,"dnn-tabs",{"tabTitles":[32],"selectedTabTitle":[32]}]]],["dnn-collapsible.cjs",[[1,"dnn-collapsible",{"expanded":[516],"transitionDuration":[2,"transition-duration"],"updateSize":[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{"expanded":["handledExpandedChanged"]}]]],["dnn-modal.cjs",[[1,"dnn-modal",{"backdropDismiss":[4,"backdrop-dismiss"],"closeText":[1,"close-text"],"resizable":[4],"showCloseButton":[4,"show-close-button"],"visible":[1540],"show":[64],"hide":[64]}]]],["dnn-button.cjs",[[65,"dnn-button",{"type":[1],"appearance":[1],"formButtonType":[1,"form-button-type"],"reversed":[4],"size":[1],"confirm":[4],"confirmYesText":[1,"confirm-yes-text"],"confirmNoText":[1,"confirm-no-text"],"confirmMessage":[1,"confirm-message"],"disabled":[4],"focused":[32],"modalVisible":[32]}]]],["dnn-permissions-grid.cjs",[[1,"dnn-permissions-grid",{"permissions":[1040],"roleGroups":[16],"roles":[16],"resx":[16],"foundUsers":[16],"selectedRoleGroupId":[32],"userQuery":[32],"pickedUser":[32],"localResx":[32],"focused":[32]},null,{"foundUsers":["handleFoundUsersChanged"],"resx":["resxChanged"]}]]],["dnn-fieldset.cjs",[[1,"dnn-fieldset",{"focused":[1540],"disabled":[1540],"invalid":[1540],"label":[1],"floatLabel":[1540,"float-label"],"helpText":[1,"help-text"],"resizable":[1],"customValidityMessage":[32],"setFocused":[64],"setBlurred":[64],"disable":[64],"enable":[64],"pinLabel":[64],"unpinLabel":[64],"setValidity":[64]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["dnn-color-input.cjs",[[65,"dnn-color-input",{"color":[1025],"contrastColor":[1025,"contrast-color"],"lightColor":[1025,"light-color"],"darkColor":[1025,"dark-color"],"label":[1],"readonly":[4],"localization":[16],"name":[1],"helpText":[1,"help-text"],"useContrastColor":[4,"use-contrast-color"],"useLightColor":[4,"use-light-color"],"useDarkColor":[4,"use-dark-color"],"currentColor":[32],"focused":[32]},null,{"currentColor":["currentColorChanged"]}]]],["dnn-image-cropper.cjs",[[65,"dnn-image-cropper",{"width":[2],"height":[2],"resx":[16],"quality":[2],"preventUndersized":[4,"prevent-undersized"],"name":[1],"view":[32],"localResx":[32],"fileName":[32],"focused":[32],"clear":[64]},null,{"resx":["resxChanged"]}]]],["dnn-autocomplete.cjs",[[65,"dnn-autocomplete",{"label":[1],"name":[1],"helpText":[1,"help-text"],"value":[1537],"required":[4],"disabled":[4],"suggestions":[16],"renderSuggestion":[16],"totalSuggestions":[2,"total-suggestions"],"preloadThresholdPixels":[2,"preload-threshold-pixels"],"focused":[32],"valid":[32],"customValidityMessage":[32],"selectedIndex":[32],"positionInitialized":[32],"lastScrollTop":[32],"checkValidity":[64],"setCustomValidity":[64]},[[4,"click","handleOutsideClick"]]]]],["dnn-input.cjs",[[65,"dnn-input",{"type":[1025],"label":[1],"name":[1],"value":[1544],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"min":[8],"max":[8],"minlength":[2],"maxlength":[2],"multiple":[4],"pattern":[1],"readonly":[4],"step":[8],"disableValidityReporting":[4,"disable-validity-reporting"],"allowShowPassword":[4,"allow-show-password"],"focused":[32],"valid":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-select.cjs",[[65,"dnn-select",{"label":[1],"name":[1],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"disableValidityReporting":[4,"disable-validity-reporting"],"value":[1537],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64]}]]],["dnn-textarea.cjs",[[65,"dnn-textarea",{"resizable":[1],"value":[1025],"label":[1],"name":[1],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"minlength":[2],"maxlength":[2],"readonly":[4],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-treeview-item.cjs",[[1,"dnn-treeview-item",{"expanded":[1540],"hasChildren":[32],"focused":[32]},null,{"expanded":["watchExpanded"]}]]],["dnn-chevron.cjs",[[1,"dnn-chevron",{"expandText":[1,"expand-text"],"collapseText":[1,"collapse-text"],"expanded":[1540],"focused":[32]},null,{"expanded":["handleExpandedChanged"]}]]],["dnn-monaco-editor.cjs",[[66,"dnn-monaco-editor",{"language":[1],"value":[1025],"name":[1],"focused":[32]},null,{"language":["languageChanged"],"value":["valueChanged"]}]]],["dnn-progress-bar.cjs",[[1,"dnn-progress-bar",{"value":[2],"max":[2],"useGradient":[4,"use-gradient"]}]]],["dnn-richtext.cjs",[[65,"dnn-richtext",{"options":[16],"value":[1],"name":[1],"focused":[32]},null,{"value":["watchValueChanged"]}]]],["dnn-sort-icon.cjs",[[1,"dnn-sort-icon",{"sortDirection":[1025,"sort-direction"],"focused":[32]}]]],["dnn-toggle.cjs",[[65,"dnn-toggle",{"checked":[1028],"disabled":[4],"name":[1],"value":[1],"focused":[32]},null,{"checked":["checkedChanged"]}]]],["dnn-vertical-overflow-menu.cjs",[[1,"dnn-vertical-overflow-menu",{"showDropdownButton":[32],"showDropdownMenu":[32]}]]],["dnn-vertical-splitview.cjs",[[1,"dnn-vertical-splitview",{"splitterWidth":[2,"splitter-width"],"splitWidthPercentage":[1026,"split-width-percentage"],"leftWidth":[32],"rightWidth":[32],"setSplitWidthPercentage":[64],"getSplitWidthPercentage":[64]}]]],["dnn-checkbox.cjs",[[65,"dnn-checkbox",{"checked":[1025],"useIntermediate":[4,"use-intermediate"],"value":[1],"name":[1],"focused":[32]},null,{"checked":["handleCheckedChange"]}]]],["dnn-color-picker.cjs",[[1,"dnn-color-picker",{"color":[1],"colorBoxHeight":[1,"color-box-height"],"currentColor":[32],"rgbDisplay":[32],"hslDisplay":[32],"hexDisplay":[32],"focused":[32]},null,{"currentColor":["handeCurrentColorChanged"]}]]],["dnn-dropzone.cjs",[[65,"dnn-dropzone",{"resx":[16],"allowedExtensions":[16],"allowCameraMode":[4,"allow-camera-mode"],"captureQuality":[2,"capture-quality"],"maxFileSize":[2,"max-file-size"],"name":[1],"canTakeSnapshots":[32],"takingPicture":[32],"fileTooLarge":[32],"invalidExtension":[32],"localResx":[32],"focused":[32]},null,{"resx":["resxChanged"]}]]],["dnn-searchbox.cjs",[[1,"dnn-searchbox",{"placeholder":[1],"debounced":[4],"debounceTime":[2,"debounce-time"],"query":[1025],"focused":[32]},null,{"query":["handleQueryChanged"]}]]],["dnn-tab_2.cjs",[[1,"dnn-tab",{"tabTitle":[1,"tab-title"],"visible":[32],"show":[64],"hide":[64]}],[1,"dnn-tabs",{"tabTitles":[32],"selectedTabTitle":[32]}]]],["dnn-collapsible.cjs",[[1,"dnn-collapsible",{"expanded":[516],"transitionDuration":[2,"transition-duration"],"updateSize":[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{"expanded":["handledExpandedChanged"]}]]],["dnn-modal.cjs",[[1,"dnn-modal",{"backdropDismiss":[4,"backdrop-dismiss"],"closeText":[1,"close-text"],"resizable":[4],"showCloseButton":[4,"show-close-button"],"visible":[1540],"show":[64],"hide":[64]}]]],["dnn-button.cjs",[[65,"dnn-button",{"type":[1],"appearance":[1],"formButtonType":[1,"form-button-type"],"reversed":[4],"size":[1],"confirm":[4],"confirmYesText":[1,"confirm-yes-text"],"confirmNoText":[1,"confirm-no-text"],"confirmMessage":[1,"confirm-message"],"disabled":[4],"focused":[32],"modalVisible":[32]}]]],["dnn-permissions-grid.cjs",[[1,"dnn-permissions-grid",{"permissions":[1040],"roleGroups":[16],"roles":[16],"resx":[16],"foundUsers":[16],"selectedRoleGroupId":[32],"userQuery":[32],"pickedUser":[32],"localResx":[32],"focused":[32]},null,{"foundUsers":["handleFoundUsersChanged"],"resx":["resxChanged"]}]]],["dnn-fieldset.cjs",[[1,"dnn-fieldset",{"focused":[1540],"disabled":[1540],"invalid":[1540],"label":[1],"floatLabel":[1540,"float-label"],"helpText":[1,"help-text"],"resizable":[1],"customValidityMessage":[32],"setFocused":[64],"setBlurred":[64],"disable":[64],"enable":[64],"pinLabel":[64],"unpinLabel":[64],"setValidity":[64]}]]]], options);
11
+ return index.bootstrapLazy([["dnn-color-input.cjs",[[65,"dnn-color-input",{"color":[1025],"contrastColor":[1025,"contrast-color"],"lightColor":[1025,"light-color"],"darkColor":[1025,"dark-color"],"label":[1],"readonly":[4],"localization":[16],"name":[1],"helpText":[1,"help-text"],"useContrastColor":[4,"use-contrast-color"],"useLightColor":[4,"use-light-color"],"useDarkColor":[4,"use-dark-color"],"currentColor":[32],"focused":[32]},null,{"currentColor":["currentColorChanged"]}]]],["dnn-image-cropper.cjs",[[65,"dnn-image-cropper",{"width":[2],"height":[2],"resx":[16],"quality":[2],"preventUndersized":[4,"prevent-undersized"],"name":[1],"view":[32],"localResx":[32],"fileName":[32],"focused":[32],"clear":[64]},null,{"resx":["resxChanged"]}]]],["dnn-autocomplete.cjs",[[65,"dnn-autocomplete",{"label":[1],"name":[1],"helpText":[1,"help-text"],"value":[1537],"required":[4],"disabled":[4],"suggestions":[16],"renderSuggestion":[16],"totalSuggestions":[2,"total-suggestions"],"preloadThresholdPixels":[2,"preload-threshold-pixels"],"focused":[32],"valid":[32],"customValidityMessage":[32],"selectedIndex":[32],"positionInitialized":[32],"lastScrollTop":[32],"checkValidity":[64],"setCustomValidity":[64]},[[4,"click","handleOutsideClick"]]]]],["dnn-input.cjs",[[65,"dnn-input",{"type":[1025],"label":[1],"name":[1],"value":[1544],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"min":[8],"max":[8],"minlength":[2],"maxlength":[2],"multiple":[4],"pattern":[1],"readonly":[4],"step":[8],"disableValidityReporting":[4,"disable-validity-reporting"],"allowShowPassword":[4,"allow-show-password"],"focused":[32],"valid":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-select.cjs",[[65,"dnn-select",{"label":[1],"name":[1],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"disableValidityReporting":[4,"disable-validity-reporting"],"value":[1537],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64]}]]],["dnn-textarea.cjs",[[65,"dnn-textarea",{"resizable":[1],"value":[1025],"label":[1],"name":[1],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"minlength":[2],"maxlength":[2],"readonly":[4],"rows":[2],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-treeview-item.cjs",[[1,"dnn-treeview-item",{"expanded":[1540],"hasChildren":[32],"focused":[32]},null,{"expanded":["watchExpanded"]}]]],["dnn-chevron.cjs",[[1,"dnn-chevron",{"expandText":[1,"expand-text"],"collapseText":[1,"collapse-text"],"expanded":[1540],"focused":[32]},null,{"expanded":["handleExpandedChanged"]}]]],["dnn-monaco-editor.cjs",[[66,"dnn-monaco-editor",{"language":[1],"value":[1025],"name":[1],"focused":[32]},null,{"language":["languageChanged"],"value":["valueChanged"]}]]],["dnn-progress-bar.cjs",[[1,"dnn-progress-bar",{"value":[2],"max":[2],"useGradient":[4,"use-gradient"]}]]],["dnn-richtext.cjs",[[65,"dnn-richtext",{"options":[16],"value":[1],"name":[1],"focused":[32]},null,{"value":["watchValueChanged"]}]]],["dnn-sort-icon.cjs",[[1,"dnn-sort-icon",{"sortDirection":[1025,"sort-direction"],"focused":[32]}]]],["dnn-toggle.cjs",[[65,"dnn-toggle",{"checked":[1028],"disabled":[4],"name":[1],"value":[1],"focused":[32]},null,{"checked":["checkedChanged"]}]]],["dnn-vertical-overflow-menu.cjs",[[1,"dnn-vertical-overflow-menu",{"showDropdownButton":[32],"showDropdownMenu":[32]}]]],["dnn-vertical-splitview.cjs",[[1,"dnn-vertical-splitview",{"splitterWidth":[2,"splitter-width"],"splitWidthPercentage":[1026,"split-width-percentage"],"leftWidth":[32],"rightWidth":[32],"setSplitWidthPercentage":[64],"getSplitWidthPercentage":[64]}]]],["dnn-checkbox.cjs",[[65,"dnn-checkbox",{"checked":[1025],"useIntermediate":[4,"use-intermediate"],"value":[1],"name":[1],"focused":[32]},null,{"checked":["handleCheckedChange"]}]]],["dnn-color-picker.cjs",[[1,"dnn-color-picker",{"color":[1],"colorBoxHeight":[1,"color-box-height"],"currentColor":[32],"rgbDisplay":[32],"hslDisplay":[32],"hexDisplay":[32],"focused":[32]},null,{"currentColor":["handeCurrentColorChanged"]}]]],["dnn-dropzone.cjs",[[65,"dnn-dropzone",{"resx":[16],"allowedExtensions":[16],"allowCameraMode":[4,"allow-camera-mode"],"captureQuality":[2,"capture-quality"],"maxFileSize":[2,"max-file-size"],"name":[1],"canTakeSnapshots":[32],"takingPicture":[32],"fileTooLarge":[32],"invalidExtension":[32],"localResx":[32],"focused":[32]},null,{"resx":["resxChanged"]}]]],["dnn-searchbox.cjs",[[1,"dnn-searchbox",{"placeholder":[1],"debounced":[4],"debounceTime":[2,"debounce-time"],"query":[1025],"focused":[32]},null,{"query":["handleQueryChanged"]}]]],["dnn-tab_2.cjs",[[1,"dnn-tab",{"tabTitle":[1,"tab-title"],"visible":[32],"show":[64],"hide":[64]}],[1,"dnn-tabs",{"tabTitles":[32],"selectedTabTitle":[32]}]]],["dnn-collapsible.cjs",[[1,"dnn-collapsible",{"expanded":[516],"transitionDuration":[2,"transition-duration"],"updateSize":[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{"expanded":["handledExpandedChanged"]}]]],["dnn-modal.cjs",[[1,"dnn-modal",{"backdropDismiss":[4,"backdrop-dismiss"],"closeText":[1,"close-text"],"resizable":[4],"showCloseButton":[4,"show-close-button"],"visible":[1540],"show":[64],"hide":[64]}]]],["dnn-button.cjs",[[65,"dnn-button",{"type":[1],"appearance":[1],"formButtonType":[1,"form-button-type"],"reversed":[4],"size":[1],"confirm":[4],"confirmYesText":[1,"confirm-yes-text"],"confirmNoText":[1,"confirm-no-text"],"confirmMessage":[1,"confirm-message"],"disabled":[4],"focused":[32],"modalVisible":[32]}]]],["dnn-permissions-grid.cjs",[[1,"dnn-permissions-grid",{"permissions":[1040],"roleGroups":[16],"roles":[16],"resx":[16],"foundUsers":[16],"selectedRoleGroupId":[32],"userQuery":[32],"pickedUser":[32],"localResx":[32],"focused":[32]},null,{"foundUsers":["handleFoundUsersChanged"],"resx":["resxChanged"]}]]],["dnn-fieldset.cjs",[[1,"dnn-fieldset",{"focused":[1540],"disabled":[1540],"invalid":[1540],"label":[1],"floatLabel":[1540,"float-label"],"helpText":[1,"help-text"],"resizable":[1],"customValidityMessage":[32],"setFocused":[64],"setBlurred":[64],"disable":[64],"enable":[64],"pinLabel":[64],"unpinLabel":[64],"setValidity":[64]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -21,7 +21,8 @@ textarea {
21
21
  outline: none;
22
22
  background-color: transparent;
23
23
  color: var(--foreground);
24
- width: 100%;
25
- height: 100%;
24
+ width: calc(100% - 1em);
25
+ height: calc(100% - 1em);
26
+ line-height: 1.5em;
26
27
  resize: none;
27
28
  }
@@ -14,6 +14,7 @@ export class DnnTextarea {
14
14
  this.minlength = undefined;
15
15
  this.maxlength = undefined;
16
16
  this.readonly = undefined;
17
+ this.rows = 3;
17
18
  this.focused = false;
18
19
  this.valid = true;
19
20
  this.customValidityMessage = undefined;
@@ -36,6 +37,7 @@ export class DnnTextarea {
36
37
  }
37
38
  componentWillLoad() {
38
39
  this.labelId = generateRandomId();
40
+ this.textarea.style.minHeight = `${this.rows * 1.5}em`;
39
41
  }
40
42
  // eslint-disable-next-line @stencil-community/own-methods-must-be-private
41
43
  formResetCallback() {
@@ -76,7 +78,7 @@ export class DnnTextarea {
76
78
  }
77
79
  render() {
78
80
  var _a;
79
- return (h(Host, { key: 'a3b5e0100ce757b101071df983a91706fc0466f7', tabIndex: this.focused ? -1 : 0, onFocus: () => this.textarea.focus(), onBlur: () => this.textarea.blur() }, h("dnn-fieldset", { key: 'fdf3fbd79a23657f71a33275f34598e2ecbce692', ref: el => this.fieldset = el, invalid: !this.valid, focused: this.focused, resizable: this.resizable, label: `${(_a = this.label) !== null && _a !== void 0 ? _a : ""}${this.required ? " *" : ""}`, helpText: this.helpText, disabled: this.disabled, id: this.labelId, floatLabel: this.shouldLabelFloat(), onClick: () => !this.focused && this.textarea.focus() }, h("textarea", { key: '77fec48727c61e467c19ad3cefaaa43a0187b018', ref: el => this.textarea = el, name: this.name, value: this.value, required: this.required, onBlur: () => this.focused = false, onFocus: () => this.focused = true, onChange: () => this.handleChange(), onInput: e => this.handleInput(e.target.value), onInvalid: () => this.handleInvalid(), disabled: this.disabled, autoComplete: this.autocomplete, minlength: this.minlength, maxlength: this.maxlength, readonly: this.readonly, "aria-labelledby": this.labelId }))));
81
+ return (h(Host, { key: 'b1b22b0fdc9975613ff99e40d7a8fa6047f62105', tabIndex: this.focused ? -1 : 0, onFocus: () => this.textarea.focus(), onBlur: () => this.textarea.blur() }, h("dnn-fieldset", { key: '6e509bb911c243f10c1af6fb70e0aefd49ddb2ad', ref: el => this.fieldset = el, invalid: !this.valid, focused: this.focused, resizable: this.resizable, label: `${(_a = this.label) !== null && _a !== void 0 ? _a : ""}${this.required ? " *" : ""}`, helpText: this.helpText, disabled: this.disabled, id: this.labelId, floatLabel: this.shouldLabelFloat(), onClick: () => !this.focused && this.textarea.focus() }, h("textarea", { key: '9dd9d48e90d6cd12c88e1d09fd1b60b018761845', ref: el => this.textarea = el, name: this.name, value: this.value, required: this.required, onBlur: () => this.focused = false, onFocus: () => this.focused = true, onChange: () => this.handleChange(), onInput: e => this.handleInput(e.target.value), onInvalid: () => this.handleInvalid(), disabled: this.disabled, autoComplete: this.autocomplete, minlength: this.minlength, maxlength: this.maxlength, readonly: this.readonly, "aria-labelledby": this.labelId, rows: this.rows }))));
80
82
  }
81
83
  static get is() { return "dnn-textarea"; }
82
84
  static get encapsulation() { return "shadow"; }
@@ -281,6 +283,24 @@ export class DnnTextarea {
281
283
  },
282
284
  "attribute": "readonly",
283
285
  "reflect": false
286
+ },
287
+ "rows": {
288
+ "type": "number",
289
+ "mutable": false,
290
+ "complexType": {
291
+ "original": "number",
292
+ "resolved": "number",
293
+ "references": {}
294
+ },
295
+ "required": false,
296
+ "optional": false,
297
+ "docs": {
298
+ "tags": [],
299
+ "text": "Defines how many rows (lines of text) to initially show."
300
+ },
301
+ "attribute": "rows",
302
+ "reflect": false,
303
+ "defaultValue": "3"
284
304
  }
285
305
  };
286
306
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dnn-textarea.js","sourceRoot":"","sources":["../../../src/components/dnn-textarea/dnn-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,mCAAmC;AAOnC,MAAM,OAAO,WAAW;;yBAEgE,OAAO;;;;;;;4BAqB9D,KAAK;;;;uBAsCjB,KAAK;qBACP,IAAI;;;IAtBrB,6GAA6G;IAE7G,KAAK,CAAC,aAAa;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAChC,CAAC;IAED,oDAAoD;IAEpD,KAAK,CAAC,iBAAiB,CAAC,OAAe;QACrC,IAAI,OAAO,IAAI,SAAS,IAAI,OAAO,IAAI,EAAE,EAAE,CAAC;YAC1C,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAChC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAYD,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,gBAAgB,EAAE,CAAC;IACpC,CAAC;IAED,0EAA0E;IAC1E,iBAAiB;QACf,IAAI,CAAC,QAAQ,CAAC,iBAAiB,C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G,KAAK,EAClC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,GAAC,IAAI,EAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EACnC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAE,CAAC,CAAC,MAA8B,CAAC,KAAK,CAAC,EACvE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,EACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,qBACN,IAAI,CAAC,OAAO,GAC7B,CACW,CACV,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, AttachInternals, State, Event, EventEmitter, Method } from '@stencil/core';\nimport { generateRandomId } from '../../utilities/stringUtilities';\n\n/** A custom textarea component. */\n@Component({\n tag: 'dnn-textarea',\n styleUrl: 'dnn-textarea.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DnnTextarea {\n /** Can be set to change how the user can resize the field. */\n @Prop() resizable: \"none\" | \"both\" | \"horizontal\" | \"vertical\" | \"block\" | \"inline\" = \"block\";\n\n /** Sets the value of the textarea. */\n @Prop({mutable: true}) value: string;\n\n /** The label for this input. */\n @Prop() label: string;\n\n /** The name for this input when used in forms. */\n @Prop() name: string;\n\n /** Defines the help label displayed under the field. */\n @Prop() helpText: string;\n\n /** Defines whether the field requires having a value. */\n @Prop() required: boolean;\n\n /** Defines whether the field is disabled. */\n @Prop() disabled: boolean;\n\n /** Defines the type of auto-completion to use for this field, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete. */\n @Prop() autocomplete: string = \"off\";\n\n /** Defines the minimum amount of charaters. */\n @Prop() minlength: number;\n\n /** Defines the maximum amount of charaters. */\n @Prop() maxlength: number;\n\n /** Defines wheter the defined value is readonly. */\n @Prop() readonly: boolean;\n\n /** Fires when the using is inputing data (on keystrokes). */\n @Event() valueInput: EventEmitter<string>;\n\n /** Fires when the value has changed and the user exits the input. */\n @Event() valueChange: EventEmitter<string>;\n\n /** Reports the input validity details. See https://developer.mozilla.org/en-US/docs/Web/API/ValidityState */\n @Method()\n async checkValidity(): Promise<ValidityState> {\n return this.textarea.validity;\n }\n\n /** Can be used to set a custom validity message. */\n @Method()\n async setCustomValidity(message: string): Promise<void> {\n if (message == undefined || message == \"\") {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.fieldset.setValidity(true);\n return;\n }\n\n this.customValidityMessage = message;\n this.valid = false;\n this.textarea.setCustomValidity(message);\n }\n\n @State() focused = false;\n @State() valid = true;\n @State() customValidityMessage: string;\n\n @AttachInternals() internals: ElementInternals;\n \n private textarea: HTMLTextAreaElement;\n private fieldset: HTMLDnnFieldsetElement;\n private labelId: string;\n\n componentWillLoad() {\n this.labelId = generateRandomId();\n }\n\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n formResetCallback() {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.value = \"\";\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n private handleInput(value: string): void {\n this.value = value;\n var valid = this.textarea.checkValidity();\n this.valid = valid;\n this.valueInput.emit(this.value);\n }\n\n private handleInvalid(): void {\n this.valid = false;\n if (this.customValidityMessage == undefined){\n this.customValidityMessage = this.textarea.validationMessage;\n }\n }\n\n private handleChange() {\n this.valueChange.emit(this.value);\n if (this.name != undefined){\n var data = new FormData();\n data.append(this.name, this.value.toString());\n this.internals.setFormValue(data);\n }\n }\n\n private shouldLabelFloat(): boolean {\n if (this.focused) {\n return false;\n }\n\n if (this.value != undefined && this.value != \"\") {\n return false;\n }\n \n return true;\n }\n\n render() {\n return (\n <Host\n tabIndex={this.focused ? -1 : 0}\n onFocus={() => this.textarea.focus()}\n onBlur={() => this.textarea.blur()}\n >\n <dnn-fieldset\n ref={el => this.fieldset = el}\n invalid={!this.valid}\n focused={this.focused}\n resizable={this.resizable}\n label={`${this.label ?? \"\"}${this.required ? \" *\" : \"\"}`}\n helpText={this.helpText}\n disabled={this.disabled}\n id={this.labelId}\n floatLabel={this.shouldLabelFloat()}\n onClick={() => !this.focused && this.textarea.focus()}\n >\n <textarea\n ref={el => this.textarea = el}\n name={this.name}\n value={this.value}\n required={this.required}\n onBlur={() => this.focused = false}\n onFocus={() => this.focused=true}\n onChange={() => this.handleChange()}\n onInput={e => this.handleInput((e.target as HTMLTextAreaElement).value)}\n onInvalid={() => this.handleInvalid()}\n disabled={this.disabled}\n autoComplete={this.autocomplete}\n minlength={this.minlength}\n maxlength={this.maxlength}\n readonly={this.readonly}\n aria-labelledby={this.labelId}\n />\n </dnn-fieldset>\n </Host>\n );\n }\n\n}\n"]}
1
+ {"version":3,"file":"dnn-textarea.js","sourceRoot":"","sources":["../../../src/components/dnn-textarea/dnn-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,mCAAmC;AAOnC,MAAM,OAAO,WAAW;;yBA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AC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,qBACN,IAAI,CAAC,OAAO,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,GACf,CACW,CACV,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, AttachInternals, State, Event, EventEmitter, Method } from '@stencil/core';\nimport { generateRandomId } from '../../utilities/stringUtilities';\n\n/** A custom textarea component. */\n@Component({\n tag: 'dnn-textarea',\n styleUrl: 'dnn-textarea.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DnnTextarea {\n /** Can be set to change how the user can resize the field. */\n @Prop() resizable: \"none\" | \"both\" | \"horizontal\" | \"vertical\" | \"block\" | \"inline\" = \"block\";\n\n /** Sets the value of the textarea. */\n @Prop({mutable: true}) value: string;\n\n /** The label for this input. */\n @Prop() label: string;\n\n /** The name for this input when used in forms. */\n @Prop() name: string;\n\n /** Defines the help label displayed under the field. */\n @Prop() helpText: string;\n\n /** Defines whether the field requires having a value. */\n @Prop() required: boolean;\n\n /** Defines whether the field is disabled. */\n @Prop() disabled: boolean;\n\n /** Defines the type of auto-completion to use for this field, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete. */\n @Prop() autocomplete: string = \"off\";\n\n /** Defines the minimum amount of charaters. */\n @Prop() minlength: number;\n\n /** Defines the maximum amount of charaters. */\n @Prop() maxlength: number;\n\n /** Defines wheter the defined value is readonly. */\n @Prop() readonly: boolean;\n\n /** Defines how many rows (lines of text) to initially show. */\n @Prop() rows: number = 3;\n\n /** Fires when the using is inputing data (on keystrokes). */\n @Event() valueInput: EventEmitter<string>;\n\n /** Fires when the value has changed and the user exits the input. */\n @Event() valueChange: EventEmitter<string>;\n\n /** Reports the input validity details. See https://developer.mozilla.org/en-US/docs/Web/API/ValidityState */\n @Method()\n async checkValidity(): Promise<ValidityState> {\n return this.textarea.validity;\n }\n\n /** Can be used to set a custom validity message. */\n @Method()\n async setCustomValidity(message: string): Promise<void> {\n if (message == undefined || message == \"\") {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.fieldset.setValidity(true);\n return;\n }\n\n this.customValidityMessage = message;\n this.valid = false;\n this.textarea.setCustomValidity(message);\n }\n\n @State() focused = false;\n @State() valid = true;\n @State() customValidityMessage: string;\n\n @AttachInternals() internals: ElementInternals;\n \n private textarea: HTMLTextAreaElement;\n private fieldset: HTMLDnnFieldsetElement;\n private labelId: string;\n\n componentWillLoad() {\n this.labelId = generateRandomId();\n this.textarea.style.minHeight = `${this.rows * 1.5}em`;\n }\n\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n formResetCallback() {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.value = \"\";\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n private handleInput(value: string): void {\n this.value = value;\n var valid = this.textarea.checkValidity();\n this.valid = valid;\n this.valueInput.emit(this.value);\n }\n\n private handleInvalid(): void {\n this.valid = false;\n if (this.customValidityMessage == undefined){\n this.customValidityMessage = this.textarea.validationMessage;\n }\n }\n\n private handleChange() {\n this.valueChange.emit(this.value);\n if (this.name != undefined){\n var data = new FormData();\n data.append(this.name, this.value.toString());\n this.internals.setFormValue(data);\n }\n }\n\n private shouldLabelFloat(): boolean {\n if (this.focused) {\n return false;\n }\n\n if (this.value != undefined && this.value != \"\") {\n return false;\n }\n \n return true;\n }\n\n render() {\n return (\n <Host\n tabIndex={this.focused ? -1 : 0}\n onFocus={() => this.textarea.focus()}\n onBlur={() => this.textarea.blur()}\n >\n <dnn-fieldset\n ref={el => this.fieldset = el}\n invalid={!this.valid}\n focused={this.focused}\n resizable={this.resizable}\n label={`${this.label ?? \"\"}${this.required ? \" *\" : \"\"}`}\n helpText={this.helpText}\n disabled={this.disabled}\n id={this.labelId}\n floatLabel={this.shouldLabelFloat()}\n onClick={() => !this.focused && this.textarea.focus()}\n >\n <textarea\n ref={el => this.textarea = el}\n name={this.name}\n value={this.value}\n required={this.required}\n onBlur={() => this.focused = false}\n onFocus={() => this.focused=true}\n onChange={() => this.handleChange()}\n onInput={e => this.handleInput((e.target as HTMLTextAreaElement).value)}\n onInvalid={() => this.handleInvalid()}\n disabled={this.disabled}\n autoComplete={this.autocomplete}\n minlength={this.minlength}\n maxlength={this.maxlength}\n readonly={this.readonly}\n aria-labelledby={this.labelId}\n rows={this.rows}\n />\n </dnn-fieldset>\n </Host>\n );\n }\n\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{p as e,b as l}from"./p-978abd50.js";export{s as setNonce}from"./p-978abd50.js";import{g as a}from"./p-e1255160.js";var t=()=>{const l=import.meta.url;const a={};if(l!==""){a.resourcesUrl=new URL(".",l).href}return e(a)};t().then((async e=>{await a();return l([["p-b96b7c4a",[[65,"dnn-color-input",{color:[1025],contrastColor:[1025,"contrast-color"],lightColor:[1025,"light-color"],darkColor:[1025,"dark-color"],label:[1],readonly:[4],localization:[16],name:[1],helpText:[1,"help-text"],useContrastColor:[4,"use-contrast-color"],useLightColor:[4,"use-light-color"],useDarkColor:[4,"use-dark-color"],currentColor:[32],focused:[32]},null,{currentColor:["currentColorChanged"]}]]],["p-70b71aeb",[[65,"dnn-image-cropper",{width:[2],height:[2],resx:[16],quality:[2],preventUndersized:[4,"prevent-undersized"],name:[1],view:[32],localResx:[32],fileName:[32],focused:[32],clear:[64]},null,{resx:["resxChanged"]}]]],["p-ec753af4",[[65,"dnn-autocomplete",{label:[1],name:[1],helpText:[1,"help-text"],value:[1537],required:[4],disabled:[4],suggestions:[16],renderSuggestion:[16],totalSuggestions:[2,"total-suggestions"],preloadThresholdPixels:[2,"preload-threshold-pixels"],focused:[32],valid:[32],customValidityMessage:[32],selectedIndex:[32],positionInitialized:[32],lastScrollTop:[32],checkValidity:[64],setCustomValidity:[64]},[[4,"click","handleOutsideClick"]]]]],["p-07a78c58",[[65,"dnn-input",{type:[1025],label:[1],name:[1],value:[1544],helpText:[1,"help-text"],required:[4],disabled:[4],autocomplete:[1],min:[8],max:[8],minlength:[2],maxlength:[2],multiple:[4],pattern:[1],readonly:[4],step:[8],disableValidityReporting:[4,"disable-validity-reporting"],allowShowPassword:[4,"allow-show-password"],focused:[32],valid:[32],checkValidity:[64],setCustomValidity:[64]}]]],["p-9ecfe643",[[65,"dnn-select",{label:[1],name:[1],required:[4],helpText:[1,"help-text"],disabled:[4],disableValidityReporting:[4,"disable-validity-reporting"],value:[1537],focused:[32],valid:[32],customValidityMessage:[32],checkValidity:[64]}]]],["p-ceae28fc",[[65,"dnn-textarea",{resizable:[1],value:[1025],label:[1],name:[1],helpText:[1,"help-text"],required:[4],disabled:[4],autocomplete:[1],minlength:[2],maxlength:[2],readonly:[4],focused:[32],valid:[32],customValidityMessage:[32],checkValidity:[64],setCustomValidity:[64]}]]],["p-8564bc60",[[1,"dnn-treeview-item",{expanded:[1540],hasChildren:[32],focused:[32]},null,{expanded:["watchExpanded"]}]]],["p-5b15b44a",[[1,"dnn-chevron",{expandText:[1,"expand-text"],collapseText:[1,"collapse-text"],expanded:[1540],focused:[32]},null,{expanded:["handleExpandedChanged"]}]]],["p-50b6bb3f",[[66,"dnn-monaco-editor",{language:[1],value:[1025],name:[1],focused:[32]},null,{language:["languageChanged"],value:["valueChanged"]}]]],["p-7c4bcd14",[[1,"dnn-progress-bar",{value:[2],max:[2],useGradient:[4,"use-gradient"]}]]],["p-e23840d6",[[65,"dnn-richtext",{options:[16],value:[1],name:[1],focused:[32]},null,{value:["watchValueChanged"]}]]],["p-6e54915d",[[1,"dnn-sort-icon",{sortDirection:[1025,"sort-direction"],focused:[32]}]]],["p-350e4008",[[65,"dnn-toggle",{checked:[1028],disabled:[4],name:[1],value:[1],focused:[32]},null,{checked:["checkedChanged"]}]]],["p-3b3475e0",[[1,"dnn-vertical-overflow-menu",{showDropdownButton:[32],showDropdownMenu:[32]}]]],["p-90dd4620",[[1,"dnn-vertical-splitview",{splitterWidth:[2,"splitter-width"],splitWidthPercentage:[1026,"split-width-percentage"],leftWidth:[32],rightWidth:[32],setSplitWidthPercentage:[64],getSplitWidthPercentage:[64]}]]],["p-3d1d6321",[[65,"dnn-checkbox",{checked:[1025],useIntermediate:[4,"use-intermediate"],value:[1],name:[1],focused:[32]},null,{checked:["handleCheckedChange"]}]]],["p-61dfb826",[[1,"dnn-color-picker",{color:[1],colorBoxHeight:[1,"color-box-height"],currentColor:[32],rgbDisplay:[32],hslDisplay:[32],hexDisplay:[32],focused:[32]},null,{currentColor:["handeCurrentColorChanged"]}]]],["p-2486e9db",[[65,"dnn-dropzone",{resx:[16],allowedExtensions:[16],allowCameraMode:[4,"allow-camera-mode"],captureQuality:[2,"capture-quality"],maxFileSize:[2,"max-file-size"],name:[1],canTakeSnapshots:[32],takingPicture:[32],fileTooLarge:[32],invalidExtension:[32],localResx:[32],focused:[32]},null,{resx:["resxChanged"]}]]],["p-4574844c",[[1,"dnn-searchbox",{placeholder:[1],debounced:[4],debounceTime:[2,"debounce-time"],query:[1025],focused:[32]},null,{query:["handleQueryChanged"]}]]],["p-96c850a8",[[1,"dnn-tab",{tabTitle:[1,"tab-title"],visible:[32],show:[64],hide:[64]}],[1,"dnn-tabs",{tabTitles:[32],selectedTabTitle:[32]}]]],["p-21c5ef07",[[1,"dnn-collapsible",{expanded:[516],transitionDuration:[2,"transition-duration"],updateSize:[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{expanded:["handledExpandedChanged"]}]]],["p-d7d6dffb",[[1,"dnn-modal",{backdropDismiss:[4,"backdrop-dismiss"],closeText:[1,"close-text"],resizable:[4],showCloseButton:[4,"show-close-button"],visible:[1540],show:[64],hide:[64]}]]],["p-9b330c82",[[65,"dnn-button",{type:[1],appearance:[1],formButtonType:[1,"form-button-type"],reversed:[4],size:[1],confirm:[4],confirmYesText:[1,"confirm-yes-text"],confirmNoText:[1,"confirm-no-text"],confirmMessage:[1,"confirm-message"],disabled:[4],focused:[32],modalVisible:[32]}]]],["p-b5241c09",[[1,"dnn-permissions-grid",{permissions:[1040],roleGroups:[16],roles:[16],resx:[16],foundUsers:[16],selectedRoleGroupId:[32],userQuery:[32],pickedUser:[32],localResx:[32],focused:[32]},null,{foundUsers:["handleFoundUsersChanged"],resx:["resxChanged"]}]]],["p-b553c159",[[1,"dnn-fieldset",{focused:[1540],disabled:[1540],invalid:[1540],label:[1],floatLabel:[1540,"float-label"],helpText:[1,"help-text"],resizable:[1],customValidityMessage:[32],setFocused:[64],setBlurred:[64],disable:[64],enable:[64],pinLabel:[64],unpinLabel:[64],setValidity:[64]}]]]],e)}));
1
+ import{p as e,b as l}from"./p-978abd50.js";export{s as setNonce}from"./p-978abd50.js";import{g as a}from"./p-e1255160.js";var t=()=>{const l=import.meta.url;const a={};if(l!==""){a.resourcesUrl=new URL(".",l).href}return e(a)};t().then((async e=>{await a();return l([["p-b96b7c4a",[[65,"dnn-color-input",{color:[1025],contrastColor:[1025,"contrast-color"],lightColor:[1025,"light-color"],darkColor:[1025,"dark-color"],label:[1],readonly:[4],localization:[16],name:[1],helpText:[1,"help-text"],useContrastColor:[4,"use-contrast-color"],useLightColor:[4,"use-light-color"],useDarkColor:[4,"use-dark-color"],currentColor:[32],focused:[32]},null,{currentColor:["currentColorChanged"]}]]],["p-70b71aeb",[[65,"dnn-image-cropper",{width:[2],height:[2],resx:[16],quality:[2],preventUndersized:[4,"prevent-undersized"],name:[1],view:[32],localResx:[32],fileName:[32],focused:[32],clear:[64]},null,{resx:["resxChanged"]}]]],["p-ec753af4",[[65,"dnn-autocomplete",{label:[1],name:[1],helpText:[1,"help-text"],value:[1537],required:[4],disabled:[4],suggestions:[16],renderSuggestion:[16],totalSuggestions:[2,"total-suggestions"],preloadThresholdPixels:[2,"preload-threshold-pixels"],focused:[32],valid:[32],customValidityMessage:[32],selectedIndex:[32],positionInitialized:[32],lastScrollTop:[32],checkValidity:[64],setCustomValidity:[64]},[[4,"click","handleOutsideClick"]]]]],["p-07a78c58",[[65,"dnn-input",{type:[1025],label:[1],name:[1],value:[1544],helpText:[1,"help-text"],required:[4],disabled:[4],autocomplete:[1],min:[8],max:[8],minlength:[2],maxlength:[2],multiple:[4],pattern:[1],readonly:[4],step:[8],disableValidityReporting:[4,"disable-validity-reporting"],allowShowPassword:[4,"allow-show-password"],focused:[32],valid:[32],checkValidity:[64],setCustomValidity:[64]}]]],["p-9ecfe643",[[65,"dnn-select",{label:[1],name:[1],required:[4],helpText:[1,"help-text"],disabled:[4],disableValidityReporting:[4,"disable-validity-reporting"],value:[1537],focused:[32],valid:[32],customValidityMessage:[32],checkValidity:[64]}]]],["p-3d55d879",[[65,"dnn-textarea",{resizable:[1],value:[1025],label:[1],name:[1],helpText:[1,"help-text"],required:[4],disabled:[4],autocomplete:[1],minlength:[2],maxlength:[2],readonly:[4],rows:[2],focused:[32],valid:[32],customValidityMessage:[32],checkValidity:[64],setCustomValidity:[64]}]]],["p-8564bc60",[[1,"dnn-treeview-item",{expanded:[1540],hasChildren:[32],focused:[32]},null,{expanded:["watchExpanded"]}]]],["p-5b15b44a",[[1,"dnn-chevron",{expandText:[1,"expand-text"],collapseText:[1,"collapse-text"],expanded:[1540],focused:[32]},null,{expanded:["handleExpandedChanged"]}]]],["p-50b6bb3f",[[66,"dnn-monaco-editor",{language:[1],value:[1025],name:[1],focused:[32]},null,{language:["languageChanged"],value:["valueChanged"]}]]],["p-7c4bcd14",[[1,"dnn-progress-bar",{value:[2],max:[2],useGradient:[4,"use-gradient"]}]]],["p-e23840d6",[[65,"dnn-richtext",{options:[16],value:[1],name:[1],focused:[32]},null,{value:["watchValueChanged"]}]]],["p-6e54915d",[[1,"dnn-sort-icon",{sortDirection:[1025,"sort-direction"],focused:[32]}]]],["p-350e4008",[[65,"dnn-toggle",{checked:[1028],disabled:[4],name:[1],value:[1],focused:[32]},null,{checked:["checkedChanged"]}]]],["p-3b3475e0",[[1,"dnn-vertical-overflow-menu",{showDropdownButton:[32],showDropdownMenu:[32]}]]],["p-90dd4620",[[1,"dnn-vertical-splitview",{splitterWidth:[2,"splitter-width"],splitWidthPercentage:[1026,"split-width-percentage"],leftWidth:[32],rightWidth:[32],setSplitWidthPercentage:[64],getSplitWidthPercentage:[64]}]]],["p-3d1d6321",[[65,"dnn-checkbox",{checked:[1025],useIntermediate:[4,"use-intermediate"],value:[1],name:[1],focused:[32]},null,{checked:["handleCheckedChange"]}]]],["p-61dfb826",[[1,"dnn-color-picker",{color:[1],colorBoxHeight:[1,"color-box-height"],currentColor:[32],rgbDisplay:[32],hslDisplay:[32],hexDisplay:[32],focused:[32]},null,{currentColor:["handeCurrentColorChanged"]}]]],["p-2486e9db",[[65,"dnn-dropzone",{resx:[16],allowedExtensions:[16],allowCameraMode:[4,"allow-camera-mode"],captureQuality:[2,"capture-quality"],maxFileSize:[2,"max-file-size"],name:[1],canTakeSnapshots:[32],takingPicture:[32],fileTooLarge:[32],invalidExtension:[32],localResx:[32],focused:[32]},null,{resx:["resxChanged"]}]]],["p-4574844c",[[1,"dnn-searchbox",{placeholder:[1],debounced:[4],debounceTime:[2,"debounce-time"],query:[1025],focused:[32]},null,{query:["handleQueryChanged"]}]]],["p-96c850a8",[[1,"dnn-tab",{tabTitle:[1,"tab-title"],visible:[32],show:[64],hide:[64]}],[1,"dnn-tabs",{tabTitles:[32],selectedTabTitle:[32]}]]],["p-21c5ef07",[[1,"dnn-collapsible",{expanded:[516],transitionDuration:[2,"transition-duration"],updateSize:[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{expanded:["handledExpandedChanged"]}]]],["p-d7d6dffb",[[1,"dnn-modal",{backdropDismiss:[4,"backdrop-dismiss"],closeText:[1,"close-text"],resizable:[4],showCloseButton:[4,"show-close-button"],visible:[1540],show:[64],hide:[64]}]]],["p-9b330c82",[[65,"dnn-button",{type:[1],appearance:[1],formButtonType:[1,"form-button-type"],reversed:[4],size:[1],confirm:[4],confirmYesText:[1,"confirm-yes-text"],confirmNoText:[1,"confirm-no-text"],confirmMessage:[1,"confirm-message"],disabled:[4],focused:[32],modalVisible:[32]}]]],["p-b5241c09",[[1,"dnn-permissions-grid",{permissions:[1040],roleGroups:[16],roles:[16],resx:[16],foundUsers:[16],selectedRoleGroupId:[32],userQuery:[32],pickedUser:[32],localResx:[32],focused:[32]},null,{foundUsers:["handleFoundUsersChanged"],resx:["resxChanged"]}]]],["p-b553c159",[[1,"dnn-fieldset",{focused:[1540],disabled:[1540],invalid:[1540],label:[1],floatLabel:[1540,"float-label"],helpText:[1,"help-text"],resizable:[1],customValidityMessage:[32],setFocused:[64],setBlurred:[64],disable:[64],enable:[64],pinLabel:[64],unpinLabel:[64],setValidity:[64]}]]]],e)}));
2
2
  //# sourceMappingURL=dnn.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","color","contrastColor","lightColor","darkColor","label","readonly","localization","name","helpText","useContrastColor","useLightColor","useDarkColor","currentColor","focused","width","height","resx","quality","preventUndersized","view","localResx","fileName","clear","value","required","disabled","suggestions","renderSuggestion","totalSuggestions","preloadThresholdPixels","valid","customValidityMessage","selectedIndex","positionInitialized","lastScrollTop","checkValidity","setCustomValidity","type","autocomplete","min","max","minlength","maxlength","multiple","pattern","step","disableValidityReporting","allowShowPassword","resizable","expanded","hasChildren","expandText","collapseText","language","useGradient","sortDirection","checked","showDropdownButton","showDropdownMenu","splitterWidth","splitWidthPercentage","leftWidth","rightWidth","setSplitWidthPercentage","getSplitWidthPercentage","useIntermediate","colorBoxHeight","rgbDisplay","hslDisplay","hexDisplay","allowedExtensions","allowCameraMode","captureQuality","maxFileSize","canTakeSnapshots","takingPicture","fileTooLarge","invalidExtension","placeholder","debounced","debounceTime","query","tabTitle","visible","show","hide","tabTitles","selectedTabTitle","transitionDuration","updateSize","backdropDismiss","closeText","showCloseButton","appearance","formButtonType","reversed","size","confirm","confirmYesText","confirmNoText","confirmMessage","modalVisible","permissions","roleGroups","roles","foundUsers","selectedRoleGroupId","userQuery","pickedUser","invalid","floatLabel","setFocused","setBlurred","disable","enable","pinLabel","unpinLabel","setValidity"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,sCAAsC,CAACC,MAAA,OAAAC,cAAA,wBAAAC,WAAA,qBAAAC,UAAA,oBAAAC,MAAA,IAAAC,SAAA,IAAAC,aAAA,KAAAC,KAAA,IAAAC,SAAA,gBAAAC,iBAAA,yBAAAC,cAAA,sBAAAC,aAAA,qBAAAC,aAAA,KAAAC,QAAA,YAAAD,aAAA,oEAAAE,MAAA,IAAAC,OAAA,IAAAC,KAAA,KAAAC,QAAA,IAAAC,kBAAA,yBAAAX,KAAA,IAAAY,KAAA,KAAAC,UAAA,KAAAC,SAAA,KAAAR,QAAA,KAAAS,MAAA,YAAAN,KAAA,2DAAAZ,MAAA,IAAAG,KAAA,IAAAC,SAAA,gBAAAe,MAAA,OAAAC,SAAA,IAAAC,SAAA,IAAAC,YAAA,KAAAC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DAAAH,QAAA,OAAAY,SAAA,OAAAoF,QAAA,OAAAzG,MAAA,IAAA0G,WAAA,qBAAAtG,SAAA,gBAAAwC,UAAA,IAAAjB,sBAAA,KAAAgF,WAAA,KAAAC,WAAA,KAAAC,QAAA,KAAAC,OAAA,KAAAC,SAAA,KAAAC,WAAA,KAAAC,YAAA,UAAAxH,EAAA","ignoreList":[]}
1
+ {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","color","contrastColor","lightColor","darkColor","label","readonly","localization","name","helpText","useContrastColor","useLightColor","useDarkColor","currentColor","focused","width","height","resx","quality","preventUndersized","view","localResx","fileName","clear","value","required","disabled","suggestions","renderSuggestion","totalSuggestions","preloadThresholdPixels","valid","customValidityMessage","selectedIndex","positionInitialized","lastScrollTop","checkValidity","setCustomValidity","type","autocomplete","min","max","minlength","maxlength","multiple","pattern","step","disableValidityReporting","allowShowPassword","resizable","rows","expanded","hasChildren","expandText","collapseText","language","useGradient","sortDirection","checked","showDropdownButton","showDropdownMenu","splitterWidth","splitWidthPercentage","leftWidth","rightWidth","setSplitWidthPercentage","getSplitWidthPercentage","useIntermediate","colorBoxHeight","rgbDisplay","hslDisplay","hexDisplay","allowedExtensions","allowCameraMode","captureQuality","maxFileSize","canTakeSnapshots","takingPicture","fileTooLarge","invalidExtension","placeholder","debounced","debounceTime","query","tabTitle","visible","show","hide","tabTitles","selectedTabTitle","transitionDuration","updateSize","backdropDismiss","closeText","showCloseButton","appearance","formButtonType","reversed","size","confirm","confirmYesText","confirmNoText","confirmMessage","modalVisible","permissions","roleGroups","roles","foundUsers","selectedRoleGroupId","userQuery","pickedUser","invalid","floatLabel","setFocused","setBlurred","disable","enable","pinLabel","unpinLabel","setValidity"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,C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oBAAAC,MAAA,OAAArE,QAAA,YAAAqE,MAAA,wDAAAC,SAAA,gBAAAC,QAAA,KAAAC,KAAA,KAAAC,KAAA,sBAAAC,UAAA,KAAAC,iBAAA,8CAAAtC,SAAA,MAAAuC,mBAAA,0BAAAC,WAAA,iEAAAxC,SAAA,8DAAAyC,gBAAA,uBAAAC,UAAA,iBAAA5C,UAAA,IAAA6C,gBAAA,wBAAAT,QAAA,OAAAC,KAAA,KAAAC,KAAA,0CAAAjD,KAAA,IAAAyD,WAAA,IAAAC,eAAA,uBAAAC,SAAA,IAAAC,KAAA,IAAAC,QAAA,IAAAC,eAAA,uBAAAC,cAAA,sBAAAC,eAAA,sBAAA5E,SAAA,IAAAZ,QAAA,KAAAyF,aAAA,mDAAAC,YAAA,OAAAC,WAAA,KAAAC,MAAA,KAAAzF,KAAA,KAAA0F,WAAA,KAAAC,oBAAA,KAAAC,UAAA,KAAAC,WAAA,KAAAzF,UAAA,KAAAP,QAAA,YAAA6F,WAAA,4BAAA1F,KAAA,sDAAAH,QAAA,OAAAY,SAAA,OAAAqF,QAAA,OAAA1G,MAAA,IAAA2G,WAAA,qBAAAvG,SAAA,gBAAAwC,UAAA,IAAAjB,sBAAA,KAAAiF,WAAA,KAAAC,WAAA,KAAAC,QAAA,KAAAC,OAAA,KAAAC,SAAA,KAAAC,WAAA,KAAAC,YAAA,UAAAzH,EAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as e,H as s}from"./p-978abd50.js";import{g as n}from"./p-5df01911.js";const h=":host{display:inline-block;--foreground:var(--dnn-color-foreground, #000);--background:var(--dnn-color-background, #fff);--focus-color:var(--dnn-color-primary, #3792ED);--danger-color:var(--dnn-color-danger, #900);--control-radius:var(--dnn-controls-radius, 3px)}dnn-fieldset{width:100%}textarea{border:none;outline:none;background-color:transparent;color:var(--foreground);width:calc(100% - 1em);height:calc(100% - 1em);line-height:1.5em;resize:none}";const d=h;const r=class{constructor(e){t(this,e);this.valueInput=i(this,"valueInput",7);this.valueChange=i(this,"valueChange",7);if(e.$hostElement$["s-ei"]){this.internals=e.$hostElement$["s-ei"]}else{this.internals=e.$hostElement$.attachInternals();e.$hostElement$["s-ei"]=this.internals}this.resizable="block";this.value=undefined;this.label=undefined;this.name=undefined;this.helpText=undefined;this.required=undefined;this.disabled=undefined;this.autocomplete="off";this.minlength=undefined;this.maxlength=undefined;this.readonly=undefined;this.rows=3;this.focused=false;this.valid=true;this.customValidityMessage=undefined}async checkValidity(){return this.textarea.validity}async setCustomValidity(t){if(t==undefined||t==""){this.textarea.setCustomValidity("");this.valid=true;this.fieldset.setValidity(true);return}this.customValidityMessage=t;this.valid=false;this.textarea.setCustomValidity(t)}componentWillLoad(){this.labelId=n();this.textarea.style.minHeight=`${this.rows*1.5}em`}formResetCallback(){this.textarea.setCustomValidity("");this.valid=true;this.value="";this.internals.setValidity({});this.internals.setFormValue("")}handleInput(t){this.value=t;var i=this.textarea.checkValidity();this.valid=i;this.valueInput.emit(this.value)}handleInvalid(){this.valid=false;if(this.customValidityMessage==undefined){this.customValidityMessage=this.textarea.validationMessage}}handleChange(){this.valueChange.emit(this.value);if(this.name!=undefined){var t=new FormData;t.append(this.name,this.value.toString());this.internals.setFormValue(t)}}shouldLabelFloat(){if(this.focused){return false}if(this.value!=undefined&&this.value!=""){return false}return true}render(){var t;return e(s,{key:"b1b22b0fdc9975613ff99e40d7a8fa6047f62105",tabIndex:this.focused?-1:0,onFocus:()=>this.textarea.focus(),onBlur:()=>this.textarea.blur()},e("dnn-fieldset",{key:"6e509bb911c243f10c1af6fb70e0aefd49ddb2ad",ref:t=>this.fieldset=t,invalid:!this.valid,focused:this.focused,resizable:this.resizable,label:`${(t=this.label)!==null&&t!==void 0?t:""}${this.required?" *":""}`,helpText:this.helpText,disabled:this.disabled,id:this.labelId,floatLabel:this.shouldLabelFloat(),onClick:()=>!this.focused&&this.textarea.focus()},e("textarea",{key:"9dd9d48e90d6cd12c88e1d09fd1b60b018761845",ref:t=>this.textarea=t,name:this.name,value:this.value,required:this.required,onBlur:()=>this.focused=false,onFocus:()=>this.focused=true,onChange:()=>this.handleChange(),onInput:t=>this.handleInput(t.target.value),onInvalid:()=>this.handleInvalid(),disabled:this.disabled,autoComplete:this.autocomplete,minlength:this.minlength,maxlength:this.maxlength,readonly:this.readonly,"aria-labelledby":this.labelId,rows:this.rows})))}static get formAssociated(){return true}};r.style=d;export{r as dnn_textarea};
2
+ //# sourceMappingURL=p-3d55d879.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["dnnTextareaCss","DnnTextareaStyle0","DnnTextarea","checkValidity","this","textarea","validity","setCustomValidity","message","undefined","valid","fieldset","setValidity","customValidityMessage","componentWillLoad","labelId","generateRandomId","style","minHeight","rows","formResetCallback","value","internals","setFormValue","handleInput","valueInput","emit","handleInvalid","validationMessage","handleChange","valueChange","name","data","FormData","append","toString","shouldLabelFloat","focused","render","h","Host","key","tabIndex","onFocus","focus","onBlur","blur","ref","el","invalid","resizable","label","_a","required","helpText","disabled","id","floatLabel","onClick","onChange","onInput","e","target","onInvalid","autoComplete","autocomplete","minlength","maxlength","readonly"],"sources":["src/components/dnn-textarea/dnn-textarea.scss?tag=dnn-textarea&encapsulation=shadow","src/components/dnn-textarea/dnn-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n\n /** @prop --foreground: Defines the foreground color. */\n --foreground: var(--dnn-color-foreground, #000);\n\n /** @prop --background: Defines the background color. */\n --background: var(--dnn-color-background, #fff);\n \n /** @prop --focus-color: Defines the color when the component is focused. */\n --focus-color: var(--dnn-color-primary, #3792ED);\n \n /** @prop --danger-color: Defines the danger color used for invalid data. */\n --danger-color: var(--dnn-color-danger, #900);\n \n /** @prop --control-radius: Defines the radius for the control corners. */\n --control-radius: var(--dnn-controls-radius, 3px);\n}\n\ndnn-fieldset{\n width: 100%;\n}\n\ntextarea{\n border: none;\n outline: none;\n background-color: transparent;\n color: var(--foreground);\n width: calc(100% - 1em);\n height: calc(100% - 1em);\n line-height: 1.5em;\n resize: none;\n}","import { Component, Host, h, Prop, AttachInternals, State, Event, EventEmitter, Method } from '@stencil/core';\nimport { generateRandomId } from '../../utilities/stringUtilities';\n\n/** A custom textarea component. */\n@Component({\n tag: 'dnn-textarea',\n styleUrl: 'dnn-textarea.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DnnTextarea {\n /** Can be set to change how the user can resize the field. */\n @Prop() resizable: \"none\" | \"both\" | \"horizontal\" | \"vertical\" | \"block\" | \"inline\" = \"block\";\n\n /** Sets the value of the textarea. */\n @Prop({mutable: true}) value: string;\n\n /** The label for this input. */\n @Prop() label: string;\n\n /** The name for this input when used in forms. */\n @Prop() name: string;\n\n /** Defines the help label displayed under the field. */\n @Prop() helpText: string;\n\n /** Defines whether the field requires having a value. */\n @Prop() required: boolean;\n\n /** Defines whether the field is disabled. */\n @Prop() disabled: boolean;\n\n /** Defines the type of auto-completion to use for this field, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete. */\n @Prop() autocomplete: string = \"off\";\n\n /** Defines the minimum amount of charaters. */\n @Prop() minlength: number;\n\n /** Defines the maximum amount of charaters. */\n @Prop() maxlength: number;\n\n /** Defines wheter the defined value is readonly. */\n @Prop() readonly: boolean;\n\n /** Defines how many rows (lines of text) to initially show. */\n @Prop() rows: number = 3;\n\n /** Fires when the using is inputing data (on keystrokes). */\n @Event() valueInput: EventEmitter<string>;\n\n /** Fires when the value has changed and the user exits the input. */\n @Event() valueChange: EventEmitter<string>;\n\n /** Reports the input validity details. See https://developer.mozilla.org/en-US/docs/Web/API/ValidityState */\n @Method()\n async checkValidity(): Promise<ValidityState> {\n return this.textarea.validity;\n }\n\n /** Can be used to set a custom validity message. */\n @Method()\n async setCustomValidity(message: string): Promise<void> {\n if (message == undefined || message == \"\") {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.fieldset.setValidity(true);\n return;\n }\n\n this.customValidityMessage = message;\n this.valid = false;\n this.textarea.setCustomValidity(message);\n }\n\n @State() focused = false;\n @State() valid = true;\n @State() customValidityMessage: string;\n\n @AttachInternals() internals: ElementInternals;\n \n private textarea: HTMLTextAreaElement;\n private fieldset: HTMLDnnFieldsetElement;\n private labelId: string;\n\n componentWillLoad() {\n this.labelId = generateRandomId();\n this.textarea.style.minHeight = `${this.rows * 1.5}em`;\n }\n\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n formResetCallback() {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.value = \"\";\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n private handleInput(value: string): void {\n this.value = value;\n var valid = this.textarea.checkValidity();\n this.valid = valid;\n this.valueInput.emit(this.value);\n }\n\n private handleInvalid(): void {\n this.valid = false;\n if (this.customValidityMessage == undefined){\n this.customValidityMessage = this.textarea.validationMessage;\n }\n }\n\n private handleChange() {\n this.valueChange.emit(this.value);\n if (this.name != undefined){\n var data = new FormData();\n data.append(this.name, this.value.toString());\n this.internals.setFormValue(data);\n }\n }\n\n private shouldLabelFloat(): boolean {\n if (this.focused) {\n return false;\n }\n\n if (this.value != undefined && this.value != \"\") {\n return false;\n }\n \n return true;\n }\n\n render() {\n return (\n <Host\n tabIndex={this.focused ? -1 : 0}\n onFocus={() => this.textarea.focus()}\n onBlur={() => this.textarea.blur()}\n >\n <dnn-fieldset\n ref={el => this.fieldset = el}\n invalid={!this.valid}\n focused={this.focused}\n resizable={this.resizable}\n label={`${this.label ?? \"\"}${this.required ? \" *\" : \"\"}`}\n helpText={this.helpText}\n disabled={this.disabled}\n id={this.labelId}\n floatLabel={this.shouldLabelFloat()}\n onClick={() => !this.focused && this.textarea.focus()}\n >\n <textarea\n ref={el => this.textarea = el}\n name={this.name}\n value={this.value}\n required={this.required}\n onBlur={() => this.focused = false}\n onFocus={() => this.focused=true}\n onChange={() => this.handleChange()}\n onInput={e => this.handleInput((e.target as HTMLTextAreaElement).value)}\n onInvalid={() => this.handleInvalid()}\n disabled={this.disabled}\n autoComplete={this.autocomplete}\n minlength={this.minlength}\n maxlength={this.maxlength}\n readonly={this.readonly}\n aria-labelledby={this.labelId}\n rows={this.rows}\n />\n </dnn-fieldset>\n </Host>\n );\n }\n\n}\n"],"mappings":"6FAAA,MAAMA,EAAiB,scACvB,MAAAC,EAAeD,E,MCSFE,EAAW,M,wRAEgE,Q,wJAqBvD,M,oFAYR,E,aA6BJ,M,WACF,K,qCApBjB,mBAAMC,GACJ,OAAOC,KAAKC,SAASC,Q,CAKvB,uBAAMC,CAAkBC,GACtB,GAAIA,GAAWC,WAAaD,GAAW,GAAI,CACzCJ,KAAKC,SAASE,kBAAkB,IAChCH,KAAKM,MAAQ,KACbN,KAAKO,SAASC,YAAY,MAC1B,M,CAGFR,KAAKS,sBAAwBL,EAC7BJ,KAAKM,MAAQ,MACbN,KAAKC,SAASE,kBAAkBC,E,CAalC,iBAAAM,GACEV,KAAKW,QAAUC,IACfZ,KAAKC,SAASY,MAAMC,UAAY,GAAGd,KAAKe,KAAO,O,CAIjD,iBAAAC,GACEhB,KAAKC,SAASE,kBAAkB,IAChCH,KAAKM,MAAQ,KACbN,KAAKiB,MAAQ,GACbjB,KAAKkB,UAAUV,YAAY,IAC3BR,KAAKkB,UAAUC,aAAa,G,CAGtB,WAAAC,CAAYH,GAClBjB,KAAKiB,MAAQA,EACb,IAAIX,EAAQN,KAAKC,SAASF,gBAC1BC,KAAKM,MAAQA,EACbN,KAAKqB,WAAWC,KAAKtB,KAAKiB,M,CAGpB,aAAAM,GACNvB,KAAKM,MAAQ,MACb,GAAIN,KAAKS,uBAAyBJ,UAAU,CAC1CL,KAAKS,sBAAwBT,KAAKC,SAASuB,iB,EAIvC,YAAAC,GACNzB,KAAK0B,YAAYJ,KAAKtB,KAAKiB,OAC3B,GAAIjB,KAAK2B,MAAQtB,UAAU,CACzB,IAAIuB,EAAO,IAAIC,SACfD,EAAKE,OAAO9B,KAAK2B,KAAM3B,KAAKiB,MAAMc,YAClC/B,KAAKkB,UAAUC,aAAaS,E,E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  import { r as registerInstance, c as createEvent, h, H as Host } from './index-9dbb7028.js';
2
2
  import { g as generateRandomId } from './stringUtilities-b220cf3a.js';
3
3
 
4
- const dnnTextareaCss = ":host{display:inline-block;--foreground:var(--dnn-color-foreground, #000);--background:var(--dnn-color-background, #fff);--focus-color:var(--dnn-color-primary, #3792ED);--danger-color:var(--dnn-color-danger, #900);--control-radius:var(--dnn-controls-radius, 3px)}dnn-fieldset{width:100%}textarea{border:none;outline:none;background-color:transparent;color:var(--foreground);width:100%;height:100%;resize:none}";
4
+ const dnnTextareaCss = ":host{display:inline-block;--foreground:var(--dnn-color-foreground, #000);--background:var(--dnn-color-background, #fff);--focus-color:var(--dnn-color-primary, #3792ED);--danger-color:var(--dnn-color-danger, #900);--control-radius:var(--dnn-controls-radius, 3px)}dnn-fieldset{width:100%}textarea{border:none;outline:none;background-color:transparent;color:var(--foreground);width:calc(100% - 1em);height:calc(100% - 1em);line-height:1.5em;resize:none}";
5
5
  const DnnTextareaStyle0 = dnnTextareaCss;
6
6
 
7
7
  const DnnTextarea = class {
@@ -27,6 +27,7 @@ const DnnTextarea = class {
27
27
  this.minlength = undefined;
28
28
  this.maxlength = undefined;
29
29
  this.readonly = undefined;
30
+ this.rows = 3;
30
31
  this.focused = false;
31
32
  this.valid = true;
32
33
  this.customValidityMessage = undefined;
@@ -49,6 +50,7 @@ const DnnTextarea = class {
49
50
  }
50
51
  componentWillLoad() {
51
52
  this.labelId = generateRandomId();
53
+ this.textarea.style.minHeight = `${this.rows * 1.5}em`;
52
54
  }
53
55
  // eslint-disable-next-line @stencil-community/own-methods-must-be-private
54
56
  formResetCallback() {
@@ -89,7 +91,7 @@ const DnnTextarea = class {
89
91
  }
90
92
  render() {
91
93
  var _a;
92
- return (h(Host, { key: 'a3b5e0100ce757b101071df983a91706fc0466f7', tabIndex: this.focused ? -1 : 0, onFocus: () => this.textarea.focus(), onBlur: () => this.textarea.blur() }, h("dnn-fieldset", { key: 'fdf3fbd79a23657f71a33275f34598e2ecbce692', ref: el => this.fieldset = el, invalid: !this.valid, focused: this.focused, resizable: this.resizable, label: `${(_a = this.label) !== null && _a !== void 0 ? _a : ""}${this.required ? " *" : ""}`, helpText: this.helpText, disabled: this.disabled, id: this.labelId, floatLabel: this.shouldLabelFloat(), onClick: () => !this.focused && this.textarea.focus() }, h("textarea", { key: '77fec48727c61e467c19ad3cefaaa43a0187b018', ref: el => this.textarea = el, name: this.name, value: this.value, required: this.required, onBlur: () => this.focused = false, onFocus: () => this.focused = true, onChange: () => this.handleChange(), onInput: e => this.handleInput(e.target.value), onInvalid: () => this.handleInvalid(), disabled: this.disabled, autoComplete: this.autocomplete, minlength: this.minlength, maxlength: this.maxlength, readonly: this.readonly, "aria-labelledby": this.labelId }))));
94
+ return (h(Host, { key: 'b1b22b0fdc9975613ff99e40d7a8fa6047f62105', tabIndex: this.focused ? -1 : 0, onFocus: () => this.textarea.focus(), onBlur: () => this.textarea.blur() }, h("dnn-fieldset", { key: '6e509bb911c243f10c1af6fb70e0aefd49ddb2ad', ref: el => this.fieldset = el, invalid: !this.valid, focused: this.focused, resizable: this.resizable, label: `${(_a = this.label) !== null && _a !== void 0 ? _a : ""}${this.required ? " *" : ""}`, helpText: this.helpText, disabled: this.disabled, id: this.labelId, floatLabel: this.shouldLabelFloat(), onClick: () => !this.focused && this.textarea.focus() }, h("textarea", { key: '9dd9d48e90d6cd12c88e1d09fd1b60b018761845', ref: el => this.textarea = el, name: this.name, value: this.value, required: this.required, onBlur: () => this.focused = false, onFocus: () => this.focused = true, onChange: () => this.handleChange(), onInput: e => this.handleInput(e.target.value), onInvalid: () => this.handleInvalid(), disabled: this.disabled, autoComplete: this.autocomplete, minlength: this.minlength, maxlength: this.maxlength, readonly: this.readonly, "aria-labelledby": this.labelId, rows: this.rows }))));
93
95
  }
94
96
  static get formAssociated() { return true; }
95
97
  };
@@ -1 +1 @@
1
- {"file":"dnn-textarea.entry.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,2ZAA2Z,CAAC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,KAAK,mCAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,EAAE,EACxD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAE,IAAI,CAAC,OAAO,EAChB,UAAU,EAAE,IAAI,CAAC,gBAAgB,EAAE,EACnC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAErD,iEACE,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,QAAQ,GAAG,EAAE,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,KAAK,EAClC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,GAAC,IAAI,EAChC,QAAQ,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EACnC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAE,CAAC,CAAC,MAA8B,CAAC,KAAK,CAAC,EACvE,SAAS,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,EACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,qBACN,IAAI,CAAC,OAAO,GAC7B,CACW,CACV,EACP;KACH;;;;;;;","names":[],"sources":["src/components/dnn-textarea/dnn-textarea.scss?tag=dnn-textarea&encapsulation=shadow","src/components/dnn-textarea/dnn-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n\n /** @prop --foreground: Defines the foreground color. */\n --foreground: var(--dnn-color-foreground, #000);\n\n /** @prop --background: Defines the background color. */\n --background: var(--dnn-color-background, #fff);\n \n /** @prop --focus-color: Defines the color when the component is focused. */\n --focus-color: var(--dnn-color-primary, #3792ED);\n \n /** @prop --danger-color: Defines the danger color used for invalid data. */\n --danger-color: var(--dnn-color-danger, #900);\n \n /** @prop --control-radius: Defines the radius for the control corners. */\n --control-radius: var(--dnn-controls-radius, 3px);\n}\n\ndnn-fieldset{\n width: 100%;\n}\n\ntextarea{\n border: none;\n outline: none;\n background-color: transparent;\n color: var(--foreground);\n width: 100%;\n height: 100%;\n resize: none;\n}","import { Component, Host, h, Prop, AttachInternals, State, Event, EventEmitter, Method } from '@stencil/core';\nimport { generateRandomId } from '../../utilities/stringUtilities';\n\n/** A custom textarea component. */\n@Component({\n tag: 'dnn-textarea',\n styleUrl: 'dnn-textarea.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DnnTextarea {\n /** Can be set to change how the user can resize the field. */\n @Prop() resizable: \"none\" | \"both\" | \"horizontal\" | \"vertical\" | \"block\" | \"inline\" = \"block\";\n\n /** Sets the value of the textarea. */\n @Prop({mutable: true}) value: string;\n\n /** The label for this input. */\n @Prop() label: string;\n\n /** The name for this input when used in forms. */\n @Prop() name: string;\n\n /** Defines the help label displayed under the field. */\n @Prop() helpText: string;\n\n /** Defines whether the field requires having a value. */\n @Prop() required: boolean;\n\n /** Defines whether the field is disabled. */\n @Prop() disabled: boolean;\n\n /** Defines the type of auto-completion to use for this field, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete. */\n @Prop() autocomplete: string = \"off\";\n\n /** Defines the minimum amount of charaters. */\n @Prop() minlength: number;\n\n /** Defines the maximum amount of charaters. */\n @Prop() maxlength: number;\n\n /** Defines wheter the defined value is readonly. */\n @Prop() readonly: boolean;\n\n /** Fires when the using is inputing data (on keystrokes). */\n @Event() valueInput: EventEmitter<string>;\n\n /** Fires when the value has changed and the user exits the input. */\n @Event() valueChange: EventEmitter<string>;\n\n /** Reports the input validity details. See https://developer.mozilla.org/en-US/docs/Web/API/ValidityState */\n @Method()\n async checkValidity(): Promise<ValidityState> {\n return this.textarea.validity;\n }\n\n /** Can be used to set a custom validity message. */\n @Method()\n async setCustomValidity(message: string): Promise<void> {\n if (message == undefined || message == \"\") {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.fieldset.setValidity(true);\n return;\n }\n\n this.customValidityMessage = message;\n this.valid = false;\n this.textarea.setCustomValidity(message);\n }\n\n @State() focused = false;\n @State() valid = true;\n @State() customValidityMessage: string;\n\n @AttachInternals() internals: ElementInternals;\n \n private textarea: HTMLTextAreaElement;\n private fieldset: HTMLDnnFieldsetElement;\n private labelId: string;\n\n componentWillLoad() {\n this.labelId = generateRandomId();\n }\n\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n formResetCallback() {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.value = \"\";\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n private handleInput(value: string): void {\n this.value = value;\n var valid = this.textarea.checkValidity();\n this.valid = valid;\n this.valueInput.emit(this.value);\n }\n\n private handleInvalid(): void {\n this.valid = false;\n if (this.customValidityMessage == undefined){\n this.customValidityMessage = this.textarea.validationMessage;\n }\n }\n\n private handleChange() {\n this.valueChange.emit(this.value);\n if (this.name != undefined){\n var data = new FormData();\n data.append(this.name, this.value.toString());\n this.internals.setFormValue(data);\n }\n }\n\n private shouldLabelFloat(): boolean {\n if (this.focused) {\n return false;\n }\n\n if (this.value != undefined && this.value != \"\") {\n return false;\n }\n \n return true;\n }\n\n render() {\n return (\n <Host\n tabIndex={this.focused ? -1 : 0}\n onFocus={() => this.textarea.focus()}\n onBlur={() => this.textarea.blur()}\n >\n <dnn-fieldset\n ref={el => this.fieldset = el}\n invalid={!this.valid}\n focused={this.focused}\n resizable={this.resizable}\n label={`${this.label ?? \"\"}${this.required ? \" *\" : \"\"}`}\n helpText={this.helpText}\n disabled={this.disabled}\n id={this.labelId}\n floatLabel={this.shouldLabelFloat()}\n onClick={() => !this.focused && this.textarea.focus()}\n >\n <textarea\n ref={el => this.textarea = el}\n name={this.name}\n value={this.value}\n required={this.required}\n onBlur={() => this.focused = false}\n onFocus={() => this.focused=true}\n onChange={() => this.handleChange()}\n onInput={e => this.handleInput((e.target as HTMLTextAreaElement).value)}\n onInvalid={() => this.handleInvalid()}\n disabled={this.disabled}\n autoComplete={this.autocomplete}\n minlength={this.minlength}\n maxlength={this.maxlength}\n readonly={this.readonly}\n aria-labelledby={this.labelId}\n />\n </dnn-fieldset>\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"dnn-textarea.entry.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,qcAAqc,CAAC;AAC7d,0BAAe,cAAc;;MCShB,WAAW;;;;;;;;;;;;yBAEgE,OAAO;;;;;;;4BAqB9D,KAAK;;;;oBAYb,CAAC;uBA6BL,KAAK;qBACP,IAAI;;;;IApBrB,MAAM,aAAa;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;KAC/B;;IAID,MAAM,iBAAiB,CAAC,OAAe;QACrC,IAAI,OAAO,IAAI,SAAS,IAAI,OAAO,IAAI,EAAE,EAAE;YACzC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAChC,OAAO;SACR;QAED,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;KAC1C;IAYD,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,gBAAgB,EAAE,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,IAAI,C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I,IAAI,CAAC,WAAW,CAAE,CAAC,CAAC,MAA8B,CAAC,KAAK,CAAC,EACvE,SAAS,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,EACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,qBACN,IAAI,CAAC,OAAO,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,GACf,CACW,CACV,EACP;KACH;;;;;;;","names":[],"sources":["src/components/dnn-textarea/dnn-textarea.scss?tag=dnn-textarea&encapsulation=shadow","src/components/dnn-textarea/dnn-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n\n /** @prop --foreground: Defines the foreground color. */\n --foreground: var(--dnn-color-foreground, #000);\n\n /** @prop --background: Defines the background color. */\n --background: var(--dnn-color-background, #fff);\n \n /** @prop --focus-color: Defines the color when the component is focused. */\n --focus-color: var(--dnn-color-primary, #3792ED);\n \n /** @prop --danger-color: Defines the danger color used for invalid data. */\n --danger-color: var(--dnn-color-danger, #900);\n \n /** @prop --control-radius: Defines the radius for the control corners. */\n --control-radius: var(--dnn-controls-radius, 3px);\n}\n\ndnn-fieldset{\n width: 100%;\n}\n\ntextarea{\n border: none;\n outline: none;\n background-color: transparent;\n color: var(--foreground);\n width: calc(100% - 1em);\n height: calc(100% - 1em);\n line-height: 1.5em;\n resize: none;\n}","import { Component, Host, h, Prop, AttachInternals, State, Event, EventEmitter, Method } from '@stencil/core';\nimport { generateRandomId } from '../../utilities/stringUtilities';\n\n/** A custom textarea component. */\n@Component({\n tag: 'dnn-textarea',\n styleUrl: 'dnn-textarea.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DnnTextarea {\n /** Can be set to change how the user can resize the field. */\n @Prop() resizable: \"none\" | \"both\" | \"horizontal\" | \"vertical\" | \"block\" | \"inline\" = \"block\";\n\n /** Sets the value of the textarea. */\n @Prop({mutable: true}) value: string;\n\n /** The label for this input. */\n @Prop() label: string;\n\n /** The name for this input when used in forms. */\n @Prop() name: string;\n\n /** Defines the help label displayed under the field. */\n @Prop() helpText: string;\n\n /** Defines whether the field requires having a value. */\n @Prop() required: boolean;\n\n /** Defines whether the field is disabled. */\n @Prop() disabled: boolean;\n\n /** Defines the type of auto-completion to use for this field, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete. */\n @Prop() autocomplete: string = \"off\";\n\n /** Defines the minimum amount of charaters. */\n @Prop() minlength: number;\n\n /** Defines the maximum amount of charaters. */\n @Prop() maxlength: number;\n\n /** Defines wheter the defined value is readonly. */\n @Prop() readonly: boolean;\n\n /** Defines how many rows (lines of text) to initially show. */\n @Prop() rows: number = 3;\n\n /** Fires when the using is inputing data (on keystrokes). */\n @Event() valueInput: EventEmitter<string>;\n\n /** Fires when the value has changed and the user exits the input. */\n @Event() valueChange: EventEmitter<string>;\n\n /** Reports the input validity details. See https://developer.mozilla.org/en-US/docs/Web/API/ValidityState */\n @Method()\n async checkValidity(): Promise<ValidityState> {\n return this.textarea.validity;\n }\n\n /** Can be used to set a custom validity message. */\n @Method()\n async setCustomValidity(message: string): Promise<void> {\n if (message == undefined || message == \"\") {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.fieldset.setValidity(true);\n return;\n }\n\n this.customValidityMessage = message;\n this.valid = false;\n this.textarea.setCustomValidity(message);\n }\n\n @State() focused = false;\n @State() valid = true;\n @State() customValidityMessage: string;\n\n @AttachInternals() internals: ElementInternals;\n \n private textarea: HTMLTextAreaElement;\n private fieldset: HTMLDnnFieldsetElement;\n private labelId: string;\n\n componentWillLoad() {\n this.labelId = generateRandomId();\n this.textarea.style.minHeight = `${this.rows * 1.5}em`;\n }\n\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n formResetCallback() {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.value = \"\";\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n private handleInput(value: string): void {\n this.value = value;\n var valid = this.textarea.checkValidity();\n this.valid = valid;\n this.valueInput.emit(this.value);\n }\n\n private handleInvalid(): void {\n this.valid = false;\n if (this.customValidityMessage == undefined){\n this.customValidityMessage = this.textarea.validationMessage;\n }\n }\n\n private handleChange() {\n this.valueChange.emit(this.value);\n if (this.name != undefined){\n var data = new FormData();\n data.append(this.name, this.value.toString());\n this.internals.setFormValue(data);\n }\n }\n\n private shouldLabelFloat(): boolean {\n if (this.focused) {\n return false;\n }\n\n if (this.value != undefined && this.value != \"\") {\n return false;\n }\n \n return true;\n }\n\n render() {\n return (\n <Host\n tabIndex={this.focused ? -1 : 0}\n onFocus={() => this.textarea.focus()}\n onBlur={() => this.textarea.blur()}\n >\n <dnn-fieldset\n ref={el => this.fieldset = el}\n invalid={!this.valid}\n focused={this.focused}\n resizable={this.resizable}\n label={`${this.label ?? \"\"}${this.required ? \" *\" : \"\"}`}\n helpText={this.helpText}\n disabled={this.disabled}\n id={this.labelId}\n floatLabel={this.shouldLabelFloat()}\n onClick={() => !this.focused && this.textarea.focus()}\n >\n <textarea\n ref={el => this.textarea = el}\n name={this.name}\n value={this.value}\n required={this.required}\n onBlur={() => this.focused = false}\n onFocus={() => this.focused=true}\n onChange={() => this.handleChange()}\n onInput={e => this.handleInput((e.target as HTMLTextAreaElement).value)}\n onInvalid={() => this.handleInvalid()}\n disabled={this.disabled}\n autoComplete={this.autocomplete}\n minlength={this.minlength}\n maxlength={this.maxlength}\n readonly={this.readonly}\n aria-labelledby={this.labelId}\n rows={this.rows}\n />\n </dnn-fieldset>\n </Host>\n );\n }\n\n}\n"],"version":3}
package/dist/esm/dnn.js CHANGED
@@ -16,7 +16,7 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["dnn-color-input",[[65,"dnn-color-input",{"color":[1025],"contrastColor":[1025,"contrast-color"],"lightColor":[1025,"light-color"],"darkColor":[1025,"dark-color"],"label":[1],"readonly":[4],"localization":[16],"name":[1],"helpText":[1,"help-text"],"useContrastColor":[4,"use-contrast-color"],"useLightColor":[4,"use-light-color"],"useDarkColor":[4,"use-dark-color"],"currentColor":[32],"focused":[32]},null,{"currentColor":["currentColorChanged"]}]]],["dnn-image-cropper",[[65,"dnn-image-cropper",{"width":[2],"height":[2],"resx":[16],"quality":[2],"preventUndersized":[4,"prevent-undersized"],"name":[1],"view":[32],"localResx":[32],"fileName":[32],"focused":[32],"clear":[64]},null,{"resx":["resxChanged"]}]]],["dnn-autocomplete",[[65,"dnn-autocomplete",{"label":[1],"name":[1],"helpText":[1,"help-text"],"value":[1537],"required":[4],"disabled":[4],"suggestions":[16],"renderSuggestion":[16],"totalSuggestions":[2,"total-suggestions"],"preloadThresholdPixels":[2,"preload-threshold-pixels"],"focused":[32],"valid":[32],"customValidityMessage":[32],"selectedIndex":[32],"positionInitialized":[32],"lastScrollTop":[32],"checkValidity":[64],"setCustomValidity":[64]},[[4,"click","handleOutsideClick"]]]]],["dnn-input",[[65,"dnn-input",{"type":[1025],"label":[1],"name":[1],"value":[1544],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"min":[8],"max":[8],"minlength":[2],"maxlength":[2],"multiple":[4],"pattern":[1],"readonly":[4],"step":[8],"disableValidityReporting":[4,"disable-validity-reporting"],"allowShowPassword":[4,"allow-show-password"],"focused":[32],"valid":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-select",[[65,"dnn-select",{"label":[1],"name":[1],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"disableValidityReporting":[4,"disable-validity-reporting"],"value":[1537],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64]}]]],["dnn-textarea",[[65,"dnn-textarea",{"resizable":[1],"value":[1025],"label":[1],"name":[1],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"minlength":[2],"maxlength":[2],"readonly":[4],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-treeview-item",[[1,"dnn-treeview-item",{"expanded":[1540],"hasChildren":[32],"focused":[32]},null,{"expanded":["watchExpanded"]}]]],["dnn-chevron",[[1,"dnn-chevron",{"expandText":[1,"expand-text"],"collapseText":[1,"collapse-text"],"expanded":[1540],"focused":[32]},null,{"expanded":["handleExpandedChanged"]}]]],["dnn-monaco-editor",[[66,"dnn-monaco-editor",{"language":[1],"value":[1025],"name":[1],"focused":[32]},null,{"language":["languageChanged"],"value":["valueChanged"]}]]],["dnn-progress-bar",[[1,"dnn-progress-bar",{"value":[2],"max":[2],"useGradient":[4,"use-gradient"]}]]],["dnn-richtext",[[65,"dnn-richtext",{"options":[16],"value":[1],"name":[1],"focused":[32]},null,{"value":["watchValueChanged"]}]]],["dnn-sort-icon",[[1,"dnn-sort-icon",{"sortDirection":[1025,"sort-direction"],"focused":[32]}]]],["dnn-toggle",[[65,"dnn-toggle",{"checked":[1028],"disabled":[4],"name":[1],"value":[1],"focused":[32]},null,{"checked":["checkedChanged"]}]]],["dnn-vertical-overflow-menu",[[1,"dnn-vertical-overflow-menu",{"showDropdownButton":[32],"showDropdownMenu":[32]}]]],["dnn-vertical-splitview",[[1,"dnn-vertical-splitview",{"splitterWidth":[2,"splitter-width"],"splitWidthPercentage":[1026,"split-width-percentage"],"leftWidth":[32],"rightWidth":[32],"setSplitWidthPercentage":[64],"getSplitWidthPercentage":[64]}]]],["dnn-checkbox",[[65,"dnn-checkbox",{"checked":[1025],"useIntermediate":[4,"use-intermediate"],"value":[1],"name":[1],"focused":[32]},null,{"checked":["handleCheckedChange"]}]]],["dnn-color-picker",[[1,"dnn-color-picker",{"color":[1],"colorBoxHeight":[1,"color-box-height"],"currentColor":[32],"rgbDisplay":[32],"hslDisplay":[32],"hexDisplay":[32],"focused":[32]},null,{"currentColor":["handeCurrentColorChanged"]}]]],["dnn-dropzone",[[65,"dnn-dropzone",{"resx":[16],"allowedExtensions":[16],"allowCameraMode":[4,"allow-camera-mode"],"captureQuality":[2,"capture-quality"],"maxFileSize":[2,"max-file-size"],"name":[1],"canTakeSnapshots":[32],"takingPicture":[32],"fileTooLarge":[32],"invalidExtension":[32],"localResx":[32],"focused":[32]},null,{"resx":["resxChanged"]}]]],["dnn-searchbox",[[1,"dnn-searchbox",{"placeholder":[1],"debounced":[4],"debounceTime":[2,"debounce-time"],"query":[1025],"focused":[32]},null,{"query":["handleQueryChanged"]}]]],["dnn-tab_2",[[1,"dnn-tab",{"tabTitle":[1,"tab-title"],"visible":[32],"show":[64],"hide":[64]}],[1,"dnn-tabs",{"tabTitles":[32],"selectedTabTitle":[32]}]]],["dnn-collapsible",[[1,"dnn-collapsible",{"expanded":[516],"transitionDuration":[2,"transition-duration"],"updateSize":[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{"expanded":["handledExpandedChanged"]}]]],["dnn-modal",[[1,"dnn-modal",{"backdropDismiss":[4,"backdrop-dismiss"],"closeText":[1,"close-text"],"resizable":[4],"showCloseButton":[4,"show-close-button"],"visible":[1540],"show":[64],"hide":[64]}]]],["dnn-button",[[65,"dnn-button",{"type":[1],"appearance":[1],"formButtonType":[1,"form-button-type"],"reversed":[4],"size":[1],"confirm":[4],"confirmYesText":[1,"confirm-yes-text"],"confirmNoText":[1,"confirm-no-text"],"confirmMessage":[1,"confirm-message"],"disabled":[4],"focused":[32],"modalVisible":[32]}]]],["dnn-permissions-grid",[[1,"dnn-permissions-grid",{"permissions":[1040],"roleGroups":[16],"roles":[16],"resx":[16],"foundUsers":[16],"selectedRoleGroupId":[32],"userQuery":[32],"pickedUser":[32],"localResx":[32],"focused":[32]},null,{"foundUsers":["handleFoundUsersChanged"],"resx":["resxChanged"]}]]],["dnn-fieldset",[[1,"dnn-fieldset",{"focused":[1540],"disabled":[1540],"invalid":[1540],"label":[1],"floatLabel":[1540,"float-label"],"helpText":[1,"help-text"],"resizable":[1],"customValidityMessage":[32],"setFocused":[64],"setBlurred":[64],"disable":[64],"enable":[64],"pinLabel":[64],"unpinLabel":[64],"setValidity":[64]}]]]], options);
19
+ return bootstrapLazy([["dnn-color-input",[[65,"dnn-color-input",{"color":[1025],"contrastColor":[1025,"contrast-color"],"lightColor":[1025,"light-color"],"darkColor":[1025,"dark-color"],"label":[1],"readonly":[4],"localization":[16],"name":[1],"helpText":[1,"help-text"],"useContrastColor":[4,"use-contrast-color"],"useLightColor":[4,"use-light-color"],"useDarkColor":[4,"use-dark-color"],"currentColor":[32],"focused":[32]},null,{"currentColor":["currentColorChanged"]}]]],["dnn-image-cropper",[[65,"dnn-image-cropper",{"width":[2],"height":[2],"resx":[16],"quality":[2],"preventUndersized":[4,"prevent-undersized"],"name":[1],"view":[32],"localResx":[32],"fileName":[32],"focused":[32],"clear":[64]},null,{"resx":["resxChanged"]}]]],["dnn-autocomplete",[[65,"dnn-autocomplete",{"label":[1],"name":[1],"helpText":[1,"help-text"],"value":[1537],"required":[4],"disabled":[4],"suggestions":[16],"renderSuggestion":[16],"totalSuggestions":[2,"total-suggestions"],"preloadThresholdPixels":[2,"preload-threshold-pixels"],"focused":[32],"valid":[32],"customValidityMessage":[32],"selectedIndex":[32],"positionInitialized":[32],"lastScrollTop":[32],"checkValidity":[64],"setCustomValidity":[64]},[[4,"click","handleOutsideClick"]]]]],["dnn-input",[[65,"dnn-input",{"type":[1025],"label":[1],"name":[1],"value":[1544],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"min":[8],"max":[8],"minlength":[2],"maxlength":[2],"multiple":[4],"pattern":[1],"readonly":[4],"step":[8],"disableValidityReporting":[4,"disable-validity-reporting"],"allowShowPassword":[4,"allow-show-password"],"focused":[32],"valid":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-select",[[65,"dnn-select",{"label":[1],"name":[1],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"disableValidityReporting":[4,"disable-validity-reporting"],"value":[1537],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64]}]]],["dnn-textarea",[[65,"dnn-textarea",{"resizable":[1],"value":[1025],"label":[1],"name":[1],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"minlength":[2],"maxlength":[2],"readonly":[4],"rows":[2],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-treeview-item",[[1,"dnn-treeview-item",{"expanded":[1540],"hasChildren":[32],"focused":[32]},null,{"expanded":["watchExpanded"]}]]],["dnn-chevron",[[1,"dnn-chevron",{"expandText":[1,"expand-text"],"collapseText":[1,"collapse-text"],"expanded":[1540],"focused":[32]},null,{"expanded":["handleExpandedChanged"]}]]],["dnn-monaco-editor",[[66,"dnn-monaco-editor",{"language":[1],"value":[1025],"name":[1],"focused":[32]},null,{"language":["languageChanged"],"value":["valueChanged"]}]]],["dnn-progress-bar",[[1,"dnn-progress-bar",{"value":[2],"max":[2],"useGradient":[4,"use-gradient"]}]]],["dnn-richtext",[[65,"dnn-richtext",{"options":[16],"value":[1],"name":[1],"focused":[32]},null,{"value":["watchValueChanged"]}]]],["dnn-sort-icon",[[1,"dnn-sort-icon",{"sortDirection":[1025,"sort-direction"],"focused":[32]}]]],["dnn-toggle",[[65,"dnn-toggle",{"checked":[1028],"disabled":[4],"name":[1],"value":[1],"focused":[32]},null,{"checked":["checkedChanged"]}]]],["dnn-vertical-overflow-menu",[[1,"dnn-vertical-overflow-menu",{"showDropdownButton":[32],"showDropdownMenu":[32]}]]],["dnn-vertical-splitview",[[1,"dnn-vertical-splitview",{"splitterWidth":[2,"splitter-width"],"splitWidthPercentage":[1026,"split-width-percentage"],"leftWidth":[32],"rightWidth":[32],"setSplitWidthPercentage":[64],"getSplitWidthPercentage":[64]}]]],["dnn-checkbox",[[65,"dnn-checkbox",{"checked":[1025],"useIntermediate":[4,"use-intermediate"],"value":[1],"name":[1],"focused":[32]},null,{"checked":["handleCheckedChange"]}]]],["dnn-color-picker",[[1,"dnn-color-picker",{"color":[1],"colorBoxHeight":[1,"color-box-height"],"currentColor":[32],"rgbDisplay":[32],"hslDisplay":[32],"hexDisplay":[32],"focused":[32]},null,{"currentColor":["handeCurrentColorChanged"]}]]],["dnn-dropzone",[[65,"dnn-dropzone",{"resx":[16],"allowedExtensions":[16],"allowCameraMode":[4,"allow-camera-mode"],"captureQuality":[2,"capture-quality"],"maxFileSize":[2,"max-file-size"],"name":[1],"canTakeSnapshots":[32],"takingPicture":[32],"fileTooLarge":[32],"invalidExtension":[32],"localResx":[32],"focused":[32]},null,{"resx":["resxChanged"]}]]],["dnn-searchbox",[[1,"dnn-searchbox",{"placeholder":[1],"debounced":[4],"debounceTime":[2,"debounce-time"],"query":[1025],"focused":[32]},null,{"query":["handleQueryChanged"]}]]],["dnn-tab_2",[[1,"dnn-tab",{"tabTitle":[1,"tab-title"],"visible":[32],"show":[64],"hide":[64]}],[1,"dnn-tabs",{"tabTitles":[32],"selectedTabTitle":[32]}]]],["dnn-collapsible",[[1,"dnn-collapsible",{"expanded":[516],"transitionDuration":[2,"transition-duration"],"updateSize":[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{"expanded":["handledExpandedChanged"]}]]],["dnn-modal",[[1,"dnn-modal",{"backdropDismiss":[4,"backdrop-dismiss"],"closeText":[1,"close-text"],"resizable":[4],"showCloseButton":[4,"show-close-button"],"visible":[1540],"show":[64],"hide":[64]}]]],["dnn-button",[[65,"dnn-button",{"type":[1],"appearance":[1],"formButtonType":[1,"form-button-type"],"reversed":[4],"size":[1],"confirm":[4],"confirmYesText":[1,"confirm-yes-text"],"confirmNoText":[1,"confirm-no-text"],"confirmMessage":[1,"confirm-message"],"disabled":[4],"focused":[32],"modalVisible":[32]}]]],["dnn-permissions-grid",[[1,"dnn-permissions-grid",{"permissions":[1040],"roleGroups":[16],"roles":[16],"resx":[16],"foundUsers":[16],"selectedRoleGroupId":[32],"userQuery":[32],"pickedUser":[32],"localResx":[32],"focused":[32]},null,{"foundUsers":["handleFoundUsersChanged"],"resx":["resxChanged"]}]]],["dnn-fieldset",[[1,"dnn-fieldset",{"focused":[1540],"disabled":[1540],"invalid":[1540],"label":[1],"floatLabel":[1540,"float-label"],"helpText":[1,"help-text"],"resizable":[1],"customValidityMessage":[32],"setFocused":[64],"setBlurred":[64],"disable":[64],"enable":[64],"pinLabel":[64],"unpinLabel":[64],"setValidity":[64]}]]]], options);
20
20
  });
21
21
 
22
22
  //# sourceMappingURL=dnn.js.map
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["dnn-color-input",[[65,"dnn-color-input",{"color":[1025],"contrastColor":[1025,"contrast-color"],"lightColor":[1025,"light-color"],"darkColor":[1025,"dark-color"],"label":[1],"readonly":[4],"localization":[16],"name":[1],"helpText":[1,"help-text"],"useContrastColor":[4,"use-contrast-color"],"useLightColor":[4,"use-light-color"],"useDarkColor":[4,"use-dark-color"],"currentColor":[32],"focused":[32]},null,{"currentColor":["currentColorChanged"]}]]],["dnn-image-cropper",[[65,"dnn-image-cropper",{"width":[2],"height":[2],"resx":[16],"quality":[2],"preventUndersized":[4,"prevent-undersized"],"name":[1],"view":[32],"localResx":[32],"fileName":[32],"focused":[32],"clear":[64]},null,{"resx":["resxChanged"]}]]],["dnn-autocomplete",[[65,"dnn-autocomplete",{"label":[1],"name":[1],"helpText":[1,"help-text"],"value":[1537],"required":[4],"disabled":[4],"suggestions":[16],"renderSuggestion":[16],"totalSuggestions":[2,"total-suggestions"],"preloadThresholdPixels":[2,"preload-threshold-pixels"],"focused":[32],"valid":[32],"customValidityMessage":[32],"selectedIndex":[32],"positionInitialized":[32],"lastScrollTop":[32],"checkValidity":[64],"setCustomValidity":[64]},[[4,"click","handleOutsideClick"]]]]],["dnn-input",[[65,"dnn-input",{"type":[1025],"label":[1],"name":[1],"value":[1544],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"min":[8],"max":[8],"minlength":[2],"maxlength":[2],"multiple":[4],"pattern":[1],"readonly":[4],"step":[8],"disableValidityReporting":[4,"disable-validity-reporting"],"allowShowPassword":[4,"allow-show-password"],"focused":[32],"valid":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-select",[[65,"dnn-select",{"label":[1],"name":[1],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"disableValidityReporting":[4,"disable-validity-reporting"],"value":[1537],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64]}]]],["dnn-textarea",[[65,"dnn-textarea",{"resizable":[1],"value":[1025],"label":[1],"name":[1],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"minlength":[2],"maxlength":[2],"readonly":[4],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-treeview-item",[[1,"dnn-treeview-item",{"expanded":[1540],"hasChildren":[32],"focused":[32]},null,{"expanded":["watchExpanded"]}]]],["dnn-chevron",[[1,"dnn-chevron",{"expandText":[1,"expand-text"],"collapseText":[1,"collapse-text"],"expanded":[1540],"focused":[32]},null,{"expanded":["handleExpandedChanged"]}]]],["dnn-monaco-editor",[[66,"dnn-monaco-editor",{"language":[1],"value":[1025],"name":[1],"focused":[32]},null,{"language":["languageChanged"],"value":["valueChanged"]}]]],["dnn-progress-bar",[[1,"dnn-progress-bar",{"value":[2],"max":[2],"useGradient":[4,"use-gradient"]}]]],["dnn-richtext",[[65,"dnn-richtext",{"options":[16],"value":[1],"name":[1],"focused":[32]},null,{"value":["watchValueChanged"]}]]],["dnn-sort-icon",[[1,"dnn-sort-icon",{"sortDirection":[1025,"sort-direction"],"focused":[32]}]]],["dnn-toggle",[[65,"dnn-toggle",{"checked":[1028],"disabled":[4],"name":[1],"value":[1],"focused":[32]},null,{"checked":["checkedChanged"]}]]],["dnn-vertical-overflow-menu",[[1,"dnn-vertical-overflow-menu",{"showDropdownButton":[32],"showDropdownMenu":[32]}]]],["dnn-vertical-splitview",[[1,"dnn-vertical-splitview",{"splitterWidth":[2,"splitter-width"],"splitWidthPercentage":[1026,"split-width-percentage"],"leftWidth":[32],"rightWidth":[32],"setSplitWidthPercentage":[64],"getSplitWidthPercentage":[64]}]]],["dnn-checkbox",[[65,"dnn-checkbox",{"checked":[1025],"useIntermediate":[4,"use-intermediate"],"value":[1],"name":[1],"focused":[32]},null,{"checked":["handleCheckedChange"]}]]],["dnn-color-picker",[[1,"dnn-color-picker",{"color":[1],"colorBoxHeight":[1,"color-box-height"],"currentColor":[32],"rgbDisplay":[32],"hslDisplay":[32],"hexDisplay":[32],"focused":[32]},null,{"currentColor":["handeCurrentColorChanged"]}]]],["dnn-dropzone",[[65,"dnn-dropzone",{"resx":[16],"allowedExtensions":[16],"allowCameraMode":[4,"allow-camera-mode"],"captureQuality":[2,"capture-quality"],"maxFileSize":[2,"max-file-size"],"name":[1],"canTakeSnapshots":[32],"takingPicture":[32],"fileTooLarge":[32],"invalidExtension":[32],"localResx":[32],"focused":[32]},null,{"resx":["resxChanged"]}]]],["dnn-searchbox",[[1,"dnn-searchbox",{"placeholder":[1],"debounced":[4],"debounceTime":[2,"debounce-time"],"query":[1025],"focused":[32]},null,{"query":["handleQueryChanged"]}]]],["dnn-tab_2",[[1,"dnn-tab",{"tabTitle":[1,"tab-title"],"visible":[32],"show":[64],"hide":[64]}],[1,"dnn-tabs",{"tabTitles":[32],"selectedTabTitle":[32]}]]],["dnn-collapsible",[[1,"dnn-collapsible",{"expanded":[516],"transitionDuration":[2,"transition-duration"],"updateSize":[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{"expanded":["handledExpandedChanged"]}]]],["dnn-modal",[[1,"dnn-modal",{"backdropDismiss":[4,"backdrop-dismiss"],"closeText":[1,"close-text"],"resizable":[4],"showCloseButton":[4,"show-close-button"],"visible":[1540],"show":[64],"hide":[64]}]]],["dnn-button",[[65,"dnn-button",{"type":[1],"appearance":[1],"formButtonType":[1,"form-button-type"],"reversed":[4],"size":[1],"confirm":[4],"confirmYesText":[1,"confirm-yes-text"],"confirmNoText":[1,"confirm-no-text"],"confirmMessage":[1,"confirm-message"],"disabled":[4],"focused":[32],"modalVisible":[32]}]]],["dnn-permissions-grid",[[1,"dnn-permissions-grid",{"permissions":[1040],"roleGroups":[16],"roles":[16],"resx":[16],"foundUsers":[16],"selectedRoleGroupId":[32],"userQuery":[32],"pickedUser":[32],"localResx":[32],"focused":[32]},null,{"foundUsers":["handleFoundUsersChanged"],"resx":["resxChanged"]}]]],["dnn-fieldset",[[1,"dnn-fieldset",{"focused":[1540],"disabled":[1540],"invalid":[1540],"label":[1],"floatLabel":[1540,"float-label"],"helpText":[1,"help-text"],"resizable":[1],"customValidityMessage":[32],"setFocused":[64],"setBlurred":[64],"disable":[64],"enable":[64],"pinLabel":[64],"unpinLabel":[64],"setValidity":[64]}]]]], options);
8
+ return bootstrapLazy([["dnn-color-input",[[65,"dnn-color-input",{"color":[1025],"contrastColor":[1025,"contrast-color"],"lightColor":[1025,"light-color"],"darkColor":[1025,"dark-color"],"label":[1],"readonly":[4],"localization":[16],"name":[1],"helpText":[1,"help-text"],"useContrastColor":[4,"use-contrast-color"],"useLightColor":[4,"use-light-color"],"useDarkColor":[4,"use-dark-color"],"currentColor":[32],"focused":[32]},null,{"currentColor":["currentColorChanged"]}]]],["dnn-image-cropper",[[65,"dnn-image-cropper",{"width":[2],"height":[2],"resx":[16],"quality":[2],"preventUndersized":[4,"prevent-undersized"],"name":[1],"view":[32],"localResx":[32],"fileName":[32],"focused":[32],"clear":[64]},null,{"resx":["resxChanged"]}]]],["dnn-autocomplete",[[65,"dnn-autocomplete",{"label":[1],"name":[1],"helpText":[1,"help-text"],"value":[1537],"required":[4],"disabled":[4],"suggestions":[16],"renderSuggestion":[16],"totalSuggestions":[2,"total-suggestions"],"preloadThresholdPixels":[2,"preload-threshold-pixels"],"focused":[32],"valid":[32],"customValidityMessage":[32],"selectedIndex":[32],"positionInitialized":[32],"lastScrollTop":[32],"checkValidity":[64],"setCustomValidity":[64]},[[4,"click","handleOutsideClick"]]]]],["dnn-input",[[65,"dnn-input",{"type":[1025],"label":[1],"name":[1],"value":[1544],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"min":[8],"max":[8],"minlength":[2],"maxlength":[2],"multiple":[4],"pattern":[1],"readonly":[4],"step":[8],"disableValidityReporting":[4,"disable-validity-reporting"],"allowShowPassword":[4,"allow-show-password"],"focused":[32],"valid":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-select",[[65,"dnn-select",{"label":[1],"name":[1],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"disableValidityReporting":[4,"disable-validity-reporting"],"value":[1537],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64]}]]],["dnn-textarea",[[65,"dnn-textarea",{"resizable":[1],"value":[1025],"label":[1],"name":[1],"helpText":[1,"help-text"],"required":[4],"disabled":[4],"autocomplete":[1],"minlength":[2],"maxlength":[2],"readonly":[4],"rows":[2],"focused":[32],"valid":[32],"customValidityMessage":[32],"checkValidity":[64],"setCustomValidity":[64]}]]],["dnn-treeview-item",[[1,"dnn-treeview-item",{"expanded":[1540],"hasChildren":[32],"focused":[32]},null,{"expanded":["watchExpanded"]}]]],["dnn-chevron",[[1,"dnn-chevron",{"expandText":[1,"expand-text"],"collapseText":[1,"collapse-text"],"expanded":[1540],"focused":[32]},null,{"expanded":["handleExpandedChanged"]}]]],["dnn-monaco-editor",[[66,"dnn-monaco-editor",{"language":[1],"value":[1025],"name":[1],"focused":[32]},null,{"language":["languageChanged"],"value":["valueChanged"]}]]],["dnn-progress-bar",[[1,"dnn-progress-bar",{"value":[2],"max":[2],"useGradient":[4,"use-gradient"]}]]],["dnn-richtext",[[65,"dnn-richtext",{"options":[16],"value":[1],"name":[1],"focused":[32]},null,{"value":["watchValueChanged"]}]]],["dnn-sort-icon",[[1,"dnn-sort-icon",{"sortDirection":[1025,"sort-direction"],"focused":[32]}]]],["dnn-toggle",[[65,"dnn-toggle",{"checked":[1028],"disabled":[4],"name":[1],"value":[1],"focused":[32]},null,{"checked":["checkedChanged"]}]]],["dnn-vertical-overflow-menu",[[1,"dnn-vertical-overflow-menu",{"showDropdownButton":[32],"showDropdownMenu":[32]}]]],["dnn-vertical-splitview",[[1,"dnn-vertical-splitview",{"splitterWidth":[2,"splitter-width"],"splitWidthPercentage":[1026,"split-width-percentage"],"leftWidth":[32],"rightWidth":[32],"setSplitWidthPercentage":[64],"getSplitWidthPercentage":[64]}]]],["dnn-checkbox",[[65,"dnn-checkbox",{"checked":[1025],"useIntermediate":[4,"use-intermediate"],"value":[1],"name":[1],"focused":[32]},null,{"checked":["handleCheckedChange"]}]]],["dnn-color-picker",[[1,"dnn-color-picker",{"color":[1],"colorBoxHeight":[1,"color-box-height"],"currentColor":[32],"rgbDisplay":[32],"hslDisplay":[32],"hexDisplay":[32],"focused":[32]},null,{"currentColor":["handeCurrentColorChanged"]}]]],["dnn-dropzone",[[65,"dnn-dropzone",{"resx":[16],"allowedExtensions":[16],"allowCameraMode":[4,"allow-camera-mode"],"captureQuality":[2,"capture-quality"],"maxFileSize":[2,"max-file-size"],"name":[1],"canTakeSnapshots":[32],"takingPicture":[32],"fileTooLarge":[32],"invalidExtension":[32],"localResx":[32],"focused":[32]},null,{"resx":["resxChanged"]}]]],["dnn-searchbox",[[1,"dnn-searchbox",{"placeholder":[1],"debounced":[4],"debounceTime":[2,"debounce-time"],"query":[1025],"focused":[32]},null,{"query":["handleQueryChanged"]}]]],["dnn-tab_2",[[1,"dnn-tab",{"tabTitle":[1,"tab-title"],"visible":[32],"show":[64],"hide":[64]}],[1,"dnn-tabs",{"tabTitles":[32],"selectedTabTitle":[32]}]]],["dnn-collapsible",[[1,"dnn-collapsible",{"expanded":[516],"transitionDuration":[2,"transition-duration"],"updateSize":[64]},[[0,"dnnCollapsibleHeightChanged","handleHeightChanged"]],{"expanded":["handledExpandedChanged"]}]]],["dnn-modal",[[1,"dnn-modal",{"backdropDismiss":[4,"backdrop-dismiss"],"closeText":[1,"close-text"],"resizable":[4],"showCloseButton":[4,"show-close-button"],"visible":[1540],"show":[64],"hide":[64]}]]],["dnn-button",[[65,"dnn-button",{"type":[1],"appearance":[1],"formButtonType":[1,"form-button-type"],"reversed":[4],"size":[1],"confirm":[4],"confirmYesText":[1,"confirm-yes-text"],"confirmNoText":[1,"confirm-no-text"],"confirmMessage":[1,"confirm-message"],"disabled":[4],"focused":[32],"modalVisible":[32]}]]],["dnn-permissions-grid",[[1,"dnn-permissions-grid",{"permissions":[1040],"roleGroups":[16],"roles":[16],"resx":[16],"foundUsers":[16],"selectedRoleGroupId":[32],"userQuery":[32],"pickedUser":[32],"localResx":[32],"focused":[32]},null,{"foundUsers":["handleFoundUsersChanged"],"resx":["resxChanged"]}]]],["dnn-fieldset",[[1,"dnn-fieldset",{"focused":[1540],"disabled":[1540],"invalid":[1540],"label":[1],"floatLabel":[1540,"float-label"],"helpText":[1,"help-text"],"resizable":[1],"customValidityMessage":[32],"setFocused":[64],"setBlurred":[64],"disable":[64],"enable":[64],"pinLabel":[64],"unpinLabel":[64],"setValidity":[64]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -23,6 +23,8 @@ export declare class DnnTextarea {
23
23
  maxlength: number;
24
24
  /** Defines wheter the defined value is readonly. */
25
25
  readonly: boolean;
26
+ /** Defines how many rows (lines of text) to initially show. */
27
+ rows: number;
26
28
  /** Fires when the using is inputing data (on keystrokes). */
27
29
  valueInput: EventEmitter<string>;
28
30
  /** Fires when the value has changed and the user exits the input. */
@@ -672,6 +672,10 @@ export namespace Components {
672
672
  * Can be set to change how the user can resize the field.
673
673
  */
674
674
  "resizable": "none" | "both" | "horizontal" | "vertical" | "block" | "inline";
675
+ /**
676
+ * Defines how many rows (lines of text) to initially show.
677
+ */
678
+ "rows": number;
675
679
  /**
676
680
  * Can be used to set a custom validity message.
677
681
  */
@@ -1950,6 +1954,10 @@ declare namespace LocalJSX {
1950
1954
  * Can be set to change how the user can resize the field.
1951
1955
  */
1952
1956
  "resizable"?: "none" | "both" | "horizontal" | "vertical" | "block" | "inline";
1957
+ /**
1958
+ * Defines how many rows (lines of text) to initially show.
1959
+ */
1960
+ "rows"?: number;
1953
1961
  /**
1954
1962
  * Sets the value of the textarea.
1955
1963
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnncommunity/dnn-elements",
3
- "version": "0.24.0-beta.6",
3
+ "version": "0.24.0-beta.7",
4
4
  "description": "Dnn themed custom elements.",
5
5
  "repository": "https://github.com/dnncommunity/dnn-elements",
6
6
  "homepage": "https://dnncommunity.github.io/dnn-elements",
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as e,H as s}from"./p-978abd50.js";import{g as n}from"./p-5df01911.js";const h=":host{display:inline-block;--foreground:var(--dnn-color-foreground, #000);--background:var(--dnn-color-background, #fff);--focus-color:var(--dnn-color-primary, #3792ED);--danger-color:var(--dnn-color-danger, #900);--control-radius:var(--dnn-controls-radius, 3px)}dnn-fieldset{width:100%}textarea{border:none;outline:none;background-color:transparent;color:var(--foreground);width:100%;height:100%;resize:none}";const a=h;const r=class{constructor(e){t(this,e);this.valueInput=i(this,"valueInput",7);this.valueChange=i(this,"valueChange",7);if(e.$hostElement$["s-ei"]){this.internals=e.$hostElement$["s-ei"]}else{this.internals=e.$hostElement$.attachInternals();e.$hostElement$["s-ei"]=this.internals}this.resizable="block";this.value=undefined;this.label=undefined;this.name=undefined;this.helpText=undefined;this.required=undefined;this.disabled=undefined;this.autocomplete="off";this.minlength=undefined;this.maxlength=undefined;this.readonly=undefined;this.focused=false;this.valid=true;this.customValidityMessage=undefined}async checkValidity(){return this.textarea.validity}async setCustomValidity(t){if(t==undefined||t==""){this.textarea.setCustomValidity("");this.valid=true;this.fieldset.setValidity(true);return}this.customValidityMessage=t;this.valid=false;this.textarea.setCustomValidity(t)}componentWillLoad(){this.labelId=n()}formResetCallback(){this.textarea.setCustomValidity("");this.valid=true;this.value="";this.internals.setValidity({});this.internals.setFormValue("")}handleInput(t){this.value=t;var i=this.textarea.checkValidity();this.valid=i;this.valueInput.emit(this.value)}handleInvalid(){this.valid=false;if(this.customValidityMessage==undefined){this.customValidityMessage=this.textarea.validationMessage}}handleChange(){this.valueChange.emit(this.value);if(this.name!=undefined){var t=new FormData;t.append(this.name,this.value.toString());this.internals.setFormValue(t)}}shouldLabelFloat(){if(this.focused){return false}if(this.value!=undefined&&this.value!=""){return false}return true}render(){var t;return e(s,{key:"a3b5e0100ce757b101071df983a91706fc0466f7",tabIndex:this.focused?-1:0,onFocus:()=>this.textarea.focus(),onBlur:()=>this.textarea.blur()},e("dnn-fieldset",{key:"fdf3fbd79a23657f71a33275f34598e2ecbce692",ref:t=>this.fieldset=t,invalid:!this.valid,focused:this.focused,resizable:this.resizable,label:`${(t=this.label)!==null&&t!==void 0?t:""}${this.required?" *":""}`,helpText:this.helpText,disabled:this.disabled,id:this.labelId,floatLabel:this.shouldLabelFloat(),onClick:()=>!this.focused&&this.textarea.focus()},e("textarea",{key:"77fec48727c61e467c19ad3cefaaa43a0187b018",ref:t=>this.textarea=t,name:this.name,value:this.value,required:this.required,onBlur:()=>this.focused=false,onFocus:()=>this.focused=true,onChange:()=>this.handleChange(),onInput:t=>this.handleInput(t.target.value),onInvalid:()=>this.handleInvalid(),disabled:this.disabled,autoComplete:this.autocomplete,minlength:this.minlength,maxlength:this.maxlength,readonly:this.readonly,"aria-labelledby":this.labelId})))}static get formAssociated(){return true}};r.style=a;export{r as dnn_textarea};
2
- //# sourceMappingURL=p-ceae28fc.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["dnnTextareaCss","DnnTextareaStyle0","DnnTextarea","checkValidity","this","textarea","validity","setCustomValidity","message","undefined","valid","fieldset","setValidity","customValidityMessage","componentWillLoad","labelId","generateRandomId","formResetCallback","value","internals","setFormValue","handleInput","valueInput","emit","handleInvalid","validationMessage","handleChange","valueChange","name","data","FormData","append","toString","shouldLabelFloat","focused","render","h","Host","key","tabIndex","onFocus","focus","onBlur","blur","ref","el","invalid","resizable","label","_a","required","helpText","disabled","id","floatLabel","onClick","onChange","onInput","e","target","onInvalid","autoComplete","autocomplete","minlength","maxlength","readonly"],"sources":["src/components/dnn-textarea/dnn-textarea.scss?tag=dnn-textarea&encapsulation=shadow","src/components/dnn-textarea/dnn-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n\n /** @prop --foreground: Defines the foreground color. */\n --foreground: var(--dnn-color-foreground, #000);\n\n /** @prop --background: Defines the background color. */\n --background: var(--dnn-color-background, #fff);\n \n /** @prop --focus-color: Defines the color when the component is focused. */\n --focus-color: var(--dnn-color-primary, #3792ED);\n \n /** @prop --danger-color: Defines the danger color used for invalid data. */\n --danger-color: var(--dnn-color-danger, #900);\n \n /** @prop --control-radius: Defines the radius for the control corners. */\n --control-radius: var(--dnn-controls-radius, 3px);\n}\n\ndnn-fieldset{\n width: 100%;\n}\n\ntextarea{\n border: none;\n outline: none;\n background-color: transparent;\n color: var(--foreground);\n width: 100%;\n height: 100%;\n resize: none;\n}","import { Component, Host, h, Prop, AttachInternals, State, Event, EventEmitter, Method } from '@stencil/core';\nimport { generateRandomId } from '../../utilities/stringUtilities';\n\n/** A custom textarea component. */\n@Component({\n tag: 'dnn-textarea',\n styleUrl: 'dnn-textarea.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DnnTextarea {\n /** Can be set to change how the user can resize the field. */\n @Prop() resizable: \"none\" | \"both\" | \"horizontal\" | \"vertical\" | \"block\" | \"inline\" = \"block\";\n\n /** Sets the value of the textarea. */\n @Prop({mutable: true}) value: string;\n\n /** The label for this input. */\n @Prop() label: string;\n\n /** The name for this input when used in forms. */\n @Prop() name: string;\n\n /** Defines the help label displayed under the field. */\n @Prop() helpText: string;\n\n /** Defines whether the field requires having a value. */\n @Prop() required: boolean;\n\n /** Defines whether the field is disabled. */\n @Prop() disabled: boolean;\n\n /** Defines the type of auto-completion to use for this field, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete. */\n @Prop() autocomplete: string = \"off\";\n\n /** Defines the minimum amount of charaters. */\n @Prop() minlength: number;\n\n /** Defines the maximum amount of charaters. */\n @Prop() maxlength: number;\n\n /** Defines wheter the defined value is readonly. */\n @Prop() readonly: boolean;\n\n /** Fires when the using is inputing data (on keystrokes). */\n @Event() valueInput: EventEmitter<string>;\n\n /** Fires when the value has changed and the user exits the input. */\n @Event() valueChange: EventEmitter<string>;\n\n /** Reports the input validity details. See https://developer.mozilla.org/en-US/docs/Web/API/ValidityState */\n @Method()\n async checkValidity(): Promise<ValidityState> {\n return this.textarea.validity;\n }\n\n /** Can be used to set a custom validity message. */\n @Method()\n async setCustomValidity(message: string): Promise<void> {\n if (message == undefined || message == \"\") {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.fieldset.setValidity(true);\n return;\n }\n\n this.customValidityMessage = message;\n this.valid = false;\n this.textarea.setCustomValidity(message);\n }\n\n @State() focused = false;\n @State() valid = true;\n @State() customValidityMessage: string;\n\n @AttachInternals() internals: ElementInternals;\n \n private textarea: HTMLTextAreaElement;\n private fieldset: HTMLDnnFieldsetElement;\n private labelId: string;\n\n componentWillLoad() {\n this.labelId = generateRandomId();\n }\n\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n formResetCallback() {\n this.textarea.setCustomValidity(\"\");\n this.valid = true;\n this.value = \"\";\n this.internals.setValidity({});\n this.internals.setFormValue(\"\");\n }\n\n private handleInput(value: string): void {\n this.value = value;\n var valid = this.textarea.checkValidity();\n this.valid = valid;\n this.valueInput.emit(this.value);\n }\n\n private handleInvalid(): void {\n this.valid = false;\n if (this.customValidityMessage == undefined){\n this.customValidityMessage = this.textarea.validationMessage;\n }\n }\n\n private handleChange() {\n this.valueChange.emit(this.value);\n if (this.name != undefined){\n var data = new FormData();\n data.append(this.name, this.value.toString());\n this.internals.setFormValue(data);\n }\n }\n\n private shouldLabelFloat(): boolean {\n if (this.focused) {\n return false;\n }\n\n if (this.value != undefined && this.value != \"\") {\n return false;\n }\n \n return true;\n }\n\n render() {\n return (\n <Host\n tabIndex={this.focused ? -1 : 0}\n onFocus={() => this.textarea.focus()}\n onBlur={() => this.textarea.blur()}\n >\n <dnn-fieldset\n ref={el => this.fieldset = el}\n invalid={!this.valid}\n focused={this.focused}\n resizable={this.resizable}\n label={`${this.label ?? \"\"}${this.required ? \" *\" : \"\"}`}\n helpText={this.helpText}\n disabled={this.disabled}\n id={this.labelId}\n floatLabel={this.shouldLabelFloat()}\n onClick={() => !this.focused && this.textarea.focus()}\n >\n <textarea\n ref={el => this.textarea = el}\n name={this.name}\n value={this.value}\n required={this.required}\n onBlur={() => this.focused = false}\n onFocus={() => this.focused=true}\n onChange={() => this.handleChange()}\n onInput={e => this.handleInput((e.target as HTMLTextAreaElement).value)}\n onInvalid={() => this.handleInvalid()}\n disabled={this.disabled}\n autoComplete={this.autocomplete}\n minlength={this.minlength}\n maxlength={this.maxlength}\n readonly={this.readonly}\n aria-labelledby={this.labelId}\n />\n </dnn-fieldset>\n </Host>\n );\n }\n\n}\n"],"mappings":"6FAAA,MAAMA,EAAiB,4ZACvB,MAAAC,EAAeD,E,MCSFE,EAAW,M,wRAEgE,Q,wJAqBvD,M,uFAsCZ,M,WACF,K,qCApBjB,mBAAMC,GACJ,OAAOC,KAAKC,SAASC,Q,CAKvB,uBAAMC,CAAkBC,GACtB,GAAIA,GAAWC,WAAaD,GAAW,GAAI,CACzCJ,KAAKC,SAASE,kBAAkB,IAChCH,KAAKM,MAAQ,KACbN,KAAKO,SAASC,YAAY,MAC1B,M,CAGFR,KAAKS,sBAAwBL,EAC7BJ,KAAKM,MAAQ,MACbN,KAAKC,SAASE,kBAAkBC,E,CAalC,iBAAAM,GACEV,KAAKW,QAAUC,G,CAIjB,iBAAAC,GACEb,KAAKC,SAASE,kBAAkB,IAChCH,KAAKM,MAAQ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