@dartcom/ui-kit 10.2.10 → 10.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__test__/types.d.ts +4 -0
- package/dist/__test__/types.d.ts.map +1 -0
- package/dist/components/buttons/delete/button.spec.d.ts +2 -0
- package/dist/components/buttons/delete/button.spec.d.ts.map +1 -0
- package/dist/components/buttons/delete/delete.d.ts.map +1 -1
- package/dist/components/buttons/delete/delete.stories.d.ts +2 -0
- package/dist/components/buttons/delete/delete.stories.d.ts.map +1 -1
- package/dist/components/buttons/delete/types.d.ts +3 -1
- package/dist/components/buttons/delete/types.d.ts.map +1 -1
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/__test__/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.spec.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/button.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAW5C,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAW5C,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA4F7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -4,5 +4,7 @@ declare const meta: Meta<typeof DeleteButton>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Primary: Story;
|
|
7
|
+
export declare const Disabled: Story;
|
|
7
8
|
export declare const WithNotification: Story;
|
|
9
|
+
export declare const DisabledWithNotification: Story;
|
|
8
10
|
//# sourceMappingURL=delete.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AAEjC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAcnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAUtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,YAAY,CAAC,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -14803,7 +14803,7 @@ const IconButton = ({ title, iconProps, ...props }) => {
|
|
|
14803
14803
|
const Transition = React__namespace.forwardRef(function Transition(props, ref) {
|
|
14804
14804
|
return jsxRuntime.jsx(material.Slide, { direction: "up", ref: ref, ...props });
|
|
14805
14805
|
});
|
|
14806
|
-
const DeleteButton = ({ notification, onDelete, }) => {
|
|
14806
|
+
const DeleteButton = ({ notification, onDelete, disabled = false, ...props }) => {
|
|
14807
14807
|
const id = React__namespace.useId();
|
|
14808
14808
|
const [openNotification, setOpenNotification] = React__namespace.useState(false);
|
|
14809
14809
|
const handleOpenNotification = () => {
|
|
@@ -14812,13 +14812,13 @@ const DeleteButton = ({ notification, onDelete, }) => {
|
|
|
14812
14812
|
const handleCloseNotification = () => {
|
|
14813
14813
|
setOpenNotification(false);
|
|
14814
14814
|
};
|
|
14815
|
-
|
|
14816
|
-
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14815
|
+
const iconProps = React__namespace.useMemo(() => {
|
|
14816
|
+
return {
|
|
14817
|
+
name: 'delete',
|
|
14818
|
+
color: disabled ? 'disabled' : 'error',
|
|
14819
|
+
};
|
|
14820
|
+
}, [disabled]);
|
|
14821
|
+
return (jsxRuntime.jsxs(React__namespace.Fragment, { children: [notification ? (jsxRuntime.jsx(material.Tooltip, { title: notification.title, children: jsxRuntime.jsx(IconButton, { ...props, iconProps: iconProps, onClick: handleOpenNotification, disabled: disabled }) })) : (jsxRuntime.jsx(IconButton, { ...props, iconProps: iconProps, onClick: onDelete, disabled: disabled })), notification ? (jsxRuntime.jsxs(material.Dialog, { slots: {
|
|
14822
14822
|
transition: Transition,
|
|
14823
14823
|
}, open: openNotification, onClose: handleCloseNotification, children: [jsxRuntime.jsx(material.DialogTitle, { id: `${id}-dialog-title`, children: notification.title }), jsxRuntime.jsx(material.DialogContent, { children: jsxRuntime.jsx(material.DialogContentText, { id: `${id}-dialog-text`, children: notification.description }) }), jsxRuntime.jsxs(material.DialogActions, { children: [jsxRuntime.jsx(material.Button, { variant: "contained", color: "error", sx: {
|
|
14824
14824
|
textTransform: 'none',
|
|
@@ -26058,7 +26058,7 @@ const generalizationBaseLayerDraw = {
|
|
|
26058
26058
|
text,
|
|
26059
26059
|
lines: {
|
|
26060
26060
|
color: '#BABCC2',
|
|
26061
|
-
width:
|
|
26061
|
+
width: 10,
|
|
26062
26062
|
cap: 'round',
|
|
26063
26063
|
join: 'round',
|
|
26064
26064
|
},
|
|
@@ -26102,7 +26102,7 @@ const getFilter = (zLvl) => {
|
|
|
26102
26102
|
const filter = `function() {
|
|
26103
26103
|
const { z_lvl = '0.0' } = feature;
|
|
26104
26104
|
|
|
26105
|
-
const isFilter = z_lvl === '${zLvl}' && $zoom
|
|
26105
|
+
const isFilter = z_lvl === '${zLvl}' && $zoom <= ${generalizationZoom};
|
|
26106
26106
|
|
|
26107
26107
|
return isFilter;
|
|
26108
26108
|
}`;
|
|
@@ -26135,7 +26135,7 @@ const getLinkLayers = (source) => {
|
|
|
26135
26135
|
filter: `function() {
|
|
26136
26136
|
const { functional_class, z_lvl = '0.0' } = feature;
|
|
26137
26137
|
|
|
26138
|
-
const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom
|
|
26138
|
+
const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom <= ${generalizationZoom};
|
|
26139
26139
|
|
|
26140
26140
|
return isFilter;
|
|
26141
26141
|
}`,
|
|
@@ -26158,7 +26158,7 @@ const getLinkLayers = (source) => {
|
|
|
26158
26158
|
filter: `function() {
|
|
26159
26159
|
const { functional_class, z_lvl = '0.0' } = feature;
|
|
26160
26160
|
|
|
26161
|
-
const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom
|
|
26161
|
+
const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom > ${generalizationZoom};
|
|
26162
26162
|
|
|
26163
26163
|
return isFilter;
|
|
26164
26164
|
}`,
|
|
@@ -26175,7 +26175,7 @@ const getLinkLayers = (source) => {
|
|
|
26175
26175
|
filter: `function() {
|
|
26176
26176
|
const { functional_class, z_lvl = '0.0' } = feature;
|
|
26177
26177
|
|
|
26178
|
-
const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature) && $zoom
|
|
26178
|
+
const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature) && $zoom <= ${generalizationZoom};
|
|
26179
26179
|
|
|
26180
26180
|
|
|
26181
26181
|
return isFilter;
|
|
@@ -26210,7 +26210,7 @@ const getLinkLayers = (source) => {
|
|
|
26210
26210
|
filter: `function() {
|
|
26211
26211
|
const { z_lvl = '0.0' } = feature;
|
|
26212
26212
|
|
|
26213
|
-
const isFilter = z_lvl === '${zLvl}' && $zoom
|
|
26213
|
+
const isFilter = z_lvl === '${zLvl}' && $zoom > ${generalizationZoom};
|
|
26214
26214
|
|
|
26215
26215
|
return isFilter;
|
|
26216
26216
|
}`,
|