@ngx-smz/core 21.1.16 → 21.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-smz-core.mjs +1686 -1599
- package/fesm2022/ngx-smz-core.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/assets/scss/dialogs/smz-general-styles.scss +1 -1
- package/resources/assets/scss/fontawesome-free.scss +1 -1
- package/resources/assets/scss/smz-dialogs.scss +3 -3
- package/resources/assets/scss/smz-dock.scss +1 -1
- package/resources/assets/scss/smz-forms.scss +1 -1
- package/resources/assets/scss/styles.scss +17 -18
- package/types/ngx-smz-core.d.ts +86 -2
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* FONTAWESOME FREE */
|
|
2
|
-
@
|
|
2
|
+
@use "@fortawesome/fontawesome-free/css/all.min.css" as *;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "./dialogs/smz-general-styles" as *;
|
|
2
2
|
// @import "./dialogs/prime10.scss";
|
|
3
3
|
// @import "./dialogs/theme10.scss";
|
|
4
|
-
@
|
|
5
|
-
@
|
|
4
|
+
@use "./dialogs/dialog-ng19" as *;
|
|
5
|
+
@use "./dialogs/menu-ng19" as *;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "./dock/dock" as *;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "./forms/forms" as *;
|
|
@@ -1,51 +1,50 @@
|
|
|
1
1
|
/* EXTRAS */
|
|
2
|
-
@
|
|
2
|
+
@use "./extras/extras" as *;
|
|
3
3
|
|
|
4
4
|
/* PRETTY JSON */
|
|
5
|
-
@
|
|
5
|
+
@use "./extras/pretty-json" as *;
|
|
6
6
|
|
|
7
7
|
/* SMZ-TABLES */
|
|
8
|
-
@
|
|
8
|
+
@use "./smz-tables" as *;
|
|
9
9
|
|
|
10
10
|
/* SMZ-TREES */
|
|
11
|
-
@
|
|
11
|
+
@use "./smz-trees" as *;
|
|
12
12
|
|
|
13
13
|
/* COLORS */
|
|
14
|
-
@
|
|
14
|
+
@use "./extras/colors" as *;
|
|
15
15
|
|
|
16
16
|
/* DIVIDERS */
|
|
17
|
-
@
|
|
17
|
+
@use "./extras/dividers" as *;
|
|
18
18
|
|
|
19
19
|
/* PÁGINAS DE ERRO E NOTFOUND */
|
|
20
|
-
@
|
|
20
|
+
@use "./pages/app-exceptions" as *;
|
|
21
21
|
|
|
22
22
|
/* DIALOGS */
|
|
23
|
-
@
|
|
23
|
+
@use "./smz-dialogs" as *;
|
|
24
24
|
|
|
25
25
|
/* DOCKS */
|
|
26
|
-
@
|
|
26
|
+
@use "./smz-dock" as *;
|
|
27
27
|
|
|
28
28
|
/* FORMS */
|
|
29
|
-
@
|
|
29
|
+
@use "./smz-forms" as *;
|
|
30
30
|
|
|
31
31
|
/* DOCUMENTS */
|
|
32
|
-
@
|
|
32
|
+
@use "./documents/documents" as *;
|
|
33
33
|
|
|
34
34
|
/* BROWSER STUFFS */
|
|
35
|
-
@
|
|
35
|
+
@use "./extras/browser" as *;
|
|
36
36
|
|
|
37
|
-
@
|
|
37
|
+
@use "./smz-prime-fix" as *;
|
|
38
38
|
|
|
39
39
|
/* OVERLAY DO PRIME */
|
|
40
|
-
@
|
|
40
|
+
@use "./overlay-panel/overlay-panel" as *;
|
|
41
41
|
|
|
42
42
|
/* FOI FEITO UM OVERRIDE DO PRIME GRID ORIGINAL PARA ADICIONAR !IMPORTANT */
|
|
43
|
-
@
|
|
43
|
+
@use './prime-grid/grid' as *;
|
|
44
44
|
|
|
45
45
|
/* PRIME ICONS */
|
|
46
|
-
@
|
|
46
|
+
@use "primeicons/primeicons.css" as *;
|
|
47
47
|
|
|
48
48
|
/* ANIMATIONS */
|
|
49
49
|
// @import "hover.css/css/hover-min.css";
|
|
50
|
-
@
|
|
51
|
-
|
|
50
|
+
@use "animate.css/animate.min.css" as *;
|
package/types/ngx-smz-core.d.ts
CHANGED
|
@@ -6615,7 +6615,8 @@ declare class SmzFormConditionalTooltipBuilder<TInput, TResponse> {
|
|
|
6615
6615
|
private styleClass;
|
|
6616
6616
|
private position;
|
|
6617
6617
|
constructor(inputBuilder: TInput, inputRef: SmzFormsBaseControl, resolveMessage: (formValues: any) => string | null);
|
|
6618
|
-
|
|
6618
|
+
/** Reassigns the warning signal; `update()` is unsafe when the builder runs inside an Angular `computed` (NG0600). */
|
|
6619
|
+
private applyWarningState;
|
|
6619
6620
|
withStyleClass(styleClass: string): SmzFormConditionalTooltipBuilder<TInput, TResponse>;
|
|
6620
6621
|
withPosition(position: 'top' | 'bottom' | 'left' | 'right'): SmzFormConditionalTooltipBuilder<TInput, TResponse>;
|
|
6621
6622
|
get input(): TInput;
|
|
@@ -6907,10 +6908,11 @@ declare class SmzFormPasswordBuilder<TResponse> extends SmzFormInputBuilder<SmzF
|
|
|
6907
6908
|
enableToggleMask(): SmzFormPasswordBuilder<TResponse>;
|
|
6908
6909
|
setStrengthRegex(medium: string, strong: string): SmzFormPasswordBuilder<TResponse>;
|
|
6909
6910
|
}
|
|
6910
|
-
declare class SmzFormInputValidatorBuilder<TInput, TResponse> {
|
|
6911
|
+
declare class SmzFormInputValidatorBuilder<TInput, TResponse> extends SmzBuilderUtilities<SmzFormInputValidatorBuilder<TInput, TResponse>> {
|
|
6911
6912
|
inputRefBuilder: TInput;
|
|
6912
6913
|
private inputRef;
|
|
6913
6914
|
groupBuilderRef: SmzFormGroupBuilder<TResponse>;
|
|
6915
|
+
protected that: this;
|
|
6914
6916
|
constructor(inputRefBuilder: TInput, inputRef: SmzFormsBaseControl, groupBuilderRef: SmzFormGroupBuilder<TResponse>);
|
|
6915
6917
|
required(): SmzFormInputValidatorBuilder<TInput, TResponse>;
|
|
6916
6918
|
length(min: number, max: number): SmzFormInputValidatorBuilder<TInput, TResponse>;
|
|
@@ -7068,33 +7070,96 @@ declare class SmzFormUiDefinitionBuilder<TResponse> extends SmzBaseUiDefinitionB
|
|
|
7068
7070
|
get form(): SmzFormBuilder<TResponse>;
|
|
7069
7071
|
}
|
|
7070
7072
|
|
|
7073
|
+
/**
|
|
7074
|
+
* Fluent builder for the entire form model ({@link SmzForm}).
|
|
7075
|
+
*
|
|
7076
|
+
* **Entry point:** start with `new SmzFormBuilder<T>()` (standalone) or obtain via
|
|
7077
|
+
* {@link SmzDialogBuilder.form} when the form is hosted inside a dialog. Always add at least
|
|
7078
|
+
* one {@link SmzFormBuilder.group} before defining controls, then call {@link SmzFormBuilder.build}
|
|
7079
|
+
* to get immutable state for `smz-form-group` / form features.
|
|
7080
|
+
*/
|
|
7071
7081
|
declare class SmzFormBuilder<TResponse> {
|
|
7072
7082
|
dialogBuilderRef: SmzDialogBuilder<TResponse>;
|
|
7073
7083
|
private defaultConfig;
|
|
7074
7084
|
formState: SmzForm<TResponse>;
|
|
7075
7085
|
createdByUiDefinitions: boolean;
|
|
7086
|
+
/**
|
|
7087
|
+
* @param dialogBuilderRef When non-null, this builder is owned by a dialog feature (see {@link SmzDialogBuilder.form}).
|
|
7088
|
+
* @param state Optional existing {@link SmzForm} to mutate (e.g. UI definition hydration).
|
|
7089
|
+
*/
|
|
7076
7090
|
constructor(dialogBuilderRef?: SmzDialogBuilder<TResponse>, state?: SmzForm<TResponse>);
|
|
7091
|
+
/** Turns on form debug logging in the form group component. */
|
|
7077
7092
|
debugMode(): SmzFormBuilder<TResponse>;
|
|
7093
|
+
/**
|
|
7094
|
+
* Appends a new form group and returns a builder to add controls, layout, and validators.
|
|
7095
|
+
* @param name Optional group title; when set, the group can show a heading.
|
|
7096
|
+
* @param key Optional key used to identify the group in advanced scenarios (e.g. hide/show, reactions).
|
|
7097
|
+
*/
|
|
7078
7098
|
group(name?: string, key?: string): SmzFormGroupBuilder<TResponse>;
|
|
7099
|
+
/** If set, submitted data keeps nested object shape instead of flattening. */
|
|
7079
7100
|
disableFlattenResponse(): SmzFormBuilder<TResponse>;
|
|
7101
|
+
/**
|
|
7102
|
+
* When true, per-control custom “on load” logic runs as the form is initialized
|
|
7103
|
+
* (e.g. derived defaults).
|
|
7104
|
+
*/
|
|
7080
7105
|
runCustomFunctionsOnLoad(): SmzFormBuilder<TResponse>;
|
|
7106
|
+
/**
|
|
7107
|
+
* Emits output events for all controls on first load, not only on user interaction
|
|
7108
|
+
* (use when consumers need a full initial snapshot).
|
|
7109
|
+
*/
|
|
7081
7110
|
emitAllOutputsOnLoad(): SmzFormBuilder<TResponse>;
|
|
7111
|
+
/**
|
|
7112
|
+
* Replaces the default “after change” behavior with a custom hook (advanced integration).
|
|
7113
|
+
* Prefer control-level and group-level configuration when possible.
|
|
7114
|
+
*/
|
|
7082
7115
|
setCustomBehavior(callback: (data: SmzFormsResponse<TResponse>, config: SmzForm<TResponse>, form: UntypedFormGroup, outputEvents: Record<string, unknown>) => void): SmzFormBuilder<TResponse>;
|
|
7116
|
+
/**
|
|
7117
|
+
* Sets the separator used in flattened response keys for nested data (e.g. `parent_child`).
|
|
7118
|
+
* The dot (`.`) is not allowed because it is reserved for nested object paths.
|
|
7119
|
+
*/
|
|
7083
7120
|
withNestedResponseKeySeparator(separator: string): SmzFormBuilder<TResponse>;
|
|
7121
|
+
/**
|
|
7122
|
+
* Sets default values on existing control definitions by `propertyName`.
|
|
7123
|
+
* **Requires** at least one group with controls. Unlike {@link applyData}, values are
|
|
7124
|
+
* applied directly as stored default values in the form model.
|
|
7125
|
+
*/
|
|
7084
7126
|
applyValues(...values: {
|
|
7085
7127
|
propertyName: string;
|
|
7086
7128
|
value: unknown;
|
|
7087
7129
|
}[]): SmzFormBuilder<TResponse>;
|
|
7130
|
+
/**
|
|
7131
|
+
* Merges a data object into existing controls (handles simple-entity values by id).
|
|
7132
|
+
* **Requires** at least one group. Set `debug` to log merge steps in the console.
|
|
7133
|
+
*/
|
|
7088
7134
|
applyData(data: Record<string, unknown>, debug?: boolean): SmzFormBuilder<TResponse>;
|
|
7135
|
+
/** Debounce in ms for value emissions / validation feedback (form-level). */
|
|
7089
7136
|
setDebounceTime(debouceTime: number): SmzFormBuilder<TResponse>;
|
|
7137
|
+
/** Binds value updates to blur so emissions fire when leaving a field, not on every keystroke. */
|
|
7090
7138
|
emitChangesOnFocusExit(): SmzFormBuilder<TResponse>;
|
|
7139
|
+
/** When appropriate for the host, allows submitting the form on Enter. */
|
|
7091
7140
|
enableSubmitOnEnter(): SmzFormBuilder<TResponse>;
|
|
7141
|
+
/** Emits on every `change` event (as opposed to blur/submit). */
|
|
7092
7142
|
emitChangesOnAllChanges(): SmzFormBuilder<TResponse>;
|
|
7143
|
+
/** Skips the first emit pass after the form is built (avoids “dirty on load” in some UIs). */
|
|
7093
7144
|
avoidEmitChangesOnLoad(): SmzFormBuilder<TResponse>;
|
|
7145
|
+
/** When validation yields multiple issues, show all messages instead of only the first. */
|
|
7094
7146
|
showMultipleErrorsMessages(): SmzFormBuilder<TResponse>;
|
|
7147
|
+
/**
|
|
7148
|
+
* Form-level custom validator: return `true` if the form is valid for your custom rules.
|
|
7149
|
+
* Works alongside Angular validators on each control.
|
|
7150
|
+
*/
|
|
7095
7151
|
setCustomValidator(callback: (data: SmzFormsResponse<TResponse>, formGroup: UntypedFormGroup) => boolean): SmzFormBuilder<TResponse>;
|
|
7152
|
+
/** When this form was created from a dialog, returns the parent {@link SmzDialogBuilder}. */
|
|
7096
7153
|
get dialog(): SmzDialogBuilder<TResponse>;
|
|
7154
|
+
/**
|
|
7155
|
+
* Finalizes the form model. Throws if any duplicate `propertyName` exists across groups.
|
|
7156
|
+
* The returned state is what `smz-form-group` consumes as `[config]`.
|
|
7157
|
+
*/
|
|
7097
7158
|
build(): SmzForm<TResponse>;
|
|
7159
|
+
/**
|
|
7160
|
+
* Switches to UI-definition–driven form construction (server or bundle definitions).
|
|
7161
|
+
* Call once; further fluent API usage follows the UI definition builder.
|
|
7162
|
+
*/
|
|
7098
7163
|
fromUiDefinition(entity: string): SmzFormUiDefinitionBuilder<TResponse>;
|
|
7099
7164
|
}
|
|
7100
7165
|
|
|
@@ -7226,11 +7291,17 @@ declare class SmzDialogOverlayPanelBuilder<TResponse> extends SmzBuilderUtilitie
|
|
|
7226
7291
|
get dialog(): SmzDialogBuilder<TResponse>;
|
|
7227
7292
|
}
|
|
7228
7293
|
|
|
7294
|
+
/**
|
|
7295
|
+
* Fluent builder for a modal (or inline) dialog: title, feature stack (form, table, custom component, …),
|
|
7296
|
+
* and button/callback configuration. Chains to {@link SmzFormBuilder} for form content via
|
|
7297
|
+
* {@link SmzDialogBuilder.form} — that is the recommended entry to compose form UIs that open in dialogs.
|
|
7298
|
+
*/
|
|
7229
7299
|
declare class SmzDialogBuilder<TResponse> extends SmzBuilderUtilities<SmzDialogBuilder<TResponse>> {
|
|
7230
7300
|
protected that: this;
|
|
7231
7301
|
private defaultConfig;
|
|
7232
7302
|
dialogState: SmzDialog<TResponse>;
|
|
7233
7303
|
createdByUiDefinitions: boolean;
|
|
7304
|
+
/** Shown in the dialog header. Pass `null` to clear the title. */
|
|
7234
7305
|
setTitle(title?: string | null): SmzDialogBuilder<TResponse>;
|
|
7235
7306
|
useAdvancedResponse(): SmzDialogBuilder<TResponse>;
|
|
7236
7307
|
closeOnEscape(): SmzDialogBuilder<TResponse>;
|
|
@@ -7256,8 +7327,21 @@ declare class SmzDialogBuilder<TResponse> extends SmzBuilderUtilities<SmzDialogB
|
|
|
7256
7327
|
setPreset(preset: SmzPresetTypes): SmzDialogBuilder<TResponse>;
|
|
7257
7328
|
useAsOverlayPanel(elementId: string, guideState: SmzUiGuidesState): SmzDialogOverlayPanelBuilder<TResponse>;
|
|
7258
7329
|
buttons(): SmzDialogButtonsBuilder<TResponse>;
|
|
7330
|
+
/**
|
|
7331
|
+
* Start dialog construction from a server-side UI definition. Mutually exclusive with manual
|
|
7332
|
+
* `form()` / `component()` / … chains until the definition layer finishes hydrating state.
|
|
7333
|
+
*/
|
|
7259
7334
|
fromUiDefinition(entityName: string): SmzDialogUiDefinitionBuilder<TResponse>;
|
|
7335
|
+
/**
|
|
7336
|
+
* Appends a **form** feature and returns {@link SmzFormBuilder} to define groups/controls in the
|
|
7337
|
+
* usual way. **Primary entry** for “dialog + form” product flows. Pass a prebuilt {@link SmzForm} to
|
|
7338
|
+
* edit existing state, or omit/`null` to start an empty form model owned by the returned builder.
|
|
7339
|
+
*/
|
|
7260
7340
|
form(form?: SmzForm<TResponse>): SmzFormBuilder<TResponse>;
|
|
7341
|
+
/**
|
|
7342
|
+
* Like {@link form} but returns {@link SmzDialogFormBuilder} to set layout on the form feature
|
|
7343
|
+
* container before calling {@link SmzDialogFormBuilder.form} for the {@link SmzFormBuilder} chain.
|
|
7344
|
+
*/
|
|
7261
7345
|
formFeature(): SmzDialogFormBuilder<TResponse>;
|
|
7262
7346
|
component(component: ComponentDataBase | any): SmzDialogComponentBuilder<TResponse>;
|
|
7263
7347
|
message(message: string | string[]): SmzDialogBuilder<TResponse>;
|